From ef517af50613c209b8f78fc29f276f748a98a2b0 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期五, 02 九月 2022 09:36:20 +0800
Subject: [PATCH] 生产资源列表 新增字段 mac地址 HMacAddr varchar(100) //设备MAC地址 设备档案列表 新增字段 生产资源 HSourceID int //对应生产资源(Gy_Source)
---
WebAPI/DLL/ClsGy_Source_Ctl.cs | 5 +-
Model/基础资料/基础资料/ClsGy_Source_Model.cs | 1
WebAPI/Models/ClsGy_EquipFileMain.cs | 1
WebAPI/Controllers/BaseSet/Gy_SourceController.cs | 34 ++++++++--------
WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs | 45 ++++++++++++----------
5 files changed, 46 insertions(+), 40 deletions(-)
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Source_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Source_Model.cs"
index fd811db..9040ca1 100644
--- "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Source_Model.cs"
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Source_Model.cs"
@@ -23,5 +23,6 @@
public double HMinAdd;// money //最小进阶 --addnew
public Int64 HClassCount;// int //每日班次 --addnew
public int HUSEORGID;
+ public string HMacAddr; //mac地址
}
}
diff --git a/WebAPI/Controllers/BaseSet/Gy_SourceController.cs b/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
index 4146847..fa73e17 100644
--- a/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
@@ -33,14 +33,14 @@
try
{
//鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
- if (!DBUtility.ClsPub.Security_Log("Gy_Source_Query", 1, false, user))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ //if (!DBUtility.ClsPub.Security_Log("Gy_Source_Query", 1, false, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
if (sWhere == null || sWhere.Equals(""))
{
@@ -96,15 +96,15 @@
string msg1 = sArray[0].ToString();
string msg2 = sArray[1].ToString();
- //鏌ョ湅鏉冮檺
- if (!DBUtility.ClsPub.Security_Log("Gy_Source_Edit", 1, false, msg2))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ ////鏌ョ湅鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("Gy_Source_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();
diff --git a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
index 88da647..da480d9 100644
--- a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
+++ b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
@@ -16,14 +16,14 @@
private json objJsonResult = new json();
public DataSet ds = new DataSet();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- public DLL.ClsGy_EquipFileMain BillNew0 = new DLL.ClsGy_EquipFileMain();
- public DLL.ClsGy_EquipFileMain BillOld0 = new DLL.ClsGy_EquipFileMain();
+ public DLL.ClsGy_EquipFileMain BillNew0 = new DLL.ClsGy_EquipFileMain();
+ public DLL.ClsGy_EquipFileMain BillOld0 = new DLL.ClsGy_EquipFileMain();
#region 璁惧妗f鍒楄〃
[Route("Gy_EquipFileMain/GetList")]
[HttpGet]
- public object GetList(string sWhere,string user)
+ public object GetList(string sWhere, string user)
{
try
{
@@ -78,7 +78,7 @@
#region [璁惧妗f鍒犻櫎鍔熻兘]
[Route("Gy_EquipFileMain/Delete_EquipFile")]
[HttpGet]
- public object Delete_EquipFile(string HItemID,string user)
+ public object Delete_EquipFile(string HItemID, string user)
{
if (!DBUtility.ClsPub.Security_Log("Gy_EquipFile_Delete", 1, false, user))
{
@@ -181,11 +181,11 @@
List<Models.ClsGy_EquipFileMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_EquipFileMain>>(msg2);
- string hbillno= list[0].HBillNo;
+ string hbillno = list[0].HBillNo;
string HYear = DateTime.Now.Year.ToString();
DateTime HDate = list[0].HDate;
long HInterID = list[0].HInterID;
- string HEquipFileNumber = list[0].HEquipFileNumber;
+ string HEquipFileNumber = list[0].HEquipFileNumber;
string HEquipFileNo = list[0].HEquipFileNo; // varchar(50) //璁惧缂栫爜(鍞竴)
string HName = list[0].HName; // 鈭� varchar(100) //璁惧鍚嶇О
string HModel = list[0].HModel; // 鈭� varchar(100) //璁惧瑙勬牸
@@ -212,6 +212,7 @@
string HMakeDate = DateTime.Now.Date.ToString();
int HEquipDotCheckRuleInterID = list[0].HEquipDotCheckRuleInterID;
int HEquipMaintainRuleInterID = list[0].HEquipMaintainRuleInterID;
+ int HSourceID = list[0].HSourceID;
if (!DBUtility.ClsPub.AllowNumber(HEquipFileNumber))
{
@@ -227,12 +228,11 @@
oCN.RunProc("Insert into Gy_EquipFileBillMain " +
" (hbillno,HEquipFileNumber,HEquipFileNo,HName,HModel,HModel2,HMaterID,HUnitID,HOutComDate" +
",HOutComNo,HDeptID,HUseEmpID,HRepairEmpID,HAddress,HSetupDate,HStartupDate,HStatus," +
- "HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate,HEquipMaintainRuleInterID,HEquipDotCheckRuleInterID) " +
+ "HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate,HEquipMaintainRuleInterID,HEquipDotCheckRuleInterID,HSourceID) " +
" Values('" + hbillno + "','" + HEquipFileNumber + "','" + HEquipFileNo + "','" + HName + "','" + HModel + "','" + HModel2 + "'," + HMaterID + "," + HUnitID +
",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HUseEmpID + "," + HRepairEmpID + ",'" + HAddress +
"','" + HSetupDate + "','" + HStartupDate + "','" + HStatus + "'," + HEquipFileTypeID + ",'" + HProNum +
- "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID +",'3308','" + HDate +"','"+ HYear+ "','" + HMaker + "','" + HMakeDate +"','"+ HEquipMaintainRuleInterID+"','"+ HEquipDotCheckRuleInterID+
- "')", ref DBUtility.ClsPub.sExeReturnInfo);
+ "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID + ",'3308','" + HDate + "','" + HYear + "','" + HMaker + "','" + HMakeDate + "','" + HEquipMaintainRuleInterID + "','" + HEquipDotCheckRuleInterID +"'," + HSourceID + ")", ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼涓婄骇涓洪潪鏈骇浠g爜
oCN.Commit();
objJsonResult.code = "1";
@@ -254,7 +254,7 @@
#endregion
#region 璁惧妗f淇敼淇濆瓨
-
+
[Route("Gy_EquipFileMain/EditBill")]
[HttpPost]
public object EditBill([FromBody] JObject oMain)
@@ -310,6 +310,8 @@
string HUpDateDate = DateTime.Now.Date.ToString();
int HEquipDotCheckRuleInterID = list[0].HEquipDotCheckRuleInterID;
int HEquipMaintainRuleInterID = list[0].HEquipMaintainRuleInterID;
+ int HSourceID = list[0].HSourceID;
+
if (!DBUtility.ClsPub.AllowNumber(HEquipFileNumber))
{
@@ -341,28 +343,29 @@
",HName='" + HName + "'" +
",HModel='" + HModel + "'" +
",HModel2='" + HModel2 + "'" +
- ",HMaterID=" + HMaterID +
- ",HUnitID=" + HUnitID +
+ ",HMaterID=" + HMaterID +
+ ",HUnitID=" + HUnitID +
",HOutComDate='" + HOutComDate + "'" +
",HOutComNo='" + HOutComNo + "'" +
- ",HDeptID=" + HDeptID +
+ ",HDeptID=" + HDeptID +
",HUseEmpID=" + HUseEmpID +
",HRepairEmpID=" + HRepairEmpID +
",HAddress='" + HAddress + "'" +
",HSetupDate='" + HSetupDate + "'" +
",HStartupDate='" + HStartupDate + "'" +
",HStatus='" + HStatus + "'" +
- ",HEquipFileTypeID=" + HEquipFileTypeID +
+ ",HEquipFileTypeID=" + HEquipFileTypeID +
",HProNum='" + HProNum + "'" +
",HBarCode='" + HBarCode + "'" +
",HWorkArea='" + HWorkArea + "'" +
",HLogo='" + HLogo + "'" +
- ",HSellSupID=" + HSellSupID +
+ ",HSellSupID=" + HSellSupID +
",HMakeSupID= " + HMakeSupID +
",HUpDater= '" + HUpDater + "'" +
",HUpDateDate= '" + HUpDateDate + "'" +
- ",HEquipDotCheckRuleInterID='"+ HEquipDotCheckRuleInterID+"'"+
- ",HEquipMaintainRuleInterID='"+ HEquipMaintainRuleInterID+"'"+
+ ",HEquipDotCheckRuleInterID='" + HEquipDotCheckRuleInterID + "'" +
+ ",HEquipMaintainRuleInterID='" + HEquipMaintainRuleInterID + "'" +
+ ",HSourceID='" + HSourceID + "'" +
" Where HInterID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼瀛愰」鐩唬鐮�
//oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
@@ -392,13 +395,13 @@
public object Sb_EquipFileBillResumeDate(string HInterID)
{
- DataTable ds,ds1;
+ DataTable ds, ds1;
long HInterID1 = long.Parse(HInterID);
List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
+ //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
string sql1 = string.Format($"exec h_p_Gy_EquipRecord {HInterID1}");
ds = oCN.RunProcReturn(sql1, "h_p_Gy_EquipRecord").Tables[0];
ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_EquipRecord").Tables[1];
@@ -427,8 +430,8 @@
public object Gy_MouldFileBillResumeDate(string HInterID)
{
- DataTable ds,ds1,ds2,ds3;
-
+ DataTable ds, ds1, ds2, ds3;
+
long HInterID1 = long.Parse(HInterID);
List<object> list = new List<object>();
try
diff --git a/WebAPI/DLL/ClsGy_Source_Ctl.cs b/WebAPI/DLL/ClsGy_Source_Ctl.cs
index ec919b1..428ff35 100644
--- a/WebAPI/DLL/ClsGy_Source_Ctl.cs
+++ b/WebAPI/DLL/ClsGy_Source_Ctl.cs
@@ -22,12 +22,12 @@
" (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
",HType,HRelationID,HCenterID,HEquipFileID_K3,HDeptID" +
",HLevel,HEndFlag,HStopflag,HRemark,HProcID,HOverTimes " +
- ",HWorkTimes,HMaxWorkTimes,HMinAdd,HClassCount,HGroupID,HGroupK3ID,HUSEORGID)" +
+ ",HWorkTimes,HMaxWorkTimes,HMinAdd,HClassCount,HGroupID,HGroupK3ID,HUSEORGID,HMacAddr)" +
" Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() +
",'" + oModel.HType + "'," + oModel.HRelationID.ToString() + "," + oModel.HCenterID.ToString() + "," + oModel.HEquipFileID_K3.ToString() + "," + oModel.HDeptID.ToString() +
"," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) +
",'" + oModel.HRemark + "'," + oModel.HProcID + "," + oModel.HOverTimes + "," + oModel.HWorkTimes + "," + oModel.HMaxWorkTimes +
- "," + oModel.HMinAdd + "," + oModel.HClassCount + "," + oModel.HGroupID.ToString() + "," + oModel.HGroupK3ID.ToString() + ","+ oModel.HUSEORGID + ")", ref DBUtility.ClsPub.sExeReturnInfo);
+ "," + oModel.HMinAdd + "," + oModel.HClassCount + "," + oModel.HGroupID.ToString() + "," + oModel.HGroupK3ID.ToString() + "," + oModel.HUSEORGID + ",'" + oModel.HMacAddr + "')", ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼涓婄骇涓洪潪鏈骇浠g爜
oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
oCn.Commit();
@@ -68,6 +68,7 @@
",HDeptID=" + oModel.HDeptID.ToString() +
",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+ ",HMacAddr='" + oModel.HMacAddr.ToString() + "'" +
",HRemark= '" + oModel.HRemark + "' Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼瀛愰」鐩唬鐮�
oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
diff --git a/WebAPI/Models/ClsGy_EquipFileMain.cs b/WebAPI/Models/ClsGy_EquipFileMain.cs
index b751c54..88d8418 100644
--- a/WebAPI/Models/ClsGy_EquipFileMain.cs
+++ b/WebAPI/Models/ClsGy_EquipFileMain.cs
@@ -32,6 +32,7 @@
public int HMakeSupID; // int //鍒堕�犲晢 (Gy_Supplier)
public int HEquipDotCheckRuleInterID=0;
public int HEquipMaintainRuleInterID=0;
+ public int HSourceID = 0;
}
}
\ No newline at end of file
--
Gitblit v1.9.1