From 651e4f2636040ae33d984b1b8e143c31f4ad314a Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 31 八月 2023 13:44:27 +0800
Subject: [PATCH] 完善项目管理模块
---
WebAPI/Service/LuBaoSevice.cs | 252 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 249 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Service/LuBaoSevice.cs b/WebAPI/Service/LuBaoSevice.cs
index 98c4fd1..a9a261b 100644
--- a/WebAPI/Service/LuBaoSevice.cs
+++ b/WebAPI/Service/LuBaoSevice.cs
@@ -11,7 +11,7 @@
{
/// <summary>
- /// 鎵爜鏂规硶
+ /// 宸ュ簭姹囨姤鎵爜鏂规硶
/// </summary>
public static ApiResult<DataSet> GetHbarCodeDetail(string sBillBarCode)
{
@@ -27,7 +27,28 @@
public static DataSet GetBarCodeDb(string billBarCode)
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessSendWorkList where 鍗曟嵁鍙�= '" + billBarCode + "'", "h_v_Sc_ProcessSendWorkList");
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessSendWorkList where HBillType='3712' and 鍗曟嵁鍙�= '" + billBarCode + "'", "h_v_Sc_ProcessSendWorkList");
+ return dataSet;
+ }
+
+ /// <summary>
+ /// 濮斿宸ュ簭姹囨姤鎵爜鏂规硶
+ /// </summary>
+ public static ApiResult<DataSet> WWGetHbarCodeDetail(string sBillBarCode)
+ {
+ if (string.IsNullOrEmpty(sBillBarCode))
+ return new ApiResult<DataSet> { code = -1, msg = "鏉$爜涓嶈兘涓虹┖" };
+ sBillBarCode = sBillBarCode.CompareTo("#") > 0 ? sBillBarCode.Split(Convert.ToChar("#"))[0] : sBillBarCode;
+ var dataSet = WWGetBarCodeDb(sBillBarCode);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄥ澶栨淳宸ュ崟鍙�" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet WWGetBarCodeDb(string billBarCode)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_WW_EntrustProcSendWorkBillList where HBillType='3740' and 鍗曟嵁鍙�= '" + billBarCode + "'", "h_v_WW_EntrustProcSendWorkBillList");
return dataSet;
}
@@ -47,10 +68,235 @@
public static DataSet GetProcDb(string sBillNo, string sProcNo)
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessSendWorkList where 鍗曟嵁鍙�= '" + sBillNo + "' and HprocID='" + sProcNo + "'", "h_v_Sc_ProcessSendWorkList");
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessSendWorkList where HBillType='3712' and 鍗曟嵁鍙�= '" + sBillNo + "' and HprocID='" + sProcNo + "'", "h_v_Sc_ProcessSendWorkList");
return dataSet;
}
+ /// <summary>
+ /// PDA濮斿姹囨姤鍗曞洖杞︽柟娉�
+ /// </summary>
+ public static ApiResult<DataSet> WWGetProcDetail(string sBillNo, string sProcNo)
+ {
+ if (string.IsNullOrEmpty(sBillNo) || string.IsNullOrEmpty(sProcNo))
+ return new ApiResult<DataSet> { code = -1, msg = "鏉$爜鍜屾祦杞崱涓嶈兘涓虹┖" };
+ var dataSet = WWGetProcDb(sBillNo, sProcNo);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "娴佹按鍙锋垨娴佽浆鍗″彿涓虹┖" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet WWGetProcDb(string sBillNo, string sProcNo)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_WW_EntrustProcSendWorkBillList where HBillType='3740' and 鍗曟嵁鍙�= '" + sBillNo + "' and HprocID='" + sProcNo + "'", "h_v_WW_EntrustProcSendWorkBillList");
+ return dataSet;
+ }
+
+
+ /// <summary>
+ /// 妫�楠屾柟妗堟牴鎹甶d鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetCheckProjectDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetProjectDb(HID);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄦ楠屽崟鍙�" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet GetProjectDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_Edit_QCCheckProjectList where hmainid= " + HID +" ", "h_v_Gy_Edit_QCCheckProjectList");
+ return dataSet;
+ }
+
+
+ /// <summary>
+ /// 鏉ユ枡妫�楠屾牴鎹甶d鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetPOStockInCheckBillDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetPOStockInDb(HID);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄦ潵鏂欐楠屽崟鍙�" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet GetPOStockInDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_Edit_POStockInCheckBillList where hmainid= " + HID + " ", "h_v_QC_Edit_POStockInCheckBillList");
+ return dataSet;
+ }
+
+
+ /// <summary>
+ /// 棣栨枡妫�楠屾牴鎹甶d鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetQC_FirstPieceCheckBillDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetFirstPieceCheckDb(HID);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄩ鏂欐楠屽崟鍙�" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet GetFirstPieceCheckDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_Edit_FirstPieceCheckBillList where hmainid= " + HID + " ", "h_v_QC_Edit_FirstPieceCheckBillList");
+ return dataSet;
+ }
+
+ /// <summary>
+ /// 宸℃鍗曟牴鎹甶d鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetQC_PatrolProcCheckBillDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetPatrolProcCheckDb(HID);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄥ贰妫�鍗曞彿" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet GetPatrolProcCheckDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_Edit_PatrolProcCheckBillList where hmainid= " + HID + " ", "h_v_QC_Edit_PatrolProcCheckBillList");
+ return dataSet;
+ }
+
+
+ /// <summary>
+ /// 涓嶈壇鍘熷洜鏍规嵁id鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetGy_BadReasonBillDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetGy_BadReasonDb(HID);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄤ笉鑹師鍥犳暟鎹�" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet GetGy_BadReasonDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_IF_Edit_BadReasonList where HItemID= " + HID + " ", "h_v_IF_Edit_BadReasonList");
+ return dataSet;
+ }
+
+
+ /// <summary>
+ /// 璁¢噺鍗曚綅鏍规嵁id鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetGy_UnitBillDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetGy_UnitDb(HID);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄨ閲忓崟浣嶆暟鎹�" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet GetGy_UnitDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Edit_Gy_UnitList where HItemID= " + HID + " ", "h_v_Edit_Gy_UnitList");
+ return dataSet;
+ }
+
+ /// <summary>
+ /// 璐у竵璁剧疆鏍规嵁id鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetGy_CurrencyBillDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetGy_CurrencyDb(HID);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄨ揣甯佽缃暟鎹�" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet GetGy_CurrencyDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Edit_Gy_CurrencyList where HItemID= " + HID + " ", "h_v_Edit_Gy_CurrencyList");
+ return dataSet;
+ }
+
+ /// <summary>
+ /// 鐢熶骇璧勬簮鏍规嵁id鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetGy_SourceBillDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetGy_SourceDb(HID);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄧ敓浜ц祫婧愭暟鎹�" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet GetGy_SourceDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Edit_IF_SourceList where HItemID= " + HID + " ", "h_v_Edit_IF_SourceList");
+ return dataSet;
+ }
+
+ /// <summary>
+ /// 鑱屽憳璁剧疆鏍规嵁id鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetGy_EmployeeBillDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetGy_EmployeeDb(HID);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄨ亴鍛樿缃暟鎹�" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet GetGy_EmployeeDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Edit_IF_EmployeeList where HItemID= " + HID + " ", "h_v_Edit_IF_EmployeeList");
+ return dataSet;
+ }
+
+
+ /// <summary>
+ /// 鐗╂枡璁剧疆鏍规嵁id鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetGy_MaterialBillDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = Gy_MaterialDb(HID);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄦ鐗╂枡鏁版嵁" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+
+ public static DataSet Gy_MaterialDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Edit_Gy_MaterialList where HItemID= " + HID + " ", "h_v_Edit_Gy_MaterialList");
+ return dataSet;
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.1