From cb98f3abf09cb75bf1328c42745f3be8cd9d9374 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 17 五月 2024 08:04:43 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs | 98 ++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 84 insertions(+), 14 deletions(-)
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
index 5545e83..b5fb9f7 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
@@ -15,7 +15,8 @@
public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
public DAL.ClsSb_EquipDotCheckBill BillNew = new DAL.ClsSb_EquipDotCheckBill(); //瀵瑰簲鍗曟嵁绫�
- public DAL.ClsSb_EquipDotCheckBill BillOld = new DAL.ClsSb_EquipDotCheckBill(); //瀵瑰簲鍗曟嵁绫�
+ public DAL.ClsSb_EquipDotCheckBill BillOld = new DAL.ClsSb_EquipDotCheckBill(); //瀵瑰簲鍗曟嵁绫�
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); //鑾峰彇绯荤粺鍙傛暟
#region 璁惧鐐规璁板綍琛�
@@ -38,15 +39,34 @@
objJsonResult.data = null;
return objJsonResult;
}
- if (sWhere == null || sWhere.Equals(""))
+
+ string sReturn = "";
+ string HViewName = "h_v_Sb_EquipDotCheckBillList";//瑙嗗浘鍛藉悕
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
{
- ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckBillList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipDotCheckBillList");
+ if (oSystemParameter.omodel.WMS_CampanyName == "涔濊彵")
+ {
+ HViewName = "h_v_Sb_EquipDotCheckBillMainList";
+ }
}
else
{
- string sql1 = "select * from h_v_Sb_EquipDotCheckBillList where 1 = 1";
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁璇诲彇澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from " + HViewName + " " + sWhere + " order by hmainid desc", HViewName);
+ }
+ else
+ {
+ string sql1 = "select * from " + HViewName + " " + " where 1 = 1";
string sql = sql1 + sWhere + " order by hmainid desc";
- ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList");
+ ds = oCN.RunProcReturn(sql, HViewName);
}
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
@@ -362,7 +382,7 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
if (sqlWhere == null || sqlWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 as HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart ,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜虹紪鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckBillList", "h_v_Sb_EquipDotCheckBillList");
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckBill_Edit", "h_v_Sb_EquipDotCheckBill_Edit");
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
@@ -370,9 +390,9 @@
}
else
{
- string sql1 = "select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 as HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜虹紪鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckBillList where 1 = 1 ";
+ string sql1 = "select * from h_v_Sb_EquipDotCheckBill_Edit where 1 = 1 ";
string sql = sql1 + sqlWhere;
- ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList");
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBill_Edit");
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
@@ -391,13 +411,8 @@
#endregion
-
-
-
#endregion
-
- #region 璁惧鐐规璁板綍鍗昉DA
#region 鏍规嵁璁惧鏉$爜鏌ユ壘璁惧妗f淇℃伅PDA
[Route("Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown")]
@@ -732,7 +747,62 @@
}
#endregion
- #endregion
+ #region 璁惧鐐规閫炬湡棰勮鎶ヨ〃
+ [Route("Sb_EquipDotCheckWarning/Report")]
+ [HttpGet]
+ public object Report(string HYear,string HMonth,string HEquipTypeID, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //if (!DBUtility.ClsPub.Security_Log("Gy_EquipFileList", 1, false, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ if (HYear == null || HYear.Equals("") || HMonth == null || HMonth.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤锛屾湀浠�";
+ objJsonResult.data = "";
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ string sql = "exec h_p_Sb_EquipDotCheckWarningReport " + HYear + "," + HMonth + "," + HEquipTypeID;
+ ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipDotCheckWarningReport");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1