From d025fb7f76a203f3d29f7041611115a00f7a010c Mon Sep 17 00:00:00 2001 From: 杨乐 <yang.le.192@qq.com> Date: 星期一, 14 二月 2022 16:19:14 +0800 Subject: [PATCH] 无数据的情况下去掉提示,直接显示无数据的列表,且带出操作工具栏 --- WebAPI/Controllers/BLL/Xt_AccountPeriodController.cs | 33 WebAPI/Controllers/仓存管理/验收入库/Kf_EntrustOutBackBillController.cs | 14 WebAPI/Controllers/CGGL/Kf_POStockInBackBillController.cs | 14 WebAPI/Controllers/基础资料/基础资料/Gy_RepairBillController.cs | 33 WebAPI/Controllers/GZGL/Gy_WorkTypeBillController.cs | 33 WebAPI/Controllers/仓存管理/领料发货/Kf_StepFoldOutBillController.cs | 33 WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs | 1 WebAPI/Controllers/基础资料/基础资料/Gy_ConkReasonBillController.cs | 33 WebAPI/Controllers/BaseSet/Pay_PeriodInfoSetController.cs | 33 WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs | 37 WebAPI/Controllers/BLL/Xt_UserController.cs | 33 WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs | 69 WebAPI/Controllers/MJGL/Sc_MouldRepairChangeBillController.cs | 33 WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs | 33 WebAPI/Controllers/生产管理/报工台工序/Sc_MESEndStepWorkBillController.cs | 1 WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs | 1 WebAPI/Controllers/生产管理/报工台工序/Sc_MESBeginStepWorkBillController.cs | 1 WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs | 33 WebAPI/Controllers/BaseSet/Xt_DataDictionary_TableController.cs | 33 WebAPI/Controllers/BaseSet/Gy_ProcessController.cs | 33 WebAPI/Controllers/BLL/Xt_XtgnbController.cs | 33 WebAPI/Controllers/BaseSet/Xt_DataDictionary_ViewController.cs | 33 WebAPI/Controllers/生产管理/报工台工序/Sc_MESReturnStepWorkBillController.cs | 1 WebAPI/Controllers/生产管理/报工台工序/Sc_MESStopStepWorkBillController.cs | 1 WebAPI/Controllers/BaseSet/Gy_PropertyController.cs | 33 WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs | 33 WebAPI/Controllers/BaseSet/Gy_SourceController.cs | 33 WebAPI/Controllers/工资管理/Pay_OtherBalBillController.cs | 1 WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs | 33 WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs | 32 WebAPI/Controllers/基础资料/基础资料/Gy_DotCheckBillController.cs | 33 WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 33 WebAPI/Controllers/仓存管理/条码出入库记录/Kf_ICStockInOutBillController.cs | 37 WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs | 33 WebAPI/Controllers/BaseSet/Gy_CurrencyController.cs | 33 WebAPI/Controllers/工资管理/Pay_GroupBalBillController.cs | 1 WebAPI/Controllers/BaseSet/Gy_UnitController.cs | 12 WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs | 33 WebAPI/Controllers/生产管理/报工台工序/Sc_MaterToSourceStepBillController.cs | 33 WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs | 1 WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs | 33 WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs | 33 WebAPI/Controllers/BaseSet/Gy_GroupController.cs | 33 WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs | 34 WebAPI/Controllers/BaseSet/Xt_DataDictionary_ProcController.cs | 33 WebAPI/Controllers/BaseSet/Gy_CheckItemController.cs | 33 WebAPI/Controllers/BaseSet/Gy_QCCheckClassController.cs | 33 WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs | 33 WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs | 33 WebAPI/Controllers/CGGL/Cg_POInStockBackBillController.cs | 33 WebAPI/Controllers/仓存管理/领料发货/Kf_MateOutBillController.cs | 14 WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs | 33 WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs | 33 WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs | 33 WebAPI/Controllers/工资管理/Gy_ClassTimePrjSubController.cs | 33 WebAPI/Controllers/QC_ManagementController.cs | 32 WebAPI/Controllers/BLL/Xt_BillTypeController.cs | 33 WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs | 37 WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs | 1 WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs | 2 WebAPI/Controllers/Sc_GroupOrderBillController.cs | 33 WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs | 33 WebAPI/Controllers/QC_POStockInCheckBillController.cs | 1 WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs | 21 WebAPI/Controllers/BaseSet/Gy_OrderBackInfoController.cs | 33 WebAPI/Controllers/CGGL/WW_EntrustOrderBillController.cs | 32 WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs | 25 WebAPI/Controllers/SCGL/Sc_ICBomBillController.cs | 11 WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs | 33 WebAPI/Controllers/BaseSet/Gy_WorkCenterController.cs | 33 WebAPI/Controllers/Kf_ICStockBillMainController.cs | 33 WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 33 WebAPI/Controllers/仓存管理/领料发货/Kf_MateOutBackBillController.cs | 33 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 368 +++-- WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs | 31 WebAPI/Controllers/BaseSet/Gy_OrderLevController.cs | 33 WebAPI/Controllers/Sc_MouldOtherInBillController.cs | 1 WebAPI/Controllers/BaseSet/Gy_RoutingGroupController.cs | 33 WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs | 33 WebAPI/Controllers/仓存管理/调拨盘点/Kf_MoveStockRequestBillController.cs | 33 WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs | 1 WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs | 1 WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs | 33 WebAPI/Controllers/BaseSet/Gy_CustomerController.cs | 1 WebAPI/Controllers/工资管理/Pay_WorkTimesBillController.cs | 1 WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs | 33 WebAPI/Controllers/工资管理/Pay_SingleBalBillController.cs | 1 WebAPI/Controllers/仓存管理/扫码异常记录/KF_PonderationBillController.cs | 37 WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs | 33 WebAPI/Controllers/GZGL/Gy_WorkPayTypeBillController.cs | 33 WebAPI/Controllers/GG_NoticeController.cs | 33 WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs | 33 WebAPI/Controllers/工资管理/Gy_ClassTimePrjBillController.cs | 33 WebAPI/Controllers/ReportFromController.cs | 108 WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 66 WebAPI/Controllers/仓存管理/条码库存/KF_ICInventoryList_WMSBillController.cs | 36 WebAPI/Controllers/LMESController.cs | 65 WebAPI/Controllers/生产管理/报工台工序/Sc_QualityReportStepBillController.cs | 33 WebAPI/Controllers/BaseSet/Gy_SupplierController.cs | 13 WebAPI/Controllers/基础资料/基础资料/Gy_RepairCheckBillController.cs | 33 WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs | 18 WebAPI/Controllers/基础资料/基础资料/Gy_MaintainBillController.cs | 33 WebAPI/Controllers/GZGL/Gy_DuSubsidyItemBillController.cs | 33 WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs | 1 WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs | 33 WebAPI/Controllers/SCGL/Sc_PackUnionBillController.cs | 37 WebAPI/Controllers/BLL/Xt_SystemLogController.cs | 33 WebAPI/Controllers/MJGL/Sc_MouldScrapInBillController.cs | 33 WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs | 33 WebAPI/Controllers/仓存管理/委外用料/WW_PPBomBillController.cs | 33 WebAPI/Controllers/工资管理/Gy_GroupEmpBillController.cs | 2 WebAPI/Controllers/CJGL/Cj_StationInBillController.cs | 33 WebAPI/Controllers/仓存管理/验收入库/Kf_StepFoldinBillController.cs | 33 WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs | 33 WebAPI/Controllers/BLL/Xt_SystemParameterController.cs | 33 WebAPI/Controllers/Sc_ProcessMangementController.cs | 32 WebAPI/Controllers/基础资料/工资基础资料/Gy_ProcPriceController.cs | 33 WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs | 1 WebAPI/Controllers/BLL/Xt_UserGroupController.cs | 33 119 files changed, 1,893 insertions(+), 1,738 deletions(-) diff --git a/WebAPI/Controllers/BLL/Xt_AccountPeriodController.cs b/WebAPI/Controllers/BLL/Xt_AccountPeriodController.cs index ce0b655..9a0d0d8 100644 --- a/WebAPI/Controllers/BLL/Xt_AccountPeriodController.cs +++ b/WebAPI/Controllers/BLL/Xt_AccountPeriodController.cs @@ -39,22 +39,23 @@ string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_Xt_AccountPeriodList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BLL/Xt_BillTypeController.cs b/WebAPI/Controllers/BLL/Xt_BillTypeController.cs index bb31ec6..083210c 100644 --- a/WebAPI/Controllers/BLL/Xt_BillTypeController.cs +++ b/WebAPI/Controllers/BLL/Xt_BillTypeController.cs @@ -39,22 +39,23 @@ string sql = sql1 + sWhere+ " order by hitemid desc"; ds = oCN.RunProcReturn(sql, "h_v_Xt_BillTypeList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BLL/Xt_SystemLogController.cs b/WebAPI/Controllers/BLL/Xt_SystemLogController.cs index fe7681a..3d71428 100644 --- a/WebAPI/Controllers/BLL/Xt_SystemLogController.cs +++ b/WebAPI/Controllers/BLL/Xt_SystemLogController.cs @@ -39,22 +39,23 @@ string sql = sql1 + sWhere + " order by hid desc"; ds = oCN.RunProcReturn(sql, "h_v_Xt_SystemLogList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BLL/Xt_SystemParameterController.cs b/WebAPI/Controllers/BLL/Xt_SystemParameterController.cs index c3c5247..1a32e5b 100644 --- a/WebAPI/Controllers/BLL/Xt_SystemParameterController.cs +++ b/WebAPI/Controllers/BLL/Xt_SystemParameterController.cs @@ -39,22 +39,23 @@ string sql = sql1 + sWhere+ " order by hitemid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_Proh_v_Xt_SystemParameterListpertyList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BLL/Xt_UserController.cs b/WebAPI/Controllers/BLL/Xt_UserController.cs index 43cf6eb..124559c 100644 --- a/WebAPI/Controllers/BLL/Xt_UserController.cs +++ b/WebAPI/Controllers/BLL/Xt_UserController.cs @@ -36,22 +36,23 @@ string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_IF_UserList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BLL/Xt_UserGroupController.cs b/WebAPI/Controllers/BLL/Xt_UserGroupController.cs index daa2ab8..dba8bcb 100644 --- a/WebAPI/Controllers/BLL/Xt_UserGroupController.cs +++ b/WebAPI/Controllers/BLL/Xt_UserGroupController.cs @@ -39,22 +39,23 @@ string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_System_UserGroup"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BLL/Xt_XtgnbController.cs b/WebAPI/Controllers/BLL/Xt_XtgnbController.cs index ea7902a..728fb24 100644 --- a/WebAPI/Controllers/BLL/Xt_XtgnbController.cs +++ b/WebAPI/Controllers/BLL/Xt_XtgnbController.cs @@ -39,22 +39,23 @@ string sql = sql1 + sWhere+ " order by hitemid desc"; ds = oCN.RunProcReturn(sql, "h_v_Xt_XtgnbList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs index cf358d6..204b3c0 100644 --- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs @@ -49,22 +49,23 @@ string sql = sql1 + sWhere+ " order by 涓嶈壇鍘熷洜浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_IF_BadReasonList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_CheckItemController.cs b/WebAPI/Controllers/BaseSet/Gy_CheckItemController.cs index 96e7835..f8868b1 100644 --- a/WebAPI/Controllers/BaseSet/Gy_CheckItemController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_CheckItemController.cs @@ -51,22 +51,23 @@ string sql = sql1 + sWhere+ " order by 浠g爜"; ds = oCN.RunProcReturn(sql, "h_v_IF_QCCheckItemList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_CurrencyController.cs b/WebAPI/Controllers/BaseSet/Gy_CurrencyController.cs index af7fa64..ddb0f3f 100644 --- a/WebAPI/Controllers/BaseSet/Gy_CurrencyController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_CurrencyController.cs @@ -86,22 +86,23 @@ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); ds = oCN.RunProcReturn("select * from h_v_CurrencyLoadTree", "h_v_CurrencyLoadTree"); - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } diff --git a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs index f3e922e..5f65cea 100644 --- a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs @@ -48,6 +48,7 @@ string sql = sql1 + sWhere + " order by 瀹㈡埛浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_Gy_CustomerList"); } + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; diff --git a/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs b/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs index 6dca5a2..0cade9e 100644 --- a/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs @@ -54,7 +54,6 @@ objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; - } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs b/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs index c517779..151259c 100644 --- a/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs @@ -50,12 +50,12 @@ string sql = sql1 + sWhere + " order by 鑱屽憳浠g爜"; ds = oCN.RunProcReturn(sql, "h_v_IF_EmployeeList"); } + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; - } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_GroupController.cs b/WebAPI/Controllers/BaseSet/Gy_GroupController.cs index 26c7b7f..fd38cb0 100644 --- a/WebAPI/Controllers/BaseSet/Gy_GroupController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_GroupController.cs @@ -50,22 +50,23 @@ string sql = sql1 + sWhere+ " order by 鐝粍浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_GroupList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs index 778181b..d0552e6 100644 --- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs @@ -391,22 +391,23 @@ string sql = sql1 + sWhere + "order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Gy_MouldFileList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { @@ -501,22 +502,23 @@ string sql = sql1 + sWhere + "order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_BarCodeBillList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs b/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs index 390e4ca..475be3f 100644 --- a/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs @@ -43,22 +43,23 @@ return objJsonResult; } ds = oCN.RunProcReturn("select HItemID,HParentID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_MouldType where 1=1 " + sWhere+ " order by HNumber", "Gy_MouldType"); - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳ā娌诲叿鍒嗙被鏁版嵁锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "鏌ユ壘鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_OrderBackInfoController.cs b/WebAPI/Controllers/BaseSet/Gy_OrderBackInfoController.cs index d164727..b8d26b8 100644 --- a/WebAPI/Controllers/BaseSet/Gy_OrderBackInfoController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_OrderBackInfoController.cs @@ -50,22 +50,23 @@ string sql = sql1 + sWhere+ " order by 鍙嶉鐘舵�佷唬鐮�"; ds = oCN.RunProcReturn(sql, "h_v_Gy_OrderBackInfoList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_OrderLevController.cs b/WebAPI/Controllers/BaseSet/Gy_OrderLevController.cs index 815c2cd..4ca1e3a 100644 --- a/WebAPI/Controllers/BaseSet/Gy_OrderLevController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_OrderLevController.cs @@ -51,22 +51,23 @@ string sql = sql1 + sWhere+ " order by 璁㈠崟绛夌骇浠g爜"; ds = oCN.RunProcReturn(sql, "h_v_Gy_OrderLevList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs b/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs index cbaf775..7cb277f 100644 --- a/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs @@ -448,22 +448,23 @@ string sql = sql1 + sWhere+ " order by 宸ュ簭浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_Gy_ProcessList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_PropertyController.cs b/WebAPI/Controllers/BaseSet/Gy_PropertyController.cs index 53348c3..b6b2402 100644 --- a/WebAPI/Controllers/BaseSet/Gy_PropertyController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_PropertyController.cs @@ -48,22 +48,23 @@ string sql = sql1 + sWhere+ " order by 杈呭姪灞炴�т唬鐮�"; ds = oCN.RunProcReturn(sql, "h_v_IF_PropertyList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_QCCheckClassController.cs b/WebAPI/Controllers/BaseSet/Gy_QCCheckClassController.cs index 403bac0..ab437d2 100644 --- a/WebAPI/Controllers/BaseSet/Gy_QCCheckClassController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_QCCheckClassController.cs @@ -51,22 +51,23 @@ string sql = sql1 + sWhere+ " order by 浠g爜"; ds = oCN.RunProcReturn(sql, "h_v_IF_QCCheckClassList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_RoutingGroupController.cs b/WebAPI/Controllers/BaseSet/Gy_RoutingGroupController.cs index 0626e0a..6691b80 100644 --- a/WebAPI/Controllers/BaseSet/Gy_RoutingGroupController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_RoutingGroupController.cs @@ -33,22 +33,23 @@ string sql = "select * from Gy_RoutingGroup where 1 = 1 " + sWhere+ " order by HItemID "; ds = oCN.RunProcReturn(sql, "Gy_RoutingGroup"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_SourceController.cs b/WebAPI/Controllers/BaseSet/Gy_SourceController.cs index 86898e6..4146847 100644 --- a/WebAPI/Controllers/BaseSet/Gy_SourceController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_SourceController.cs @@ -52,22 +52,23 @@ string sql = sql1 + sWhere+ " order by 鐢熶骇璧勬簮浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_IF_SourceList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs index d98853c..30f1fda 100644 --- a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs @@ -48,13 +48,12 @@ string sql = sql1 + sWhere + " order by 渚涘簲鍟嗕唬鐮� "; ds = oCN.RunProcReturn(sql, "h_v_Gy_SupplierList"); } - - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_UnitController.cs b/WebAPI/Controllers/BaseSet/Gy_UnitController.cs index 75becf3..ee5f95b 100644 --- a/WebAPI/Controllers/BaseSet/Gy_UnitController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_UnitController.cs @@ -51,12 +51,12 @@ string sql = sql1 + sWhere + "order by 璁¢噺鍗曚綅浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_Gy_UnitList"); } - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs b/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs index 8f19204..1ebe765 100644 --- a/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs @@ -48,6 +48,7 @@ string sql = sql1 + sWhere + " order by 浠撳簱浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_IF_WareHouseList"); } + //if (ds == null || ds.Tables[0].Rows.Count == 0) //{ // objJsonResult.code = "0"; diff --git a/WebAPI/Controllers/BaseSet/Gy_WorkCenterController.cs b/WebAPI/Controllers/BaseSet/Gy_WorkCenterController.cs index 3979335..5724165 100644 --- a/WebAPI/Controllers/BaseSet/Gy_WorkCenterController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_WorkCenterController.cs @@ -50,22 +50,23 @@ string sql = sql1 + sWhere+ " order by 宸ヤ綔涓績浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_WorkCenterList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Pay_PeriodInfoSetController.cs b/WebAPI/Controllers/BaseSet/Pay_PeriodInfoSetController.cs index 7fd8432..0e3f80e 100644 --- a/WebAPI/Controllers/BaseSet/Pay_PeriodInfoSetController.cs +++ b/WebAPI/Controllers/BaseSet/Pay_PeriodInfoSetController.cs @@ -49,22 +49,23 @@ string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_Pay_PeriodInfoSetList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Xt_DataDictionary_ProcController.cs b/WebAPI/Controllers/BaseSet/Xt_DataDictionary_ProcController.cs index ee2f70f..62e36ad 100644 --- a/WebAPI/Controllers/BaseSet/Xt_DataDictionary_ProcController.cs +++ b/WebAPI/Controllers/BaseSet/Xt_DataDictionary_ProcController.cs @@ -39,22 +39,23 @@ string sql = sql1 + sWhere+ " order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_DataDictionary_Proc"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Xt_DataDictionary_TableController.cs b/WebAPI/Controllers/BaseSet/Xt_DataDictionary_TableController.cs index e328f4c..e478ea5 100644 --- a/WebAPI/Controllers/BaseSet/Xt_DataDictionary_TableController.cs +++ b/WebAPI/Controllers/BaseSet/Xt_DataDictionary_TableController.cs @@ -39,22 +39,23 @@ string sql = sql1 + sWhere+ " order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_DataDictionary_Table"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Xt_DataDictionary_ViewController.cs b/WebAPI/Controllers/BaseSet/Xt_DataDictionary_ViewController.cs index 8d8e6e8..95d5d5b 100644 --- a/WebAPI/Controllers/BaseSet/Xt_DataDictionary_ViewController.cs +++ b/WebAPI/Controllers/BaseSet/Xt_DataDictionary_ViewController.cs @@ -39,22 +39,23 @@ string sql = sql1 + sWhere+ " order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_DataDictionary_View"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs b/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs index a5a2f76..c3041de 100644 --- a/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs +++ b/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs @@ -48,6 +48,7 @@ string sql = sql1 + sWhere + " order by 缁勭粐浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_IF_ORGANIZATIONSList"); } + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBackBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBackBillController.cs index bb6e94b..64290a6 100644 --- a/WebAPI/Controllers/CGGL/Cg_POInStockBackBillController.cs +++ b/WebAPI/Controllers/CGGL/Cg_POInStockBackBillController.cs @@ -89,22 +89,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_POInStockBackBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs index 4be85a5..96fde3d 100644 --- a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs +++ b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs @@ -91,22 +91,23 @@ string sql = sql1 + sWhere+ " order by 鏃ユ湡 desc,hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_POInStockBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs index ac7982c..091dd16 100644 --- a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs +++ b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs @@ -53,23 +53,23 @@ ds = oCN.RunProcReturn(sql + sWhere+ " order by hmainid desc", "h_v_IF_POOrderBillList"); } - if (ds.Tables[0].Rows.Count != 0 || ds != null) - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳暟鎹�"; - objJsonResult.data = null; - return objJsonResult; - } - + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} + } catch (Exception e) { diff --git a/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs b/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs index d0d51c5..e9a1e7a 100644 --- a/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs +++ b/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs @@ -42,22 +42,23 @@ string sql = "select * from h_v_Kf_PurchaseReturnList where 1 = 1 " + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Kf_PurchaseReturnList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/CGGL/Kf_POStockInBackBillController.cs b/WebAPI/Controllers/CGGL/Kf_POStockInBackBillController.cs index 6fc6675..4f07283 100644 --- a/WebAPI/Controllers/CGGL/Kf_POStockInBackBillController.cs +++ b/WebAPI/Controllers/CGGL/Kf_POStockInBackBillController.cs @@ -37,11 +37,23 @@ } ds = oCN.RunProcReturn("select * from h_v_Kf_POStockInBackBillList " + sWhere + " order by 鏃ユ湡 desc", "h_v_Kf_POStockInBackBillList"); + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs index 79519f0..5b7139a 100644 --- a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs +++ b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs @@ -81,22 +81,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Kf_POStockInBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/CGGL/WW_EntrustOrderBillController.cs b/WebAPI/Controllers/CGGL/WW_EntrustOrderBillController.cs index c2ac84a..11301fe 100644 --- a/WebAPI/Controllers/CGGL/WW_EntrustOrderBillController.cs +++ b/WebAPI/Controllers/CGGL/WW_EntrustOrderBillController.cs @@ -60,22 +60,22 @@ //string sql = "select * from h_v_IF_EntrustOrderBillList where 1 = 1 " + sWhere; //ds = oCN.RunProcReturn(sql, "h_v_IF_EntrustOrderBillList"); - if (ds.Tables[0].Rows.Count == 0 || ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犺褰�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs index 60f57c1..93d2b2e 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs @@ -48,22 +48,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_MES_StationEntrustInBillList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs index cb62a03..6ccf188 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs @@ -48,22 +48,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_MES_StationEntrustOutBillList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs index 0d9312d..032d3a2 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs @@ -403,22 +403,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_MES_StationInBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犺褰曪紝璇蜂笌绠$悊鍛樿仈绯伙紒"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs index ae8b871..ac6d135 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs @@ -438,22 +438,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_MES_StationOutBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犺褰曪紒"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/GG_NoticeController.cs b/WebAPI/Controllers/GG_NoticeController.cs index 9bf1001..365de48 100644 --- a/WebAPI/Controllers/GG_NoticeController.cs +++ b/WebAPI/Controllers/GG_NoticeController.cs @@ -39,22 +39,23 @@ //} ds = Get_GG_NoticeBillList(sWhere); - if (ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/GZGL/Gy_DuSubsidyItemBillController.cs b/WebAPI/Controllers/GZGL/Gy_DuSubsidyItemBillController.cs index ea50649..29427d5 100644 --- a/WebAPI/Controllers/GZGL/Gy_DuSubsidyItemBillController.cs +++ b/WebAPI/Controllers/GZGL/Gy_DuSubsidyItemBillController.cs @@ -51,22 +51,23 @@ string sql = sql1 + sWhere+ " order by 鎵hˉ璧勬枡浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_Gy_DuSubsidyItemList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/GZGL/Gy_WorkPayTypeBillController.cs b/WebAPI/Controllers/GZGL/Gy_WorkPayTypeBillController.cs index fd7a666..230388f 100644 --- a/WebAPI/Controllers/GZGL/Gy_WorkPayTypeBillController.cs +++ b/WebAPI/Controllers/GZGL/Gy_WorkPayTypeBillController.cs @@ -50,22 +50,23 @@ string sql = sql1 + sWhere+ " order by 宸ヨ祫绫诲瀷浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_Gy_WorkPayTypeList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/GZGL/Gy_WorkTypeBillController.cs b/WebAPI/Controllers/GZGL/Gy_WorkTypeBillController.cs index 7b51d3f..af2ec3a 100644 --- a/WebAPI/Controllers/GZGL/Gy_WorkTypeBillController.cs +++ b/WebAPI/Controllers/GZGL/Gy_WorkTypeBillController.cs @@ -52,22 +52,23 @@ string sql = sql1 + sWhere+ " order by 宸ョ浠g爜"; ds = oCN.RunProcReturn(sql, "h_v_Gy_WorkTypeList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/Kf_ICStockBillMainController.cs b/WebAPI/Controllers/Kf_ICStockBillMainController.cs index 199d829..c1d9d6b 100644 --- a/WebAPI/Controllers/Kf_ICStockBillMainController.cs +++ b/WebAPI/Controllers/Kf_ICStockBillMainController.cs @@ -43,22 +43,23 @@ string sql = "select * from h_v_IF_Kf_ICStockBillMain where 1 = 1 " + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_Kf_ICStockBillMain"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs index db1a74f..27bb091 100644 --- a/WebAPI/Controllers/LMESController.cs +++ b/WebAPI/Controllers/LMESController.cs @@ -71,22 +71,23 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere+ " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery"); - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { @@ -399,22 +400,22 @@ { try { - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs index 0d4a8ee..bc9577d 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs @@ -47,22 +47,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs index d93e958..aac2550 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs @@ -99,6 +99,7 @@ } ds = Sc_MouldMoveStockStepInBill(sWhere, Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs index 4d9de54..08f4336 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs @@ -99,6 +99,7 @@ } ds = Sc_MouldMoveStockStepOutBill(sWhere,Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git a/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs index 8e397fe..6dd5bbd 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs @@ -99,6 +99,7 @@ } ds = Sc_MouldOtherOutBill(sWhere,Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git a/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs index ffaaa87..9992ce8 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs @@ -39,22 +39,23 @@ } ds = Sc_GetMouldProdInHouseBill(sWhere,Organization); - if (ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs b/WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs index 7379285..60c6fa1 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs @@ -99,6 +99,7 @@ } ds = Sc_GetMouldProdMoveBill(sWhere,Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git a/WebAPI/Controllers/MJGL/Sc_MouldRepairChangeBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldRepairChangeBillController.cs index 9c62045..5c98c51 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldRepairChangeBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldRepairChangeBillController.cs @@ -39,22 +39,23 @@ } ds = Sc_GetMouldRepairChangeHouseBill(sWhere); - if (ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs index 659281b..1e9d0dd 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs @@ -28,32 +28,23 @@ { try { - ds = Sc_GetMouldRepairOutHouseBill(sWhere,Organization); - if (ds == null) + ds = Sc_GetMouldRepairOutHouseBill(sWhere, Organization); + + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldRepairOut_SingleBillList", 1, false, user)) { - //缂栬緫鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldRepairOut_SingleBillList", 1, false, user)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; - objJsonResult.data = null; - return objJsonResult; - } objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; objJsonResult.data = null; return objJsonResult; } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; } catch (Exception ex) { diff --git a/WebAPI/Controllers/MJGL/Sc_MouldScrapInBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldScrapInBillController.cs index d11f1fc..cc86125 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldScrapInBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldScrapInBillController.cs @@ -418,22 +418,23 @@ } ds = Sc_GetMouldScrapInHouseBill(sWhere,Organization); - if (ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/QC_ManagementController.cs b/WebAPI/Controllers/QC_ManagementController.cs index 91fcfda..4cc2c52 100644 --- a/WebAPI/Controllers/QC_ManagementController.cs +++ b/WebAPI/Controllers/QC_ManagementController.cs @@ -29,22 +29,22 @@ { try { - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/QC_POStockInCheckBillController.cs b/WebAPI/Controllers/QC_POStockInCheckBillController.cs index d292a8b..edae5dd 100644 --- a/WebAPI/Controllers/QC_POStockInCheckBillController.cs +++ b/WebAPI/Controllers/QC_POStockInCheckBillController.cs @@ -45,6 +45,7 @@ } ds = QC_POStockInCheckBill(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git a/WebAPI/Controllers/ReportFromController.cs b/WebAPI/Controllers/ReportFromController.cs index 446a30a..e1a30fa 100644 --- a/WebAPI/Controllers/ReportFromController.cs +++ b/WebAPI/Controllers/ReportFromController.cs @@ -152,24 +152,24 @@ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 } - if (ds.Tables[4].Rows.Count > 0) - { - objJsonResult.code = "1"; - objJsonResult.count = ds.Tables[3].Rows.Count; - objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; - objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[4], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 - objJsonResult.list = columnNameList; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; - objJsonResult.data = null; - objJsonResult.list = columnNameList; - return objJsonResult; - } + //if (ds.Tables[4].Rows.Count > 0) + //{ + objJsonResult.code = "1"; + objJsonResult.count = ds.Tables[3].Rows.Count; + objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; + objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[4], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 + objJsonResult.list = columnNameList; + return objJsonResult; + //} + //else + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; + // objJsonResult.data = null; + // objJsonResult.list = columnNameList; + // return objJsonResult; + //} } catch (Exception e) { @@ -265,24 +265,24 @@ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 } - if (ds.Tables[1].Rows.Count > 0) - { - objJsonResult.code = "1"; - objJsonResult.count = ds.Tables[0].Rows.Count; - objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; - objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[1], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 - objJsonResult.list = columnNameList; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; - objJsonResult.data = null; - objJsonResult.list = columnNameList; - return objJsonResult; - } + //if (ds.Tables[1].Rows.Count > 0) + //{ + objJsonResult.code = "1"; + objJsonResult.count = ds.Tables[0].Rows.Count; + objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; + objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[1], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 + objJsonResult.list = columnNameList; + return objJsonResult; + //} + //else + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; + // objJsonResult.data = null; + // objJsonResult.list = columnNameList; + // return objJsonResult; + //} } catch (Exception e) { @@ -378,24 +378,24 @@ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 } - if (ds.Tables[1].Rows.Count > 0) - { - objJsonResult.code = "1"; - objJsonResult.count = ds.Tables[0].Rows.Count; - objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; - objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[1], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 - objJsonResult.list = columnNameList; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳暟鎹紒"; - objJsonResult.data = null; - objJsonResult.list = columnNameList; - return objJsonResult; - } + //if (ds.Tables[1].Rows.Count > 0) + //{ + objJsonResult.code = "1"; + objJsonResult.count = ds.Tables[0].Rows.Count; + objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; + objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[1], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 + objJsonResult.list = columnNameList; + return objJsonResult; + //} + //else + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳暟鎹紒"; + // objJsonResult.data = null; + // objJsonResult.list = columnNameList; + // return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs index a1f31ee..ef10199 100644 --- a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs +++ b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs @@ -45,22 +45,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Gy_EquipFileMainList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏆傛棤鏁版嵁锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs b/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs index 59b8d23..5212abd 100644 --- a/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs +++ b/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs @@ -38,22 +38,23 @@ } ds = oCN.RunProcReturn("select HItemID,HParentID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_EquipFileType where 1=1 " + sWhere+ " order by HItemID ", "Gy_EquipFileType"); - if (ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犺褰曪紝璇蜂笌绠$悊鍛樿仈绯伙紒"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs index 1cb308f..f9afe77 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs @@ -46,28 +46,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } - //ds = Sb_EquipDotCheckBillList_s(sWhere); - //objJsonResult.code = "1"; - //objJsonResult.count = 1; - //objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - //objJsonResult.data = ds.Tables[0]; + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs index 42919f3..245bd93 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs @@ -43,28 +43,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } - //ds = Sb_EquipDotCheckPlanBillList_s(sWhere); - //objJsonResult.code = "1"; - //objJsonResult.count = 1; - //objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - //objJsonResult.data = ds.Tables[0]; + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs index 0a4fd5c..e63541b 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs @@ -46,22 +46,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs index e3c8d30..e394350 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs @@ -47,22 +47,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipMaintain"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs index 3474a8c..302afc7 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs @@ -43,22 +43,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipMaintainPlan"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs index f145840..5da67af 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs @@ -45,22 +45,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs index 9c07a28..f33336d 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs @@ -46,19 +46,22 @@ ds = oCN.RunProcReturn(sql + sWhere+ " order by hmainid desc ", "h_v_Sb_EquipRepairSendWorkBillList"); } - if (ds.Tables[0].Rows.Count == 0 || ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犺褰�"; - objJsonResult.data = null; - return objJsonResult; - } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ objJsonResult.code = "1"; objJsonResult.count = ds.Tables[0].Rows.Count; - objJsonResult.Message = "Sucess"; + objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs b/WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs index cfc5238..851f08f 100644 --- a/WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs +++ b/WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs @@ -325,22 +325,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc "; ds = oCN.RunProcReturn(sql, "h_v_QC_LastPieceCheckBillListDetail"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs b/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs index 4ec0dd6..7d36d09 100644 --- a/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs +++ b/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs @@ -53,22 +53,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc "; ds = oCN.RunProcReturn(sql, "h_v_QC_OutCompCheckBillList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/SCGL/Sc_ICBomBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICBomBillController.cs index fb4e598..1841ada 100644 --- a/WebAPI/Controllers/SCGL/Sc_ICBomBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_ICBomBillController.cs @@ -50,11 +50,22 @@ ds = oCN.RunProcReturn(sql, "h_v_Gy_ICBomBillList"); } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs index 5cc245d..e751558 100644 --- a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs @@ -55,13 +55,24 @@ string sql = sql1 + sWhere+ " order by hmainid desc "; ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOReportBillList_Edit"); } - - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} + } catch (Exception e) { diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs index 0250992..c1ee855 100644 --- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs @@ -384,22 +384,23 @@ } ds = Get_TransFerBillList(sWhere); - if (ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs b/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs index 2e52840..643d544 100644 --- a/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs @@ -51,22 +51,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc "; ds = oCN.RunProcReturn(sql, "h_v_IF_PPBomBillList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/SCGL/Sc_PackUnionBillController.cs b/WebAPI/Controllers/SCGL/Sc_PackUnionBillController.cs index a78b4e7..c455094 100644 --- a/WebAPI/Controllers/SCGL/Sc_PackUnionBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_PackUnionBillController.cs @@ -78,24 +78,24 @@ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 } - if (ds.Tables[0].Rows.Count > 0) - { - objJsonResult.code = "1"; - objJsonResult.count = count; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 - objJsonResult.list = columnNameList; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏆傛棤璁板綍锛�"; - objJsonResult.data = null; - objJsonResult.list = columnNameList; - return objJsonResult; - } + //if (ds.Tables[0].Rows.Count > 0) + //{ + objJsonResult.code = "1"; + objJsonResult.count = count; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 + objJsonResult.list = columnNameList; + return objJsonResult; + //} + //else + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏆傛棤璁板綍锛�"; + // objJsonResult.data = null; + // objJsonResult.list = columnNameList; + // return objJsonResult; + //} } catch (Exception ex) { @@ -268,6 +268,7 @@ try { ds = oCn.RunProcReturn("select * from h_v_Sc_StationInBillListMain"+sWhere+ "order by hmainid desc", "h_v_Sc_StationInBillListMain"); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git a/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs b/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs index 80b9842..8ac14d5 100644 --- a/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs @@ -46,22 +46,23 @@ string sql = "select * from h_v_IF_ProductionReturnList where 1 = 1 " + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_ProductionReturnList"); } - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git a/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs b/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs index 267002a..bed3260 100644 --- a/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs +++ b/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs @@ -45,15 +45,12 @@ } ds = Sb_EquipRepairWorkBill_s(sWhere); - - - - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; } catch (Exception ex) { @@ -106,12 +103,12 @@ } ds = Sb_EquipRepairCheckWorkBill_s(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; - } catch (Exception ex) { @@ -164,6 +161,7 @@ } ds = Sb_EqpConkBookBillList_s(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs index 3357553..c5f7462 100644 --- a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs +++ b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs @@ -4229,6 +4229,7 @@ } ds = Sc_MouldRepairInBillList(sWhere,Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git a/WebAPI/Controllers/Sc_GroupOrderBillController.cs b/WebAPI/Controllers/Sc_GroupOrderBillController.cs index 2005a41..1422d69 100644 --- a/WebAPI/Controllers/Sc_GroupOrderBillController.cs +++ b/WebAPI/Controllers/Sc_GroupOrderBillController.cs @@ -56,22 +56,23 @@ sql += sql2; ds = oCN.RunProcReturn(sql, "h_v_GroupOrderBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳暟鎹紒"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) diff --git a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs index 4a8cc43..e053b18 100644 --- a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs +++ b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs @@ -98,6 +98,7 @@ } ds = Sc_MouldOtherInBill(sWhere, Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs index 590e089..a6a6aad 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs @@ -197,22 +197,23 @@ } ds = Sc_MouldMaintainBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -266,22 +267,23 @@ } ds = Sc_MouldDotCheckPlanBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -321,22 +323,23 @@ return objJsonResult; } ds = Sc_MouldDotCheckBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -427,22 +430,23 @@ } ds = Sc_MouldMaintainPlanBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -484,6 +488,7 @@ } ds = Sc_MouldConkBookBillList_s(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; @@ -542,6 +547,7 @@ } ds = Sc_MouldRepairCheckBillList_s(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -657,22 +663,23 @@ } ds = Sc_MouldRepairWorkBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -830,22 +837,23 @@ string sql = "select * from h_v_IF_MoveStockBillList where 1=1 " + sWhere+ "order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_MoveStockBillList"); } - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -878,22 +886,23 @@ } ds = Sc_GetSellOutBillList(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -991,22 +1000,22 @@ ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherOutBillList"); } - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -1148,22 +1157,23 @@ string sql = "select * from h_v_IF_ProductInBillList where 1 = 1 " + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_ProductInBillList"); } - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -1237,22 +1247,23 @@ string sql = "select * from h_v_Kf_OtherInBillList where 1 = 1 " + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherInBillList"); } - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -1292,22 +1303,23 @@ string sql = "select * from h_v_Kf_EntrustInBillList where 1 = 1 " + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Kf_EntrustInBillList"); } - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -3979,6 +3991,7 @@ } ds = Sc_GetMouldScrapOutHouseBill(sWhere, Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -4554,6 +4567,7 @@ } ds = Sc_GetMouldProdBackBill(sWhere, Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -4992,6 +5006,7 @@ } ds = Sc_GetMouldProdOutBill(sWhere, Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -5464,6 +5479,7 @@ } ds = Sc_GetMouldLifeChangeBill(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git a/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs b/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs index dbca833..87ed716 100644 --- a/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs @@ -48,22 +48,22 @@ ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldRepairSendWorkBill"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs index 9ac11d2..b0a8e5a 100644 --- a/WebAPI/Controllers/Sc_ProcessMangementController.cs +++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs @@ -31,22 +31,22 @@ { try { - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs index 7709119..df22e67 100644 --- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs @@ -89,22 +89,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_SeOrderBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs index 0b29c64..eb34030 100644 --- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs @@ -51,22 +51,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_SeOutStockBackBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs index db24e1a..bd3e253 100644 --- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs @@ -90,22 +90,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_SeOutStockBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\345\247\224\345\244\226\347\224\250\346\226\231/WW_PPBomBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\345\247\224\345\244\226\347\224\250\346\226\231/WW_PPBomBillController.cs" index b5895d4..d10b1d1 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\345\247\224\345\244\226\347\224\250\346\226\231/WW_PPBomBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\345\247\224\345\244\226\347\224\250\346\226\231/WW_PPBomBillController.cs" @@ -37,22 +37,23 @@ } ds = WW_PPBomBillList(sWhere); - if (ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\211\253\347\240\201\345\274\202\345\270\270\350\256\260\345\275\225/KF_PonderationBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\211\253\347\240\201\345\274\202\345\270\270\350\256\260\345\275\225/KF_PonderationBillController.cs" index b5c1512..11a9e5f 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\211\253\347\240\201\345\274\202\345\270\270\350\256\260\345\275\225/KF_PonderationBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\211\253\347\240\201\345\274\202\345\270\270\350\256\260\345\275\225/KF_PonderationBillController.cs" @@ -34,24 +34,25 @@ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 } - if (ds.Tables[0].Rows.Count > 0) - { - objJsonResult.code = "1"; - objJsonResult.count = ds.Tables[0].Rows.Count; - objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; - objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 - objJsonResult.list = columnNameList; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; - objJsonResult.data = null; - objJsonResult.list = columnNameList; - return objJsonResult; - } + // if (ds.Tables[0].Rows.Count > 0) + //{ + objJsonResult.code = "1"; + objJsonResult.count = ds.Tables[0].Rows.Count; + objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; + objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 + objJsonResult.list = columnNameList; + return objJsonResult; + //} + //else + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; + // objJsonResult.data = null; + // objJsonResult.list = columnNameList; + // return objJsonResult; + //} + } catch (Exception e) { diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs" index a43fdfd..6b331dc 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs" @@ -61,24 +61,25 @@ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 } - if (ds.Tables[0].Rows.Count > 0) - { - objJsonResult.code = "1"; - objJsonResult.count = ds.Tables[0].Rows.Count; - objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; - objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 - objJsonResult.list = columnNameList; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; - objJsonResult.data = null; - objJsonResult.list = columnNameList; - return objJsonResult; - } + //if (ds.Tables[0].Rows.Count > 0) + //{ + objJsonResult.code = "1"; + objJsonResult.count = ds.Tables[0].Rows.Count; + objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; + objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 + objJsonResult.list = columnNameList; + return objJsonResult; + //} + //else + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; + // objJsonResult.data = null; + // objJsonResult.list = columnNameList; + // return objJsonResult; + //} + } catch (Exception e) { diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\272\223\345\255\230/KF_ICInventoryList_WMSBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\272\223\345\255\230/KF_ICInventoryList_WMSBillController.cs" index 614c585..1178716 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\272\223\345\255\230/KF_ICInventoryList_WMSBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\272\223\345\255\230/KF_ICInventoryList_WMSBillController.cs" @@ -51,24 +51,24 @@ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 } - if (ds.Tables[0].Rows.Count > 0) - { - objJsonResult.code = "1"; - objJsonResult.count =int.Parse(ds.Tables[0].Rows[0]["鎬绘暟"].ToString()); - objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; - objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 - objJsonResult.list = columnNameList; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; - objJsonResult.data = null; - objJsonResult.list = columnNameList; - return objJsonResult; - } + //if (ds.Tables[0].Rows.Count > 0) + //{ + objJsonResult.code = "1"; + objJsonResult.count = int.Parse(ds.Tables[0].Rows[0]["鎬绘暟"].ToString()); + objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; + objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 + objJsonResult.list = columnNameList; + return objJsonResult; + //} + //else + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; + // objJsonResult.data = null; + // objJsonResult.list = columnNameList; + // return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\350\260\203\346\213\250\347\233\230\347\202\271/Kf_MoveStockRequestBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\350\260\203\346\213\250\347\233\230\347\202\271/Kf_MoveStockRequestBillController.cs" index 14da924..66780e3 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\350\260\203\346\213\250\347\233\230\347\202\271/Kf_MoveStockRequestBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\350\260\203\346\213\250\347\233\230\347\202\271/Kf_MoveStockRequestBillController.cs" @@ -42,22 +42,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCn.RunProcReturn(sql, "h_v_IF_MoveStockRequestBillList_Litee"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBackBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBackBillController.cs" index d1b7c34..46e209e 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBackBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBackBillController.cs" @@ -47,22 +47,23 @@ string sql = "select * from h_v_IF_MateOutBackBillList " + sWhere+ " order by hmainid desc"; ds = oCn.RunProcReturn(sql, "h_v_IF_MateOutBackBillList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBillController.cs" index 624657a..10da004 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBillController.cs" @@ -39,11 +39,23 @@ } ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBillList " + sWhere + " order by hmainid desc", "h_v_IF_MateOutBillList"); + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs" index a9e71d8..9779566 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs" @@ -43,22 +43,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCn.RunProcReturn(sql, "h_v_Kf_MoveStockStepOutBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_EntrustOutBackBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_EntrustOutBackBillController.cs" index f88ff23..ca9a6c1 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_EntrustOutBackBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_EntrustOutBackBillController.cs" @@ -37,11 +37,23 @@ try { ds = oCn.RunProcReturn("select * from h_v_Kf_EntrustOutBillList " + sWhere + " order by hmainid desc", "h_v_Kf_EntrustOutBillList"); + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs" index 7f6e5fc..121e894 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs" @@ -43,22 +43,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCn.RunProcReturn(sql, "h_v_Kf_MoveStockStepInBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" index e14d9db..14414ac 100644 --- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" +++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" @@ -454,22 +454,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc "; ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBillListDetail"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonBillController.cs" index 26f0069..8917655 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonBillController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonBillController.cs" @@ -37,22 +37,23 @@ } ds = Sc_GetConkReasonBill(sWhere); - if (ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs" index 3a45766..562e9ca 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs" @@ -38,22 +38,23 @@ return objJsonResult; } ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_DotCheck where 1=1 " + sWhere+ " order by HNumber", "Gy_DotCheck"); - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犱繚鍏婚」鐩暟鎹紒"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "鏌ユ壘鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainBillController.cs" index 54d01e1..83f8087 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainBillController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainBillController.cs" @@ -37,22 +37,23 @@ return objJsonResult; } ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_Maintain where 1=1 " + sWhere+ " order by HNumber", "Gy_Maintain"); - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犱繚鍏婚」鐩暟鎹紒"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "鏌ユ壘鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairBillController.cs" index 02c13b2..42a43aa 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairBillController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairBillController.cs" @@ -37,22 +37,23 @@ return objJsonResult; } ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_Repair where 1=1 " + sWhere+ " order by HNumber", "Gy_Repair"); - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犱繚鍏婚」鐩暟鎹紒"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "鏌ユ壘鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckBillController.cs" index 2262199..9d9ee28 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckBillController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckBillController.cs" @@ -37,22 +37,23 @@ return objJsonResult; } ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_RepairCheck where 1=1 " + sWhere+ " order by HNumber", "Gy_RepairCheck"); - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犱繚鍏婚」鐩暟鎹紒"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "鏌ユ壘鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" index 9de8786..5716849 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" @@ -26,22 +26,23 @@ try { ds = StockCheckItemList(sWhere); - if (ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { @@ -272,7 +273,8 @@ } ds = oCN.RunProcReturn(sql, "Sc_MouldStockBillMain_Temp"); list.Add(ds.Tables[0]); - objJsonResult.code = "0"; + + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; objJsonResult.list = list; @@ -297,22 +299,23 @@ try { ds = MouldStockBillMainTemp(sWhere); - if (ds == null) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception ex) { 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 57fd32f..37a8953 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" @@ -36,22 +36,23 @@ } ds = oCN.RunProcReturn("select * from h_v_Gy_ProcPriceList where 1 = 1 " + sWhere, "h_v_Gy_ProcPriceList"); - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjBillController.cs" index 23c2745..6cf86c6 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjBillController.cs" @@ -49,22 +49,23 @@ string sql = sql1 + sWhere+ " order by 鏍哥畻鏂瑰紡浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_Gy_ClassTimePrjList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs" index e70a4e6..f031b62 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs" @@ -48,22 +48,23 @@ string sql = sql1 + sWhere+ " order by HInterID desc"; ds = oCN.RunProcReturn(sql, "h_v_Gy_ClassTimePrjSubList"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs" index cf877a2..a4e787c 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs" @@ -40,7 +40,9 @@ objJsonResult.data = null; return objJsonResult; } + ds = Sc_GetGroupEmpBill(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" index 176155f..3a64eb2 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" @@ -43,6 +43,7 @@ } ds = Sc_GetGroupBalBill(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs" index 5eb3289..a4c0f83 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs" @@ -43,6 +43,7 @@ return objJsonResult; } ds = Sc_GetOtherBalBill(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs" index 6d7afc7..da27308 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs" @@ -43,6 +43,7 @@ return objJsonResult; } ds = Sc_GetSingleBalBill(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs" index 47c772d..1863046 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs" @@ -44,6 +44,7 @@ return objJsonResult; } ds = Sc_GetWorkTimesBill(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" index 6658002..669818b 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" @@ -55,6 +55,7 @@ } ds = Sc_GetMESBeginStepWorkBill(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESEndStepWorkBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESEndStepWorkBillController.cs" index 91b8c52..8c2a49e 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESEndStepWorkBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESEndStepWorkBillController.cs" @@ -45,6 +45,7 @@ } ds = Sc_GetMESEndWorkBill(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESReturnStepWorkBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESReturnStepWorkBillController.cs" index c897f26..4e7ab44 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESReturnStepWorkBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESReturnStepWorkBillController.cs" @@ -40,6 +40,7 @@ { ds = Sc_GetMESReturnStepWorkBill(sWhere); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESStopStepWorkBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESStopStepWorkBillController.cs" index 1e88005..a277c72 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESStopStepWorkBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESStopStepWorkBillController.cs" @@ -54,6 +54,7 @@ string sql = sql1 + sWhere+ " order by hmainid desc "; ds = oCN.RunProcReturn(sql, "h_v_Sc_MESStopWorkBillList_NEW"); } + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MaterToSourceStepBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MaterToSourceStepBillController.cs" index fb537be..4f5a663 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MaterToSourceStepBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MaterToSourceStepBillController.cs" @@ -58,22 +58,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc "; ds = oCN.RunProcReturn(sql, "h_v_Sc_MaterToSourceBillMain"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "鏌ヨ鏁版嵁鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_QualityReportStepBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_QualityReportStepBillController.cs" index 628b611..4b95cbe 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_QualityReportStepBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_QualityReportStepBillController.cs" @@ -50,22 +50,23 @@ string sql = sql1 + sWhere+ " order by hmainid desc "; ds = oCN.RunProcReturn(sql, "h_v_Sc_QualityReportBillListDetail"); } - 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; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { -- Gitblit v1.9.1