生产资源列表 新增字段 mac地址 HMacAddr varchar(100) //设备MAC地址
设备档案列表 新增字段 生产资源 HSourceID int //对应生产资源(Gy_Source)
| | |
| | | public double HMinAdd;// money //æå°è¿é¶ --addnew |
| | | public Int64 HClassCount;// int //æ¯æ¥ç次 --addnew |
| | | public int HUSEORGID; |
| | | public string HMacAddr; //macå°å |
| | | } |
| | | } |
| | |
| | | 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("")) |
| | | { |
| | |
| | | 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(); |
| | |
| | | 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 è®¾å¤æ¡£æ¡å表 |
| | | |
| | | [Route("Gy_EquipFileMain/GetList")] |
| | | [HttpGet] |
| | | public object GetList(string sWhere,string user) |
| | | public object GetList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | |
| | | #region [è®¾å¤æ¡£æ¡å é¤åè½] |
| | | [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)) |
| | | { |
| | |
| | | |
| | | 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) //设å¤è§æ ¼ |
| | |
| | | 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)) |
| | | { |
| | |
| | | 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); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | |
| | | #endregion |
| | | |
| | | #region è®¾å¤æ¡£æ¡ä¿®æ¹ä¿å |
| | | |
| | | |
| | | [Route("Gy_EquipFileMain/EditBill")] |
| | | [HttpPost] |
| | | public object EditBill([FromBody] JObject oMain) |
| | |
| | | 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)) |
| | | { |
| | |
| | | ",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); |
| | |
| | | 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]; |
| | |
| | | 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 |
| | |
| | | " (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); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.Commit(); |
| | |
| | | ",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); |
| | |
| | | public int HMakeSupID; // int //å¶é å (Gy_Supplier) |
| | | public int HEquipDotCheckRuleInterID=0; |
| | | public int HEquipMaintainRuleInterID=0; |
| | | public int HSourceID = 0; |
| | | |
| | | } |
| | | } |