| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_EquipFileBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | string sql = sql1 + sWhere + " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_EquipFileMainList"); |
| | | } |
| | | //添加列名 |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_EquipFileMainList where hmainid=" + HInterID, "h_v_Gy_EquipFileMainList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_EquipFileMain_Edit where hmainid=" + HInterID, "h_v_Gy_EquipFileMain_Edit"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | string HMainSourceFlag = list[0].HMainSourceFlag; //varchar(10) //是否主生产设备(否,是) |
| | | int HMainSourceID = list[0].HMainSourceID; //int //所属主生产设备(Gy_EquipFileBillMain) |
| | | string HMaker = msg5; |
| | | string HMakeDate = DateTime.Now.Date.ToString(); |
| | | //string HMakeDate = DateTime.Now.Date.ToString(); |
| | | int HEquipDotCheckRuleInterID = list[0].HEquipDotCheckRuleInterID; |
| | | int HEquipMaintainRuleInterID = list[0].HEquipMaintainRuleInterID; |
| | | int HSourceID = list[0].HSourceID; |
| | |
| | | " Values("+ HInterID+",'" + 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 +"'" + |
| | | "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID + ",'3308','" + HDate + "','" + HYear + "','" + HMaker + "',GETDATE(),'" + HEquipMaintainRuleInterID + "','" + HEquipDotCheckRuleInterID +"'" + |
| | | "," + HSourceID + ",'" + HMainSourceFlag + "','" + HMacAddress + "','" + HMainSourceID + "','" + HIPAddress + "','" + HLinkNETMode + "','" + HCollectMode + "','" + HCollectClass + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //修改上级为非末级代码 |
| | | objJsonResult = AddBillSub(msg3, msg4, HInterID, hbillno, 1); |
| | |
| | | string HCollectClass = list[0].HCollectClass; // varchar(50) //采集类型 |
| | | int HMainSourceID = list[0].HMainSourceID; //int //所属主生产设备(Gy_EquipFileBillMain) |
| | | string HUpDater = msg5; |
| | | string HUpDateDate = DateTime.Now.Date.ToString(); |
| | | //string HUpDateDate = DateTime.Now.Date.ToString(); |
| | | int HEquipDotCheckRuleInterID = list[0].HEquipDotCheckRuleInterID; |
| | | int HEquipMaintainRuleInterID = list[0].HEquipMaintainRuleInterID; |
| | | int HSourceID = list[0].HSourceID; |
| | |
| | | ",HLogo='" + HLogo + "'" + |
| | | ",HSellSupID=" + HSellSupID + |
| | | ",HMakeSupID= " + HMakeSupID + |
| | | ",HUpDater= '" + HUpDater + "'" + |
| | | ",HUpDateDate= '" + HUpDateDate + "'" + |
| | | ",HUpDater= '" + HUpDater + "'" + |
| | | ",HUpDateDate= GETDATE()" + |
| | | ",HEquipDotCheckRuleInterID='" + HEquipDotCheckRuleInterID + "'" + |
| | | ",HEquipMaintainRuleInterID='" + HEquipMaintainRuleInterID + "'" + |
| | | ",HSourceID='" + HSourceID + "'" + |