From cdaf126a48444b9c055f44c7266a7d43343aeb1e Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 24 九月 2024 11:39:21 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/WebAPIController.cs | 1761 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 1,675 insertions(+), 86 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index ad05fa7..54ea8f1 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -8,13 +8,20 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
+using System.Web;
using System.Web.Http;
using WebAPI;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
using WebAPI.Models;
using WebAPI.Service;
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+using SyntacticSugar.constant;
namespace WebAPI.Controllers
{
@@ -81,6 +88,27 @@
}
}
+
+
+ /// <summary>
+ /// 鏍规嵁鏃堕棿鑾峰彇浜ч噺姹囨姤鍗曢泦鍚�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetICMOBillWorkQtyStatus_Tmp")]
+ [HttpGet]
+ public object GetICMOBillWorkQtyStatus_Tmp()
+ {
+ DataSet ds = new DataSet();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds = oCN.RunProcReturn("exec h_p_Sc_TodayWorkQtySumReport", "h_p_Sc_TodayWorkQtySumReport");
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "Sucess锛�";
+ objjson.data = ds.Tables[0];
+ return objjson;
+
+ }
+
[Route("Web/GetMAXNumPDA")]
[HttpGet]
public object GetMAXNumPDA(string HBillType)
@@ -119,7 +147,7 @@
//----------鍒涘缓铏氳〃------------------------
DataTable dt_Main = new DataTable("Json");
dt_Main.Columns.Add("HBillNo", typeof(string));
- dt_Main.Columns.Add("HInterID", typeof(int));
+ dt_Main.Columns.Add("HInterID", typeof(Int64));
//---------鍒涘缓鏂拌------------------------
DataRow dr_main = dt_Main.NewRow();//鍒涘缓鏂拌
dt_Main.Rows.Add(dr_main);//灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
@@ -150,21 +178,21 @@
/// <returns></returns>
[Route("Web/GetMAXNumber")]
[HttpGet]
- public object GetMAXNumber(string HBillType,string HName,string TableName)
+ public object GetMAXNumber(string HBillType, string HName, string TableName)
{
try
{
string HNumber = "";
- HNumber = DBUtility.ClsPub.CreateHNumber(HBillType,HName, TableName, ref DBUtility.ClsPub.sExeReturnInfo, true);
+ HNumber = DBUtility.ClsPub.CreateHNumber(HBillType, HName, TableName, ref DBUtility.ClsPub.sExeReturnInfo, true);
//----------鍒涘缓铏氳〃------------------------
DataTable dt_Main = new DataTable("Json");
dt_Main.Columns.Add("HNumber", typeof(string));
-
+
//---------鍒涘缓鏂拌------------------------
DataRow dr_main = dt_Main.NewRow();//鍒涘缓鏂拌
dt_Main.Rows.Add(dr_main);//灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
dr_main["HNumber"] = DBUtility.ClsPub.isStrNull(HNumber);
-
+
if (HNumber == null)
{
@@ -252,7 +280,7 @@
public object GetUser(string UserName, string PassWord, string HOrgName)
{
try
- {
+ {
DataSet ds = null;
ClsCN oCnLoc = new ClsCN();
DAL.ClsUser oUser = new DAL.ClsUser();
@@ -321,7 +349,7 @@
return objjson;
}
}
- }
+ }
objjson.code = "0";
objjson.count = 1;
objjson.Message = "灞曞紑鎴愬姛锛�";
@@ -474,8 +502,8 @@
// return objJsonResult;
//}
- string sql = "update Gy_Czygl set " +
- "HWhID = " + HWhID +
+ string sql = "update Gy_Czygl set " +
+ "HWhID = " + HWhID +
", HWhName = '" + HWhName +
"', HSecManagerID = " + HSecManagerID +
", HSecManager = '" + HSecManager +
@@ -1289,7 +1317,7 @@
/// <returns></returns>
[Route("Web/GetSouceList_Json")]
[HttpGet]
- public object GetSouceList_Json(string HMaterID,string Value, Int64 HOrgID)
+ public object GetSouceList_Json(string HMaterID, string Value, Int64 HOrgID)
{
sWhere = " and HStopFlag=0 and HUSEORGID =" + HOrgID + "";
if (Value != "" && Value != null)
@@ -1298,7 +1326,7 @@
}
try
{
- string sql = "EXEC h_p_Gy_SouceViewList " + HMaterID+",'"+ sWhere + "'";
+ string sql = "EXEC h_p_Gy_SouceViewList " + HMaterID + ",'" + sWhere + "'";
ds = oCN.RunProcReturn(sql, "h_p_Gy_SouceViewList");
if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -1709,7 +1737,7 @@
string sql1 = "Select HItemID,HNumber ,HName from Gy_SellStyle where HStopflag=0 and HEndFlag=1 ";
string sql = sql1 + sWhere;
ds = oCN.RunProcReturn(sql, "Gy_SellStyle");
- }
+ }
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
@@ -1736,7 +1764,7 @@
objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
objjson.data = null;
return objjson;
- }
+ }
}
/// <summary>
@@ -2948,7 +2976,7 @@
objJsonResult.data = null;
return objJsonResult; ;
}
-
+
oCN.RunProc("delete Gy_ErrType where HItemID=" + HItemID);
oCN.Commit();//鎻愪氦浜嬪姟
@@ -3070,6 +3098,263 @@
return objJsonResult;
}
}
+ #endregion
+
+ #region 寮傚父绫诲瀷 鏂囦欢瀵煎叆淇濆瓨
+ #region 寮傚父绫诲瀷 鏂囦欢涓婁紶
+ [Route("Gy_ErrType/Gy_ErrType_Excel")]
+ [HttpPost]
+ public object Gy_ErrType_Excel()
+ {
+ try
+ {
+ //鑾峰彇鏂囦欢鍚嶇О
+ var file = HttpContext.Current.Request.Files[0];
+ //鑾峰彇鏂囦欢鐗╃悊璺緞
+ string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+ //淇濆瓨鏂囦欢
+ file.SaveAs(ExcelPath);
+
+ NpoiHelper np = new NpoiHelper();
+ DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+ //鍒犻櫎鏂囦欢
+ File.Delete(ExcelPath);
+
+ //鍒涘缓涓存椂琛�
+ DataTable tb2 = new DataTable("dt2");
+
+ //娣诲姞鍒楀悕
+ for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+ {
+ tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+ }
+
+ //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+ tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+ //娣诲姞鏁版嵁
+ for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+ {
+ DataRow row = tb2.NewRow();
+ for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+ {
+ row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+ }
+ tb2.Rows.Add(row);
+ }
+
+
+ var error = "";
+
+ //鏌ヨ宸ヨ壓璺嚎娌℃湁鐨勫垪
+ if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+ error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+ error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("寮傚父绫诲瀷"))
+ error += "娌℃湁鎵惧埌銆愬紓甯哥被鍨嬪悕绉般�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("寮傚父绫诲瀷浠g爜"))
+ error += "娌℃湁鎵惧埌銆愬紓甯哥被鍨嬩唬鐮併�戠殑鏍囬,";
+
+ if (error.Length > 0)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+ {
+ string HProcessName = "";
+ string HProcessNum = "";
+ string HORGNumber = "";
+ string HORGName = "";
+
+
+ HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["寮傚父绫诲瀷"].ToString());
+ HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["寮傚父绫诲瀷浠g爜"].ToString());
+ HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+ HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+ //妫�鏌ョ墿鏂�
+ int index = i + 1;
+
+ if (HORGNumber != "")
+ {
+
+ //鏌ヨ缁勭粐
+ ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ }
+ string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+ //寮傚父绫诲瀷鍚嶇О
+ if (HProcessName == "")
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "绗�" + index + "琛�,寮傚父绫诲瀷鍚嶇О涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //寮傚父绫诲瀷浠g爜
+ if (HProcessNum == "")
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "绗�" + index + "琛�,寮傚父绫诲瀷浠g爜涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = error;
+ objJsonResult.data = tb2;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 寮傚父绫诲瀷椤圭洰 瀵煎叆(淇濆瓨)
+ [Route("Gy_ErrType/Gy_ErrType_btnSave")]
+ [HttpPost]
+ public object Gy_ErrType_btnSave([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string user = sArray[1].ToString();
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+ List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+ foreach (JObject item in Excel)
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ foreach (var itm in item.Properties())
+ {
+ dic.Add(itm.Name, itm.Value.ToString());
+ }
+ list.Add(dic);
+ }
+
+ oCN.BeginTran();
+ int i = 1;
+ foreach (Dictionary<string, string> item in list)
+ {
+ string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+ string HProcessName = item["寮傚父绫诲瀷"].ToString();
+ string HProcessNum = item["寮傚父绫诲瀷浠g爜"].ToString();
+ string HRemark = item["澶囨敞"].ToString();
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(HProcessNum);//鐭唬鐮�
+ if (sShortNumber.Trim() == "")
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ int HEndFlag = 1;//鏈骇鏍囧織
+ int HLevel = DBUtility.ClsPub.GetLevel(HProcessNum); //绛夌骇
+
+
+ if (!DBUtility.ClsPub.AllowNumber(HProcessNum.Trim()))
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from Gy_ErrType where HNumber='" + HProcessNum + "'", "Gy_ErrType");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+
+ oCN.RunProc("Insert into " + "Gy_ErrType" +
+ " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+ ",HLevel,HEndFlag,HStopflag,HRemark,HBarCode,HUSEORGID,HCREATEORGID,HUseFlag) " +
+ " Values('" + HProcessNum + "','" + HProcessName + "','" + "','" + sShortNumber + "'," + 0 +
+ "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + "'," + HOrgID + "," + HOrgID + ",'" + "鏈娴�" + "')");
+ }
+ else
+ {
+ oCN.RunProc("update Gy_ErrType set HUSEORGID=" + HOrgID + ",HRemark='" + HRemark + "' where HNumber='" + HProcessNum + "'");
+ }
+
+ i++;
+ }
+
+ oCN.Commit();
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = "瀵煎叆鎴愬姛!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ LogService.Write(e);
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
#endregion
/// <summary>
@@ -3816,6 +4101,208 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 妫�娴嬪�煎垪琛� 鏂囦欢涓婁紶
+ [Route("Gy_Inspect/Gy_Process_Excel")]
+ [HttpPost]
+ public json Gy_Inspect_Excel()
+ {
+ json res = new json();
+ try
+ {
+ //鑾峰彇鏂囦欢鍚嶇О
+ var file = HttpContext.Current.Request.Files[0];
+ //鑾峰彇鏂囦欢鐗╃悊璺緞
+ string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+ //淇濆瓨鏂囦欢
+ file.SaveAs(ExcelPath);
+
+ NpoiHelper np = new NpoiHelper();
+ DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+ //鍒犻櫎鏂囦欢
+ File.Delete(ExcelPath);
+
+ //鍒涘缓涓存椂琛�
+ DataTable provisional = new DataTable("dt2");
+
+ //娣诲姞鍒楀悕
+ for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+ {
+ provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+ }
+
+ //娣诲姞鏁版嵁
+ for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+ {
+ DataRow row = provisional.NewRow();
+ for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+ {
+ row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+ }
+ provisional.Rows.Add(row);
+ }
+
+ //鍒ゆ柇鍒�
+ string error = JudgmentColumns(provisional);
+ if (error.Length > 0)
+ {
+ res.code = "0";
+ res.count = 0;
+ res.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+ res.data = null;
+ return res;
+ }
+
+ for (int i = 0; i <= provisional.Rows.Count - 1; i++)
+ {
+ string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["妫�娴嬪�间唬鐮�"].ToString());
+ string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["妫�娴嬪�煎悕绉�"].ToString());
+ string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鍔╄鐮�"]);
+ string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["澶囨敞"].ToString());
+ //鑾峰彇鐪熷疄琛屾暟
+ int line = i + 1;
+ }
+
+ res.code = "1";
+ res.count = 1;
+ res.Message = error;
+ res.data = provisional;
+ return res;
+ }
+ catch (Exception e)
+ {
+ res.code = "0";
+ res.count = 0;
+ res.Message = "Exception锛�" + e.ToString();
+ res.data = null;
+ return res;
+ }
+ }
+
+ /// <summary>
+ /// 鍒ゆ柇鍒�
+ /// </summary>
+ /// <param name="provisional"></param>
+ /// <returns></returns>
+ private static string JudgmentColumns(DataTable provisional)
+ {
+ var error = "";
+
+ //鏌ヨ娌℃湁鐨勫垪
+ if (!provisional.Columns.Contains("妫�娴嬪�间唬鐮�"))
+ error += "娌℃湁鎵惧埌銆愭娴嬪�间唬鐮併�戠殑鏍囬,";
+
+ if (!provisional.Columns.Contains("妫�娴嬪�煎悕绉�"))
+ error += "娌℃湁鎵惧埌銆愭娴嬪�煎悕绉般�戠殑鏍囬,";
+ return error;
+ }
+ #endregion
+
+ #region 妫�娴嬪�煎垪琛� 瀵煎叆(淇濆瓨)
+ [Route("Gy_Inspect/Gy_Process_btnSave")]
+ [HttpPost]
+ public object Gy_Inspect_btnSave([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string user = sArray[1].ToString();
+ string organ = sArray[2].ToString();
+
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+ List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+ foreach (JObject item in Excel)
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ foreach (var itm in item.Properties())
+ {
+ dic.Add(itm.Name, itm.Value.ToString());
+ }
+ list.Add(dic);
+ }
+
+ oCN.BeginTran();
+ int i = 1;
+ foreach (Dictionary<string, string> item in list)
+ {
+ string HNumber = item["妫�娴嬪�间唬鐮�"].ToString();
+ string HName = item["妫�娴嬪�煎悕绉�"].ToString();
+ string HHelpCode = item["鍔╄鐮�"];
+ string HRemark = item["澶囨敞"].ToString();
+
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+ if (sShortNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ int HEndFlag = 1;//鏈骇鏍囧織
+ int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+ if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from Gy_InspectValue where HNumber='" + HNumber + "'", "Gy_InspectValue");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+
+ string sql = "insert into Gy_InspectValue (HName,HNumber,HShortNumber,HLevel,HHelpCode,HParentID,HStopflag,HEndFlag,HRemark,HUseFlag, HUSEORGID, HCREATEORGID, HMakeTime,HMakeEmp)" +
+ $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', '鏈娇鐢�', '{organ}', '{organ}', '{System.DateTime.Now.ToString("G")}', '{user}')";
+ oCN.RunProc(sql);
+ }
+ else
+ {
+ oCN.RunProc("update Gy_InspectValue set HName='" + HName + "', HHelpCode='" + HHelpCode + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "'where HNumber='" + HNumber + "'");
+ }
+
+ i++;
+ }
+
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀵煎叆鎴愬姛!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ LogService.Write(e);
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -5237,7 +5724,7 @@
objJsonResult.data = null;
return objJsonResult; ;
}
-
+
oCN.RunProc("delete Gy_PostSkill where HItemID=" + HItemID);
oCN.Commit();//鎻愪氦浜嬪姟
@@ -5584,7 +6071,7 @@
WebAPI.DLL.ClsGy_StockMoveStyle_Ctl oBill = new WebAPI.DLL.ClsGy_StockMoveStyle_Ctl();
List<Model.ClsGy_StockMoveStyle_Model> lsmain = new List<Model.ClsGy_StockMoveStyle_Model>();
msg1 = msg1.Replace("\\", "");
- msg1 = msg1.Replace("\n", "");
+ msg1 = msg1.Replace("\n", "");
lsmain = oListModels.getObjectByJson_Gy_StockMoveStyle(msg1);
foreach (Model.ClsGy_StockMoveStyle_Model oItem in lsmain)
{
@@ -7500,6 +7987,288 @@
}
#endregion
+ #region 宸ヨ壓鍙傛暟鍒嗙被 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
+ /// <summary>
+ /// 宸ヨ壓鍙傛暟鍒嗙被 淇濆瓨
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("SaveGy_TechnologyTypeList")]
+ [HttpPost]
+ public object SaveGy_TechnologyTypeList([FromBody] JObject msg)
+ {
+ DataSet ds;
+ var _value = msg["msg"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg2 = sArray[1].ToString();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_Technology_Edit", 1, false, msg2))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ Int64 HItemID = 0;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鑾峰彇鏈�澶D鍊艰祴鍊�
+ DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_TechnologyParameterClass ", "Gy_TechnologyParameterClass");
+ if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+ {
+ //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+ var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]);
+ maxid += 1;
+ HItemID = maxid;
+ }
+ ListModels oListModels = new ListModels();
+ try
+ {
+ WebAPI.DLL.ClsGy_TechnologyParameterType_Ctl oBill = new WebAPI.DLL.ClsGy_TechnologyParameterType_Ctl();
+ List<Model.ClsGy_TechnologyParameterType_Model> lsmain = new List<Model.ClsGy_TechnologyParameterType_Model>();
+ msg1 = msg1.Replace("\\", "");
+ msg1 = msg1.Replace("\n", "");
+ lsmain = oListModels.getObjectByJson_Gy_TechnologyParameterType(msg1);
+ foreach (Model.ClsGy_TechnologyParameterType_Model oItem in lsmain)
+ {
+ if (oItem.HNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (oItem.HName.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+
+ ds = oCN.RunProcReturn("select * from Gy_TechnologyParameterClass where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_TechnologyParameterClass");
+ if (oItem.HNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鏂板鏃跺垽鏂�
+ if (oItem.HItemID == 0)
+ {
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+ string sParent;
+ sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+ if (sParent.Trim() == "")
+ {
+ oBill.oModel.HParentID = 0;
+ }
+ else
+ {
+ if (oBill.HavParentCode(sParent.Trim(), HItemID))
+ {
+ oBill.oModel.HParentID = oBill.oModel.HItemID;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ }
+ else//缂栬緫鏃跺垽鏂�
+ {
+ //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+ string sParent;
+ sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+ if (sParent.Trim() == "")
+ {
+ oBill.oModel.HParentID = 0;
+ }
+ else
+ {
+ if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+ {
+ oBill.oModel.HParentID = oBill.oModel.HItemID;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ }
+ //寰楀埌鐭唬鐮�
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
+ if (sShortNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+ oItem.HEndFlag = true;//鏈骇鏍囧織
+ oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+ oItem.HMakeEmp = msg2; //鍒涘缓浜�
+
+ oBill.oModel = oItem;
+ }
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.oModel.HItemID == 0)
+ {
+ // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddNew();
+ }
+ else
+ {
+ bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 宸ヨ壓鍙傛暟鍒嗙被鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("DeltetGy_TechnologyType")]
+ [HttpGet]
+ public object DeltetGy_TechnologyType(string HItemID, string user)
+ {
+ DataSet ds;
+ //string ModRightNameCheck = "Sc_ProcessReport_check";
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_Technology_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (string.IsNullOrWhiteSpace(HItemID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HItemID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+ ds = oCN.RunProcReturn("select * from Gy_TechnologyParameterClass where HItemID=" + HItemID, "Gy_TechnologyParameterClass");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+
+
+ oCN.RunProc("delete Gy_TechnologyParameterClass where HItemID=" + HItemID);
+ oCN.Commit();//鎻愪氦浜嬪姟
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏁版嵁鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 宸ヨ壓鍝佸弬鏁板垎绫昏幏鍙栦俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("GetGy_TechnologyTypeDetail")]
+ [HttpGet]
+ public ApiResult<DataSet> GetGy_TechnologyType(string HID)
+ {
+ var model = LuBaoSevice.GetGy_TechnologyType(HID);
+ return model;
+ }
+
+
+ #endregion
+
#region 瀹㈡埛鍒嗙被 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
/// <summary>
/// 瀹㈡埛鍒嗙被 淇濆瓨
@@ -8101,7 +8870,7 @@
ListModels oListModels = new ListModels();
try
{
-
+
WebAPI.DLL.ClsGy_ProjectMoney_Ctl oBill = new WebAPI.DLL.ClsGy_ProjectMoney_Ctl();
List<Model.ClsGy_ProjectMoney_Model> lsmain = new List<Model.ClsGy_ProjectMoney_Model>();
msg1 = msg1.Replace("\\", "");
@@ -8310,7 +9079,7 @@
return objJsonResult;
}
oCN.BeginTran();//寮�濮嬩簨鍔�
-
+
ds = oCN.RunProcReturn("select * from Gy_ProjectMoney where HItemID=" + HItemID, "Gy_ProjectMoney");
if (ds.Tables[0].Rows.Count > 0)
{
@@ -8402,7 +9171,7 @@
ListModels oListModels = new ListModels();
try
{
-
+
WebAPI.DLL.ClsGy_ErrMsgBackType_Ctl oBill = new WebAPI.DLL.ClsGy_ErrMsgBackType_Ctl();
List<Model.ClsGy_ErrMsgBackType_Model> lsmain = new List<Model.ClsGy_ErrMsgBackType_Model>();
msg1 = msg1.Replace("\\", "");
@@ -8660,6 +9429,262 @@
return objJsonResult;
}
}
+ #endregion
+
+ #region 寮傚父鍙嶉绫诲瀷 鏂囦欢瀵煎叆淇濆瓨
+ #region 寮傚父鍙嶉绫诲瀷 鏂囦欢涓婁紶
+ [Route("Gy_ErrMsgBackType/Gy_ErrMsgBackType_Excel")]
+ [HttpPost]
+ public object Gy_ErrMsgBackType_Excel()
+ {
+ try
+ {
+ //鑾峰彇鏂囦欢鍚嶇О
+ var file = HttpContext.Current.Request.Files[0];
+ //鑾峰彇鏂囦欢鐗╃悊璺緞
+ string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+ //淇濆瓨鏂囦欢
+ file.SaveAs(ExcelPath);
+
+ NpoiHelper np = new NpoiHelper();
+ DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+ //鍒犻櫎鏂囦欢
+ File.Delete(ExcelPath);
+
+ //鍒涘缓涓存椂琛�
+ DataTable tb2 = new DataTable("dt2");
+
+ //娣诲姞鍒楀悕
+ for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+ {
+ tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+ }
+
+ //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+ tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+ //娣诲姞鏁版嵁
+ for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+ {
+ DataRow row = tb2.NewRow();
+ for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+ {
+ row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+ }
+ tb2.Rows.Add(row);
+ }
+
+
+ var error = "";
+
+ //鏌ヨ宸ヨ壓璺嚎娌℃湁鐨勫垪
+ if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+ error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+ error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("寮傚父鍙嶉绫诲瀷"))
+ error += "娌℃湁鎵惧埌銆愬紓甯稿弽棣堢被鍨嬪悕绉般�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("寮傚父鍙嶉绫诲瀷浠g爜"))
+ error += "娌℃湁鎵惧埌銆愬紓甯稿弽棣堢被鍨嬩唬鐮併�戠殑鏍囬,";
+
+ if (error.Length > 0)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+ {
+ string HProcessName = "";
+ string HProcessNum = "";
+ string HORGNumber = "";
+ string HORGName = "";
+
+
+ HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["寮傚父鍙嶉绫诲瀷"].ToString());
+ HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["寮傚父鍙嶉绫诲瀷浠g爜"].ToString());
+ HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+ HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+ //妫�鏌ョ墿鏂�
+ int index = i + 1;
+
+ if (HORGNumber != "")
+ {
+
+ //鏌ヨ缁勭粐
+ ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ }
+ string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+ //寮傚父绫诲瀷鍚嶇О
+ if (HProcessName == "")
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "绗�" + index + "琛�,寮傚父鍙嶉绫诲瀷鍚嶇О涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //寮傚父绫诲瀷浠g爜
+ if (HProcessNum == "")
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "绗�" + index + "琛�,寮傚父鍙嶉绫诲瀷浠g爜涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = error;
+ objJsonResult.data = tb2;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 寮傚父鍙嶉椤圭洰 瀵煎叆(淇濆瓨)
+ [Route("Gy_ErrMsgBackType/Gy_ErrMsgBackType_btnSave")]
+ [HttpPost]
+ public object Gy_ErrMsgBackType_btnSave([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string user = sArray[1].ToString();
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+ List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+ foreach (JObject item in Excel)
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ foreach (var itm in item.Properties())
+ {
+ dic.Add(itm.Name, itm.Value.ToString());
+ }
+ list.Add(dic);
+ }
+
+ oCN.BeginTran();
+ int i = 1;
+ foreach (Dictionary<string, string> item in list)
+ {
+ string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+ string HProcessName = item["寮傚父鍙嶉绫诲瀷"].ToString();
+ string HProcessNum = item["寮傚父鍙嶉绫诲瀷浠g爜"].ToString();
+ string HRemark = item["澶囨敞"].ToString();
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(HProcessNum);//鐭唬鐮�
+ if (sShortNumber.Trim() == "")
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ int HEndFlag = 1;//鏈骇鏍囧織
+ int HLevel = DBUtility.ClsPub.GetLevel(HProcessNum); //绛夌骇
+
+
+ if (!DBUtility.ClsPub.AllowNumber(HProcessNum.Trim()))
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from Gy_ErrMsgBackType where HNumber='" + HProcessNum + "'", "Gy_ErrMsgBackType");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ oCN.RunProc("Insert into " + "Gy_ErrMsgBackType " +
+ " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+ ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " +
+ " Values('" + HProcessNum + "','" + HProcessName + "','" + "','" + sShortNumber + "'," + 0 +
+ "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + "鏈娴�" + "','" + user + "','" + HOrgID + "')");
+ }
+ else
+ {
+ oCN.RunProc("update Gy_ErrMsgBackType set HUSEORGID=" + HOrgID + ",HRemark='" + HRemark + "' where HNumber='" + HProcessNum + "'");
+ }
+
+ i++;
+ }
+
+ oCN.Commit();
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = "瀵煎叆鎴愬姛!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ LogService.Write(e);
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
#endregion
#region 涓嶈壇鐜拌薄 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
@@ -9816,7 +10841,7 @@
}
oCN.BeginTran();//寮�濮嬩簨鍔�
-
+
oCN.RunProc("delete Gy_PreventErrMould where HItemID=" + HItemID);
oCN.Commit();//鎻愪氦浜嬪姟
objJsonResult.code = "0";
@@ -10377,6 +11402,368 @@
}
#endregion
+ #region 浼戞伅鏃� 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
+ /// <summary>
+ /// 浼戞伅鏃� 淇濆瓨
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("SaveGy_RestDayList")]
+ [HttpPost]
+ public object SaveGy_RestDayList([FromBody] JObject msg)
+ {
+ DataSet ds;
+ var _value = msg["msg"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg2 = sArray[1].ToString();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_RestDay_Edit", 1, false, msg2))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ Int64 HItemID = 0;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鑾峰彇鏈�澶D鍊艰祴鍊�
+ DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_RestDay ", "Gy_RestDay");
+ if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+ {
+ //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+ var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]);
+ maxid += 1;
+ HItemID = maxid;
+ }
+ ListModels oListModels = new ListModels();
+ try
+ {
+
+ WebAPI.DLL.ClsGy_RestDay_Ctl oBill = new WebAPI.DLL.ClsGy_RestDay_Ctl();
+ List<Model.ClsGy_RestDay_Model> lsmain = new List<Model.ClsGy_RestDay_Model>();
+ msg1 = msg1.Replace("\\", "");
+ msg1 = msg1.Replace("\n", "");
+ lsmain = oListModels.getObjectByJson_Gy_RestDay(msg1);
+ foreach (Model.ClsGy_RestDay_Model oItem in lsmain)
+ {
+ if (oItem.HNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (oItem.HName.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //寰楀埌鐭唬鐮�
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
+ if (sShortNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+ oItem.HEndFlag = true;//鏈骇鏍囧織
+ oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+ oItem.HMakeEmp = msg2; //鍒涘缓浜�
+ DayOfWeek dayOfWeek = oItem.HRestDay.DayOfWeek;
+
+ // 瀹氫箟鏄熸湡鍑犵殑涓枃鏄犲皠鍏崇郴
+ Dictionary<DayOfWeek, string> chineseDayOfWeek = new Dictionary<DayOfWeek, string>
+ {
+ { DayOfWeek.Sunday, "鏄熸湡鏃�" },
+ { DayOfWeek.Saturday, "鏄熸湡鍏�" }
+ };
+
+ // 鑾峰彇涓枃鏄熸湡鍑犲悕绉�
+ oItem.HWeekDay = chineseDayOfWeek[dayOfWeek];
+ oBill.oModel = oItem;
+ }
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.oModel.HItemID == 0)
+ {
+ // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddNew();
+ }
+ else
+ {
+ bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹暟鎹凡瀛樺湪!";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 浼戞伅鏃� 淇濆瓨
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("SaveSumGy_RestDayList")]
+ [HttpPost]
+ public object SaveSumGy_RestDayList([FromBody] JObject msg)
+ {
+ DataSet ds;
+ var _value = msg["msg"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg2 = sArray[1].ToString();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_RestDay_Edit", 1, false, msg2))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ JObject msgObj = JObject.Parse(msg1);
+ string HYear = msgObj["HYear"].ToString();
+ string HNumber1 = msgObj["HDeptNumber"].ToString()+'-' + msgObj["HOrgNumber"].ToString();
+ string HName1 = msgObj["HDeptName"].ToString()+'-'+msgObj["HOrgName"].ToString();
+ string HOrgID = msgObj["HOrgID"].ToString();
+ string HDeptID = msgObj["HDeptID"].ToString();
+ bool HStopflag = bool.Parse(msgObj["HStopflag"].ToString());
+ string HRemark= msgObj["HRemark"].ToString();
+ string HUSEORGID= msgObj["HUSEORGID"].ToString();
+ string HHelpCode= msgObj["HHelpCode"].ToString();
+ string HMakeEmp = msg2; //鍒涘缓浜�
+ bool Sunday = Convert.ToBoolean(msgObj["Sunday"]);
+ bool Saturday = Convert.ToBoolean(msgObj["Saturday"]);
+ List<Tuple<DateTime, string>> sundaysInYear = GetSundaysInYear(Convert.ToInt32(HYear), Sunday, Saturday);
+
+ foreach (var oItem in sundaysInYear)
+ {
+ Int64 HItemID = 0;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鑾峰彇鏈�澶D鍊艰祴鍊�
+ DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_RestDay ", "Gy_RestDay");
+ if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+ {
+ //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+ var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]);
+ maxid += 1;
+ HItemID = maxid;
+ }
+ DateTime HRestDay = oItem.Item1;
+ string HWeekDay = oItem.Item2; // 鑾峰彇鏄熸湡瀛楃涓�
+ string HDate = oItem.Item1.ToString("yyyyMMdd");
+ string HNumber = "";
+ string HName = "";
+ HNumber = HNumber1 + '-' + HDate;
+
+ HName = HName1 + '-' + HDate;
+ //鍏堟煡鐪嬫暟鎹簱鏈夋病鏈�
+ ds = oCN.RunProcReturn("select * from Gy_RestDay where HRestDay='" + HRestDay + "' and HOrgID='" + HOrgID + "' and HDeptID='" + HDeptID + "'", "Gy_RestDay");
+ if (ds.Tables[0].Rows.Count<1)
+ {
+ oCN.RunProc("Insert into Gy_RestDay " +
+ " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+ ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID," +
+ "HOrgID,HDeptID,HRestDay,HWeekDay) " +
+ " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "',''," + 0 +
+ "," + 0 + "," + 0 + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "','" + DateTime.Now + "','" + HUSEORGID + "',' 鏈娴�','" + HMakeEmp + "','" + HUSEORGID + "'" +
+ ",'" + HOrgID.ToString() + "','" + HDeptID.ToString() + "','" + HRestDay.ToString() + "','" + HWeekDay.ToString() + "')");
+ }
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ /// <summary>
+ /// 浼戞伅鏃� 鑾峰彇淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("GetGy_RestDayDetailEdit")]
+ [HttpGet]
+ public ApiResult<DataSet> GetGy_RestDayDetailEdit(string HID)
+ {
+ var model = LuBaoSevice.GetGy_RestDayDetailEdit(HID);
+ return model;
+ }
+
+ /// <summary>
+ /// 浼戞伅鏃� 鑾峰彇淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("GetGy_RestDayDetail")]
+ [HttpGet]
+ public ApiResult<DataSet> GetGy_RestDayDetail(string HName)
+ {
+ var model = LuBaoSevice.GetGy_RestDayDetail(HName);
+ return model;
+ }
+
+ /// <summary>
+ /// 浼戞伅鏃� 鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("DeltetGy_RestDay")]
+ [HttpGet]
+ public object DeltetGy_RestDay(string HItemID, string user)
+ {
+ DataSet ds;
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_RestDay_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (string.IsNullOrWhiteSpace(HItemID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HItemID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+
+ oCN.RunProc("delete Gy_RestDay where HItemID=" + HItemID);
+ oCN.Commit();//鎻愪氦浜嬪姟
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏁版嵁鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ //鑾峰彇涓�骞翠腑鐨勫懆鍏�,鍛ㄦ棩鎴栬�呬袱涓悓鏃惰幏鍙�
+ public List<Tuple<DateTime, string>> GetSundaysInYear(int HYear, bool Sunday,bool Saturday)
+ {
+ List<Tuple<DateTime, string>> Days = new List<Tuple<DateTime, string>>();
+ DateTime startDate = new DateTime(HYear, 1, 1);
+ DateTime endDate = new DateTime(HYear, 12, 31);
+ //鏄熸湡澶╁嬀閫�
+ if (Sunday && !Saturday)
+ {
+ while (startDate <= endDate)
+ {
+ if (startDate.DayOfWeek == DayOfWeek.Sunday)
+ {
+ Days.Add(Tuple.Create(startDate, "鏄熸湡澶�"));
+ }
+ startDate = startDate.AddDays(1);
+ }
+ }
+ //鏄熸湡鍏� 鍕鹃��
+ else if (!Sunday && Saturday)
+ {
+ while (startDate <= endDate)
+ {
+ if (startDate.DayOfWeek == DayOfWeek.Saturday)
+ {
+ Days.Add(Tuple.Create(startDate, "鏄熸湡鍏�"));
+ }
+ startDate = startDate.AddDays(1);
+ }
+ }
+ else if (Sunday && Saturday)
+ {
+ while (startDate <= endDate)
+ {
+ if (startDate.DayOfWeek == DayOfWeek.Saturday || startDate.DayOfWeek == DayOfWeek.Sunday)
+ {
+ string weekdayChinese;
+ if (startDate.DayOfWeek == DayOfWeek.Sunday)
+ {
+ weekdayChinese = "鏄熸湡澶�";
+ Days.Add(Tuple.Create(startDate, weekdayChinese));
+ }
+ else if (startDate.DayOfWeek == DayOfWeek.Saturday)
+ {
+ weekdayChinese = "鏄熸湡鍏�";
+ Days.Add(Tuple.Create(startDate, weekdayChinese));
+ }
+ }
+ startDate = startDate.AddDays(1);
+ }
+ }
+ return Days;
+ }
+
+ //杩斿洖鐨勫瓧娈�
+ public class DayOfWeekInfo
+ {
+ public DateTime Date { get; set; }
+ public string DayOfWeekText { get; set; }
+ }
+ #endregion
+
/// <summary>
/// 鐢ㄥ叧鑱斿伐搴忚幏鍙栦俊鎭�
/// </summary>
@@ -10665,10 +12052,44 @@
return objjson; ;
}
}
-
-
-
#endregion
+
+ /// <summary>
+ /// 鑾峰彇鍩烘湰淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/BaseInfo")]
+ [HttpGet]
+ public object GetBaseInfo()
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("select * from xt_BaseInfo", "xt_BaseInfo");
+ if (ds is null)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "0";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }catch(Exception e)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + e.Message;
+ objjson.data = null;
+ return objjson;
+ }
+ }
/// <summary>
/// 鑾峰彇鑱屽姟鍒楄〃
@@ -11497,7 +12918,7 @@
/// <returns></returns>
[Route("Web/GetSc_ICMOBillListView3")]
[HttpGet]
- public object GetSc_ICMOBillListView3(string ICMOBill, int OrganizationID,int HSourceID)
+ public object GetSc_ICMOBillListView3(string ICMOBill, int OrganizationID, int HSourceID)
{
if (ICMOBill != "")
{
@@ -11552,7 +12973,7 @@
[HttpGet]
public object GetSc_ProcessExchangeBillListView(string ICMOBill, int OrganizationID)
{
- if (ICMOBill != "")
+ if (ICMOBill != "" & ICMOBill != null)
{
sWhere = " where 1=1 and 鍗曟嵁鍙� like '%" + ICMOBill + "%' ";
}
@@ -11561,7 +12982,7 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillList where 1=1 order by 鍗曟嵁鍙� desc,hsubid ", "h_v_Sc_ProcessExchangeBillList");
+ ds = oCN.RunProcReturn(" select * from h_v_Sc_ProcessExchangeBillList where 1=1 and 鏃ユ湡>=DATEADD(MONTH,-2,GETDATE()) order by 鍗曟嵁鍙� desc,hsubid", "h_v_Sc_ProcessExchangeBillList");
}
else
{
@@ -11865,7 +13286,7 @@
/// <returns></returns>
[Route("Web/GetCheckItemByCheckProjectID")]
[HttpGet]
- public object GetCheckItemByCheckProjectID(int CheckProjectID,int HBatchQty)
+ public object GetCheckItemByCheckProjectID(int CheckProjectID, int HBatchQty)
{
if (CheckProjectID <= 0)
{
@@ -11983,19 +13404,24 @@
List<object> list = new List<object>();
DataSet ds2;
DataSet ds1;
- string sql1 = string.Format(@"select t.HMaintainItemID ,m.HNumber HMaintainItemNumber,t.HMaintainItem,t.HMaintainPart,t.HClaim,t.HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark
- from Sc_MouldMaintainRuleBillMain a left join Sc_MouldMaintainRuleBillSub_Item t on a.HInterID=t.HInterID
- left join Gy_Maintain m on m.HItemID=t.HMaintainItemID
- left join Gy_Employee e on e.HItemID=t.HManagerID
- where a.HInterID=" + MouldMaintainRuleID);
- string sql2 = string.Format(@"select b.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName, m.HModel HMaterSpec,b.HUnitID,u.HNumber HUnitNumber,u.HName HUnitName,b.HQty,b.HQtyMust,b.HRemark from Sc_MouldMaintainRuleBillMain a
- left join Sc_MouldMaintainRuleBillSub b on a.HInterID=b.HInterID
- left join h_v_IF_Material m on b.HMaterID=m.HItemID
- left join h_v_IF_Unit u on b.HUnitID=u.HItemID
- where a.HInterID=" + MouldMaintainRuleID);
- ds1 = oCN.RunProcReturn(sql1, "Sc_MouldMaintainRuleBillMain");//淇濆吇
- ds2 = oCN.RunProcReturn(sql2, "Sc_MouldMaintainRuleBillMain");//閰嶄欢
+ // string sql1 = string.Format(@"select t.HMaintainItemID ,m.HNumber HMaintainItemNumber,t.HMaintainItem,t.HMaintainPart,t.HClaim,t.HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark
+ // from Sc_MouldMaintainRuleBillMain a left join Sc_MouldMaintainRuleBillSub_Item t on a.HInterID=t.HInterID
+ // left join Gy_Maintain m on m.HItemID=t.HMaintainItemID
+ // left join Gy_Employee e on e.HItemID=t.HManagerID
+ // where a.HInterID=" + MouldMaintainRuleID);
+
+ // string sql2 = string.Format(@"select b.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName, m.HModel HMaterSpec,b.HUnitID,u.HNumber HUnitNumber,u.HName HUnitName,b.HQty,b.HQtyMust,b.HRemark from Sc_MouldMaintainRuleBillMain a
+ //left join Sc_MouldMaintainRuleBillSub b on a.HInterID=b.HInterID
+ // left join h_v_IF_Material m on b.HMaterID=m.HItemID
+ //left join h_v_IF_Unit u on b.HUnitID=u.HItemID
+ // where a.HInterID=" + MouldMaintainRuleID);
+
+ string sql1 = string.Format(@"select * from h_v_Sc_MouldMaintainRuleBillSub_Item where hmainid=" + MouldMaintainRuleID);
+ string sql2 = string.Format(@"select * from h_v_Sc_MouldMaintainRuleBillSub where hmainid=" + MouldMaintainRuleID);
+
+ ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainRuleBillSub_Item");//淇濆吇
+ ds2 = oCN.RunProcReturn(sql2, "h_v_Sc_MouldMaintainRuleBillSub");//閰嶄欢
list.Add(ds1.Tables[0]);
list.Add(ds2.Tables[0]);
objJsonResult.code = "0";
@@ -12129,19 +13555,22 @@
List<object> list = new List<object>();
DataSet ds2;
DataSet ds1;
- string sql1 = string.Format(@"select t.HMaintainItemID HMaintainItemID,m.HNumber HMaintainItemNumber,t.HMaintainItem HMaintainItem,t.HMaintainPart HMaintainPart,t.HClaim HClaim,t.HManagerID HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark
- from Sb_EquipMaintainRuleBillMain a left join Sb_EquipMaintainRuleBillSub_Item t on a.HInterID=t.HInterID
- left join Gy_Maintain m on m.HItemID=t.HMaintainItemID
- left join Gy_Employee e on e.HItemID=t.HManagerID
- where a.HInterID=" + EquipProjectID);
- string sql2 = string.Format(@"select b.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName,b.HUnitID,u.HNumber HUnitNumber,u.HName HUnitName,b.HQty,b.HRemark from Sb_EquipMaintainRuleBillMain a
- left join Sb_EquipMaintainRuleBillSub b on a.HInterID=b.HInterID
- left join h_v_IF_Material m on b.HMaterID=m.HItemID
- left join h_v_IF_Unit u on b.HUnitID=u.HItemID
- where a.HInterID=" + EquipProjectID);
+ // string sql1 = string.Format(@"select t.HMaintainItemID HMaintainItemID,m.HNumber HMaintainItemNumber,t.HMaintainItem HMaintainItem,t.HMaintainPart HMaintainPart,t.HClaim HClaim,t.HManagerID HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark
+ // from Sb_EquipMaintainRuleBillMain a left join Sb_EquipMaintainRuleBillSub_Item t on a.HInterID=t.HInterID
+ // left join Gy_Maintain m on m.HItemID=t.HMaintainItemID
+ // left join Gy_Employee e on e.HItemID=t.HManagerID
+ // where a.HInterID=" + EquipProjectID);
+ // string sql2 = string.Format(@"select b.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName,b.HUnitID,u.HNumber HUnitNumber,u.HName HUnitName,b.HQty,b.HRemark from Sb_EquipMaintainRuleBillMain a
+ //left join Sb_EquipMaintainRuleBillSub b on a.HInterID=b.HInterID
+ // left join h_v_IF_Material m on b.HMaterID=m.HItemID
+ //left join h_v_IF_Unit u on b.HUnitID=u.HItemID
+ // where a.HInterID=" + EquipProjectID);
- ds1 = oCN.RunProcReturn(sql1, "Sb_EquipMaintainRuleBillMain");//淇濆吇
- ds2 = oCN.RunProcReturn(sql2, "Sc_MouldMaintainRuleBillMain");//閰嶄欢
+ string sql1 = string.Format(@"select * from h_v_Sb_EquipMaintainRuleBillList where HInterID=" + EquipProjectID);
+ string sql2 = string.Format(@"select * from h_v_Sb_EquipMaintainRuleSub where hmainid=" + EquipProjectID);
+
+ ds1 = oCN.RunProcReturn(sql1, "h_v_Sb_EquipMaintainRuleBillList");//淇濆吇
+ ds2 = oCN.RunProcReturn(sql2, "h_v_Sb_EquipMaintainRuleSub");//閰嶄欢
list.Add(ds1.Tables[0]);
list.Add(ds2.Tables[0]);
objJsonResult.code = "0";
@@ -12220,7 +13649,7 @@
/// <returns></returns>
[Route("Web/GetItemByEquipFile")]
[HttpGet]
- public object GetItemByEquipFile(int EquipProjectID,string Type,string HDate)
+ public object GetItemByEquipFile(int EquipProjectID, string Type, string HDate)
{
if (EquipProjectID <= 0)
{
@@ -12258,6 +13687,14 @@
objjson.code = "0";
objjson.count = 0;
objjson.Message = "鑾峰彇澶辫触,鏌ユ棤鏁版嵁" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objjson.code = "0";
+ objjson.count = 1;
+ objjson.Message = "璇ヨ澶囨湁澶氫釜璁″垝鍗曟垨鐐规瑙勭▼,鎵嬪姩閫夌潃" ;
objjson.data = null;
return objjson;
}
@@ -12302,25 +13739,36 @@
switch (Type)
{
case "DJ":
- HView = "h_v_QJ_GetDotCheckItemList";
- break;
+ HView = "h_v_Sc_MouldDotCheckPlanBillList";
+ break;
+ case "BY":
+ HView = "h_v_Sc_MouldMaintainPlanBillList";
+ break;
default:
objjson.code = "0";
objjson.count = 0;
- objjson.Message = "璁惧妯″潡绫诲瀷閿欒锛�";
+ objjson.Message = "妯″叿妯″潡绫诲瀷閿欒锛�";
objjson.data = null;
return objjson;
}
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
//string sql = string.Format(@"select * from " + HView + " where HInterID = " + EquipProjectID);
- string sql = string.Format(@"Exec h_p_Sb_GetCheckItem_PDA '" + MouldProjectID + "','" + Type + "','" + HDate + "'");
+ string sql = string.Format(@"Exec h_p_Sb_GetCheckItemMouldFile_PDA '" + MouldProjectID + "','" + Type + "','" + HDate + "'");
ds = oCN.RunProcReturn(sql, HView);
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objjson.code = "0";
objjson.count = 0;
objjson.Message = "鑾峰彇澶辫触,鏌ユ棤鏁版嵁" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objjson.code = "0";
+ objjson.count = 1;
+ objjson.Message = "璇ユā鍏锋湁澶氫釜璁″垝鍗�,鎵嬪姩閫夌潃";
objjson.data = null;
return objjson;
}
@@ -12361,8 +13809,8 @@
}
try
{
-
- string sql = string.Format(@"select * from h_v_QJ_GetDotCheckItemList where 鐐规璁″垝ID = " + HInterID );
+
+ string sql = string.Format(@"select * from h_v_QJ_GetDotCheckItemList where 鐐规璁″垝ID = " + HInterID);
ds = oCN.RunProcReturn(sql, "h_v_QJ_GetDotCheckItemList");
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
@@ -12397,8 +13845,8 @@
/// <returns></returns>
[Route("Web/GetEquipmentBillsList")]
[HttpGet]
- public object GetEquipmentBillsList(string sWhere, string Type,string user)
- {
+ public object GetEquipmentBillsList(string sWhere, string Type, string user)
+ {
try
{
List<object> columnNameList = new List<object>();
@@ -12419,6 +13867,9 @@
break;
case "YS":
HView = "h_v_Sb_EquipRepairCheckBillList";
+ break;
+ case "QD":
+ HView = "h_v_Sb_EquipRepairSignBillList";
break;
default:
objjson.code = "0";
@@ -12495,13 +13946,8 @@
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- string sql = string.Format(@"select b.HDotCheckItemID HDotCheckItemID,c.HNumber HDotCheckCode,b.HDotCheckItem,b.HDotCheckPart,b.HClaim,
- b.HManagerID,e.HNumber HManagerCode,e.HName HManagerName,b.HRemark from Sb_EquipDotCheckRuleBillMain a
- left join Sb_EquipDotCheckRuleBillSub b on a.HInterID=b.HInterID
- left join Gy_DotCheck c on c.HItemID=b.HDotCheckItemID
- left join Gy_Employee e on e.HItemID=b.HManagerID
- where a.HInterID=" + HDotCheckRuleInterID);
- ds = oCN.RunProcReturn(sql, "Sb_EquipDotCheckRuleBillMain");
+ string sql = string.Format(@"select * from h_v_Sb_EquipDotCheckRuleBillList_PDA where HInterID=" + HDotCheckRuleInterID);
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleBillList_PDA");
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objjson.code = "0";
@@ -12529,6 +13975,149 @@
}
}
+ /// <summary>
+ /// 鏍规嵁璁惧淇濆吇瑙勭▼鏄剧ず璁惧淇濆吇绋嬮」鐩�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetMaintainItemByMaintainRuleID")]
+ [HttpGet]
+ public object GetMaintainItemByMaintainRuleID(int HEquipMaintainRuleInterID)
+ {
+ if (HEquipMaintainRuleInterID <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "璁惧淇濆吇瑙勭▼鏈�夋嫨";
+ objjson.data = null;
+ return objjson;
+ }
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string sql = string.Format(@"select * from h_v_Sb_EquipMaintainRuleBillList_PDA where HInterID=" + HEquipMaintainRuleInterID);
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleBillList_PDA");
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁鍣ㄥ叿鐐规瑙勭▼鏄剧ず鍣ㄥ叿鐐规绋嬮」鐩�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetDotCheckRuleItemByDotCheckRuleID/Mould")]
+ [HttpGet]
+ public object GetDotCheckRuleItemByDotCheckRuleIDForMould(int HDotCheckRuleInterID)
+ {
+ if (HDotCheckRuleInterID <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鍣ㄥ叿鐐规瑙勭▼鏈�夋嫨";
+ objjson.data = null;
+ return objjson;
+ }
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string sql = string.Format(@"select * from h_v_Sc_MouldDotCheckRuleBillList_PDA where HInterID=" + HDotCheckRuleInterID);
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckRuleBillList_PDA");
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁鍣ㄥ叿淇濆吇瑙勭▼鏄剧ず鍣ㄥ叿淇濆吇绋嬮」鐩�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetMaintainItemByMaintainRuleID/Mould")]
+ [HttpGet]
+ public object GetMaintainItemByMaintainRuleIDForMould(int HMouldMaintainRuleInterID)
+ {
+ if (HMouldMaintainRuleInterID <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鍣ㄥ叿淇濆吇瑙勭▼鏈�夋嫨";
+ objjson.data = null;
+ return objjson;
+ }
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string sql = string.Format(@"select * from h_v_Sb_MouldMaintainRuleBillList_PDA where HInterID=" + HMouldMaintainRuleInterID);
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_MouldMaintainRuleBillList_PDA");
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
/// <summary>
/// 鑾峰彇缁翠慨椤圭洰鍒楄〃
@@ -12661,26 +14250,26 @@
/// <returns></returns>
[Route("Web/GetHSourceBillType")]
[HttpGet]
- public object GetHSourceBillType(string HName,int Num)
+ public object GetHSourceBillType(string HName, int Num)
{
try
{
ClsCN oCn = new ClsCN();
DataSet oDs = new DataSet();
//鏈夌殑鍗曞瓙婧愬崟鍒嗕负绾㈣摑鍗� 0浠h〃钃濆崟 1浠h〃绾㈠崟
- if (Num==0)
+ if (Num == 0)
{ //婧愬崟涓鸿摑鍗�
- oDs = oCn.RunProcReturn("select * from Xt_BillSourceSet where HName='" + HName + "'and HRedBlueFlag ='"+ Num+"' ", "Xt_BillSourceSet");
+ oDs = oCn.RunProcReturn("select * from Xt_BillSourceSet where HName='" + HName + "'and HRedBlueFlag ='" + Num + "' ", "Xt_BillSourceSet");
}
- else if (Num==1)
+ else if (Num == 1)
{ //婧愬崟涓虹孩鍗�
oDs = oCn.RunProcReturn("select * from Xt_BillSourceSet where HName='" + HName + "' and HRedBlueFlag ='" + Num + "' ", "Xt_BillSourceSet");
}
- else if(Num==2)
+ else if (Num == 2)
{ //涓嶅垎绾㈣摑鍗�
oDs = oCn.RunProcReturn("select * from Xt_BillSourceSet where HName='" + HName + "'", "Xt_BillSourceSet");
}
-
+
objjson.code = "1";
objjson.count = 1;
objjson.Message = "鑾峰彇鎴愬姛锛�";
@@ -12755,7 +14344,7 @@
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); //鏁版嵁搴撴搷浣滃伐鍏�
string sql = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum from Gy_MenuDefineSet where HMakeName = '" + HMakeName + "' and HType = '" + HType + "' order by HPosition";
ds = oCn.RunProcReturn(sql, "Gy_MenuDefineSet"); //鏌ヨ褰撳墠鐢ㄦ埛鐨勮嚜瀹氫箟鑿滃崟鏁版嵁
- if (ds.Tables[0]==null || ds.Tables[0].Rows.Count == 0) //鍒ゆ柇褰撳墠鐢ㄦ埛鏄惁鏈夎缃繃鑷畾涔変俊鎭紝鑻ヨ褰曟暟涓�0锛屽垯娌℃湁璁剧疆杩囷紝鍔犺浇鎵�鏈夌殑鑿滃崟淇℃伅
+ if (ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0) //鍒ゆ柇褰撳墠鐢ㄦ埛鏄惁鏈夎缃繃鑷畾涔変俊鎭紝鑻ヨ褰曟暟涓�0锛屽垯娌℃湁璁剧疆杩囷紝鍔犺浇鎵�鏈夌殑鑿滃崟淇℃伅
{
sql = "Select * from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID ";
ds = oCn.RunProcReturn(sql, "Gy_Menu");
@@ -12880,7 +14469,7 @@
List<MenuInit> menuInitList = new List<MenuInit>(); //鐢ㄤ互鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝浠ュ強瀵瑰簲鑺傜偣鏄惁琚�変腑闇�瑕佸姞杞芥樉绀�
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
- ds = oCn.RunProcReturn("Select * from Gy_Menu_1 where HType = '" +HType + "' Order by HItemID ", "Gy_Menu"); //鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝鐢ㄤ簬涓簃enuInitList鍒楄〃鍏呭疄鏁版嵁
+ ds = oCn.RunProcReturn("Select * from Gy_Menu_1 where HType = '" + HType + "' Order by HItemID ", "Gy_Menu"); //鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝鐢ㄤ簬涓簃enuInitList鍒楄〃鍏呭疄鏁版嵁
DataSet ds1 = new DataSet();
for (int i = 0; i < ds.Tables[0].Rows.Count; i++) //灏咷y_Menu_1涓殑鑿滃崟淇℃伅鍙婇�変腑鎯呭喌淇濆瓨鍒癿enuInitList鍒楄〃涓紝
@@ -12977,16 +14566,16 @@
//璁剧疆鏁版嵁搴撴搷浣滅殑鍥炴粴鐐癸紝鑻ュ湪鎻愪氦鍓嶆姤閿欙紝鍒欏洖婊氬埌璇ョ偣锛屾湡闂存搷浣滃彇娑�
oCN.BeginTran();
-
+
//鍒犻櫎褰撳墠鐢ㄦ埛鐨勮嚜瀹氫箟鏁版嵁
string sql = "delete from Gy_MenuDefineSet where HMakeName = '" + HMakeName + "' and HType = '" + HTypes + "'";
oCN.RunProc(sql);
//鎻掑叆褰撳墠鐢ㄦ埛鏈�鏂扮殑鑷畾涔夋暟鎹�
- for(int i=0;i< saveDataList.Count; i++)
+ for (int i = 0; i < saveDataList.Count; i++)
{
sql = "select * from Gy_Menu_1 where HItemID = '" + saveDataList[i].HItemID + "'";
- ds = oCn.RunProcReturn(sql,"Gy_Menu_1");
+ ds = oCn.RunProcReturn(sql, "Gy_Menu_1");
if (ds.Tables[0].Rows.Count > 0)
{
string HPartentID = ds.Tables[0].Rows[0]["HPartentID"].ToString();
@@ -12996,7 +14585,7 @@
string HType = ds.Tables[0].Rows[0]["HType"].ToString();
string HPicNum = ds.Tables[0].Rows[0]["HPicNum"].ToString();
- if(HPartentID == "0" || HPartentID == ds.Tables[0].Rows[0]["HItemID"].ToString())
+ if (HPartentID == "0" || HPartentID == ds.Tables[0].Rows[0]["HItemID"].ToString())
{
string HPosition = ds.Tables[0].Rows[0]["HPosition"].ToString();
sql = "insert into Gy_MenuDefineSet(HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HMakeName,HPicNum,HPosition) values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "','" + HPicNum + "','" + HPosition + "')";
@@ -13007,12 +14596,12 @@
sql = "insert into Gy_MenuDefineSet(HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HMakeName,HPicNum,HPosition) values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "','" + HPicNum + "','z')";
oCN.RunProc(sql);
}
-
+
}
}
//鎻愪氦鏁版嵁搴撴搷浣�
oCN.Commit();
-
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
@@ -13445,15 +15034,15 @@
/// <returns></returns>
[Route("Web/GetOtherInBillMain_TempList_New")]
[HttpGet]
- public object GetOtherInBillMain_TempList_New (string HBillType, string sHMaker, Int64 HOrgID)
+ public object GetOtherInBillMain_TempList_New(string HBillType, string sHMaker, Int64 HOrgID)
{
WebS.WebService1 oWebs = new WebS.WebService1();
try
{
List<object> columnNameList = new List<object>();
-
+
DataSet ds = oCN.RunProcReturn("exec h_p_KF_GetPonderationBillMain_TempList_New1 '" + HBillType + "','" + sHMaker + "'," + HOrgID.ToString(), "h_p_KF_GetPonderationBillMain_TempList_New1");
-
+
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
{
@@ -13499,12 +15088,12 @@
/// <returns></returns>
[Route("Web/GetProcNoList")]
[HttpGet]
- public object GetProcNoList(int HInterID,string sWhere,string UserID)
+ public object GetProcNoList(int HInterID, string sWhere, string UserID)
{
List<object> columnNameList = new List<object>();
try
{
- ds = oCN.RunProcReturn("exec h_p_Sc_ProcNoList '" + HInterID + "','" + sWhere + "','" + UserID + "'" , "h_p_Sc_ProcNoList");
+ ds = oCN.RunProcReturn("exec h_p_Sc_ProcNoList '" + HInterID + "','" + sWhere + "','" + UserID + "'", "h_p_Sc_ProcNoList");
objJsonResult.code = "1";
objJsonResult.count = 1;
--
Gitblit v1.9.1