钉钉同步数据
设备维修记录单
模具保养记录单 模具维修记录单
| | |
| | | ",HCycleUnit='" + omodel.HCycleUnit + "'" + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HRepairAccepDate='" + omodel.HRepairAccepDate + "'" + |
| | | ",HSupID=" + omodel.HSupID.ToString() + |
| | | ",HRepairType='" + omodel.HRepairType + "'" + |
| | | ",HNewModel='" + omodel.HNewModel + "'" + |
| | |
| | | ",HCycleUnit,HPlanTimes,HTimes,HEmpID,HManagerID"+ |
| | | ",HDeptID,HExplanation,HInnerBillNo,HMouldID" + |
| | | ",HSupID,HRepairType,HNewModel,HNewDesignLife,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" + |
| | | ",HRepairAccepDate" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" + |
| | |
| | | ",'" + omodel.HCycleUnit + "'," + omodel.HPlanTimes.ToString() + "," + omodel.HTimes.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + |
| | | "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMouldID.ToString() + |
| | | ", " + omodel.HSupID.ToString() + ",'" + omodel.HRepairType + "','" + omodel.HNewModel + "'," + omodel.HNewDesignLife.ToString() +",'"+ omodel.HMainSourceBillType+"',"+ omodel.HMainSourceInterID.ToString()+","+ omodel.HMainSourceEntryID.ToString()+ |
| | | ") "); |
| | | ",'"+ omodel.HRepairAccepDate + "') "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSb_MouldRepairWorkBillSub oSub in DetailColl) |
| | | { |
| | |
| | | ",HEndDate='" + omodel.HEndDate + "'" + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HRequestComDate='" + omodel.HRequestComDate + "'" + |
| | | ",HRecentMainModule='" + omodel.HRecentMainModule + "'" + |
| | | ",HCumulativeModule='" + omodel.HCumulativeModule + "'" + |
| | | ",HProductionModule='" + omodel.HProductionModule + "'" + |
| | | ",HMouldMaintainRuleInterID=" + omodel.HMouldMaintainRuleInterID.ToString() + |
| | | ",HMaintainLevID=" + omodel.HMaintainLevID + |
| | | ",HLastResult='" + omodel.HLastResult + "'" + |
| | |
| | | ",HPlanNo,HPlanInterID,HMouldID,HBeginDate"+ |
| | | ",HEndDate"+ |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID,HLastResult" + |
| | | ",HRequestComDate,HRecentMainModule,HCumulativeModule,HProductionModule" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+ |
| | |
| | | ",'" + omodel.HEndDate + "'"+ |
| | | ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'," +omodel.HMouldMaintainRuleInterID.ToString() + "," + omodel.HMaintainLevID + |
| | | ",'" + omodel.HLastResult + "'" + |
| | | ") "); |
| | | ",'"+ omodel.HRequestComDate + "'," + omodel.HRecentMainModule + "," + omodel.HCumulativeModule + "," + omodel.HProductionModule + ") "); |
| | | |
| | | if (DetailCol.Count > 0) |
| | | { |
| | |
| | | public Int64 HRepairID;// --维修项ç®(Gy_Repair) |
| | | public DateTime HRepairBeginDate;// --ç»´ä¿®å¼å§æ¥æ |
| | | public DateTime HRepairEndDate;// --ç»´ä¿®ç»ææ¥æ |
| | | public DateTime HRepairAccepDate;// --ç»´ä¿®åçæ¥æ |
| | | public string HRepairContent;// --ç»´ä¿®å
容 |
| | | public string HCycleUnit;// varchar(10) --æ¶é´åä½(å°æ¶ï¼å¤©) |
| | | public double HPlanTimes;// money --计åç»´ä¿®å·¥æ¶ |
| | |
| | | public int HMouldMaintainPlanEntryID; //å¨å
·ä¿å
»è®¡ååï¼Sc_MouldMaintainPlanBillSub_Planï¼åå
ç |
| | | |
| | | public string HLastResult; |
| | | public string HRequestComDate; |
| | | public Int64 HRecentMainModule; |
| | | public Int64 HCumulativeModule; |
| | | public Int64 HProductionModule; |
| | | } |
| | | } |
| | |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache |
| | |
| | | lsmain = oListModels.getObjectByJson_Gy_MouldRepairWorkBillMain(msg2); |
| | | foreach (Model.ClsSb_MouldRepairWorkBillMain oItem in lsmain) |
| | | { |
| | | //oItem.HMaker = ""; |
| | | oItem.HMaker = msg4; |
| | | UserName = msg4; //å¶å人 |
| | | oItem.HBillType = "3807"; |
| | | oItem.HBillSubType = "3807"; |
| | |
| | | foreach (Model.ClsSc_MouldMaintainBillMain oItem in lsmain) |
| | | { |
| | | UserName = oItem.HMaker; //å¶å人 |
| | | DBUtility.ClsPub.CurUserName = UserName; |
| | | DBUtility.ClsPub.CurUserName = msg5; |
| | | oItem.HBillType = "3819"; |
| | | oItem.HBillSubType = "3819"; |
| | | |
| | |
| | | using DingTalk.Api; |
| | | using DingTalk.Api.Response; |
| | | using System.Globalization; |
| | | using System.Linq; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | |
| | | public string HExplanation;// varchar(500) --ç»´ä¿®è¦æ± |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | public Int64 HMouldID; |
| | | public Int64 HMouldMaintainRuleInterID; |
| | | public Int64 HMaintainItemID; |
| | | public Int64 HSupID;// int --ä¾åºåï¼Gy_Supplierï¼ addnew |
| | | public string HRepairType;// varchar(10) --维修类åï¼å
é¨ç»´ä¿®ï¼å§å¤ç»´ä¿®ï¼ addnew |
| | | public string HNewModel;// varchar(100) --ç»´ä¿®åæ°è§æ ¼ addnew |
| | | public Single HNewDesignLife;// money --æ°è®¾è®¡å¯¿å½ |
| | | public string HRemark; |
| | | |
| | | public DateTime HRequestComDate; |
| | | public double HRecentMainModule; |
| | | public double HCumulativeModule; |
| | | public double HProductionModule; |
| | | public DateTime HRepairAccepDate; |
| | | |
| | | |
| | | |
| | | //åæ®å
容 |
| | | public string HBillNo; //åæ®å· |
| | | public string HDate; //æ¥æ |
| | | public string HCheckLevel; //å®¡æ ¸ç级 |
| | | public string HArea; //åºå |
| | |
| | | public Single HPlanTimes;// money --计åç»´ä¿®å·¥æ¶ |
| | | public Single HTimes;// money --å®é
ç»´ä¿®å·¥æ¶ |
| | | public string HRemark2;//夿³¨ |
| | | public string HRepairCategory; |
| | | public string HUrgenLevel; |
| | | public string HRepairer; |
| | | public string HIsCapacityImpact; |
| | | |
| | | //åæ®å
容 |
| | | public string HDate; //æ¥æ |
| | |
| | | //OriginatorId = "12", //æ ¹æ®æµç¨åèµ·äººå·¥å·æ¥è¯¢ã |
| | | |
| | | //TaskId = "12", //ä»»å¡IDã |
| | | //CreateFromTimeGMT = DateTime.Now.ToString("dd") == "01" ? "2022-01-01" : DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"), //å建æ¶é´èµ·å§å¼ã |
| | | //CreateToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), //å建æ¶é´ç»æ¢å¼ã |
| | | ModifiedFromTimeGMT = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"), //ä¿®æ¹æ¶é´èµ·å§å¼ã |
| | | ModifiedToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), //ä¿®æ¹æ¶é´ç»æ¢å¼ã |
| | | CreateFromTimeGMT = DateTime.Now.AddMonths(-10).ToString("yyyy-MM-dd"), //å建æ¶é´èµ·å§å¼ã |
| | | CreateToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), //å建æ¶é´ç»æ¢å¼ã |
| | | //ModifiedFromTimeGMT = DateTime.Now.AddDays(-14).ToString("yyyy-MM-dd"), //ä¿®æ¹æ¶é´èµ·å§å¼ã |
| | | //ModifiedToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), //ä¿®æ¹æ¶é´ç»æ¢å¼ã |
| | | |
| | | PageSize = pageSize, //å页大å°ã |
| | | PageNumber = pageNumber, //å页页ç |
| | |
| | | continue; |
| | | } |
| | | |
| | | //å¼åæ¥æ |
| | | if (keys.Contains("dateField_lq0v65sv")) |
| | | { |
| | | double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lq0v65sv"].ToString()); |
| | | oItem.HDate = convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm"); |
| | | } |
| | | |
| | | //修模å¼å§æ¶é´ |
| | | if (keys.Contains("dateField_lq4gf2ih")) |
| | | { |
| | |
| | | oItem.HRepairEndDate = DateTime.Parse(convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm")); |
| | | } |
| | | |
| | | //模å
·æ¹æ¬¡å· |
| | | //模å
·åæ®å· |
| | | if (keys.Contains("serialNumberField_lqaak4ts")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["serialNumberField_lqaak4ts"].ToString(); |
| | | oItem.HRemark = HDate_Temp; |
| | | oItem.HBillNo = HDate_Temp; |
| | | } |
| | | |
| | | //模å
·ç¼ç |
| | | if (keys.Contains("dateField_lq4gf2ii")) |
| | | //è¦æ±å®ææ¥æ |
| | | if (keys.Contains("dateField_lq3idkvd")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["dateField_lq4gf2ii"].ToString(); |
| | | double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lq3idkvd"].ToString()); |
| | | oItem.HRequestComDate = DateTime.Parse(convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm:ss")); |
| | | } |
| | | |
| | | //ç»´ä¿®åçæ¥æ |
| | | if (keys.Contains("dateField_lq4gf2ih")) |
| | | { |
| | | double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lq4gf2ih"].ToString()); |
| | | oItem.HRepairAccepDate = DateTime.Parse(convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm:ss")); |
| | | } |
| | | |
| | | //æè¿ä¿å
»æ¨¡æ° |
| | | if (keys.Contains("numberField_lq3idkvi")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["numberField_lq3idkvi"].ToString(); |
| | | oItem.HRecentMainModule = double.Parse(HDate_Temp); |
| | | } |
| | | |
| | | //ç´¯è®¡æ¨¡æ° |
| | | if (keys.Contains("numberField_lq3idkvj")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["numberField_lq3idkvj"].ToString(); |
| | | oItem.HCumulativeModule = double.Parse(HDate_Temp); |
| | | } |
| | | |
| | | //æ¬æ¬¡çäº§æ¨¡æ° |
| | | if (keys.Contains("textField_lq4vdvgh")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_lq4vdvgh"].ToString(); |
| | | oItem.HProductionModule = double.Parse(HDate_Temp); |
| | | } |
| | | |
| | | //模å
·ç¼ç |
| | | if (keys.Contains("selectField_lq3idkvg")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["selectField_lq3idkvg"].ToString(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock) where HNumber='" + HDate_Temp + "'", "Gy_MouldFileMain"); |
| | | string HMouldID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | |
| | | HMouldID = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | } |
| | | oItem.HMouldID = long.Parse(HMouldID); |
| | | oItem.HRemark = HDate_Temp; |
| | | } |
| | | |
| | | |
| | |
| | | if (keys.Contains("employeeField_lq3idkvh")) |
| | | { |
| | | string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["employeeField_lq3idkvh"])); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock) where HNumber='" + HDate_Temp[0] + "'", "Gy_Employee"); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock) where hname='" + HDate_Temp[0] + "'", "Gy_Employee"); |
| | | string HEmpID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e.Message); |
| | | msg = e.Message; |
| | | return false; |
| | | } |
| | |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | |
| | | string HMouldMaintainRuleInterID = "0"; |
| | | string HMaintainItemID = "0"; |
| | | string HRepairID = "0"; |
| | | DataSet dataSet = oCN.RunProcReturn(@"select a.HInterID,item.HMaintainItemID from Sc_MouldMaintainRuleBillMain a with(nolock) |
| | | inner join Sc_MouldMaintainRuleBillSub_Item item with(nolock) on a.HInterID = item.HInterID |
| | | where a.HRemark like'%éé忥%'", "Sc_MouldMaintainRuleBillMain"); |
| | | |
| | | if (dataSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | HMouldMaintainRuleInterID = dataSet.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | HMaintainItemID = dataSet.Tables[0].Rows[0]["HMaintainItemID"].ToString(); |
| | | } |
| | | |
| | | dataSet = oCN.RunProcReturn(@"select HItemID from Gy_Repair a with(nolock) where a.HRemark like'%éé忥%' and HName like'%模å
·ç»´ä¿®%'", "Gy_Repair"); |
| | | |
| | | if (dataSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | HRepairID = dataSet.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | |
| | | foreach (MouldFileWeiXiuBaoYang oItem in lsmain) |
| | | { |
| | | //ä¿å
»è®°å½ |
| | | if (oItem.DetailColMouldMaintain.Count != 0) |
| | | { |
| | | |
| | | string BillType = "3819"; |
| | | string sql = $@"select HInnerBillNo from Sc_MouldMaintainBillMain |
| | | where HInnerBillNo = '{oItem.HInstanceID}'"; |
| | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //long HInterID = 0; |
| | | //string HBillNo = ""; |
| | | string sql_main = "Insert Into Sc_MouldMaintainBillMain " + |
| | |
| | | ",HPlanNo,HPlanInterID,HMouldID,HBeginDate" + |
| | | ",HEndDate" + |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID,HLastResult" + |
| | | ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate(),'" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" + |
| | | ",HRequestComDate,HRecentMainModule,HCumulativeModule,HProductionModule)" + |
| | | "values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + oItem.HBillNo + "','"+ oItem.HDate + "','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" + |
| | | ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark + "','" + oItem.HUpdateDate + "'" + |
| | | ",'','0','" + oItem.HMouldID + "','" + oItem.HRepairBeginDate + "'" + |
| | | ",'" + oItem.HRepairEndDate + "'" + |
| | | ",'" + oItem.HInstanceID + "','',0,0,'OK')"; |
| | | ",'" + oItem.HInstanceID + "','',"+ HMouldMaintainRuleInterID + ",0,'OK'" + |
| | | ",'"+ oItem.HRequestComDate + "'," + oItem.HRecentMainModule + "," + oItem.HCumulativeModule + "," + oItem.HProductionModule + ")"; |
| | | LogService.Write(sql_main); |
| | | oCN.RunProc(sql_main); |
| | | int i = 1; |
| | |
| | | ",HManagerID" + |
| | | ",HCloseMan,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainResult" + |
| | | ") values('" + HInterID + "'," + i + ",0,'" + oItem_Detail.HClaim + "'" + |
| | | ") " + |
| | | "values('" + HInterID + "'," + i + ","+ HMaintainItemID + ",'" + oItem_Detail.HClaim + "'" + |
| | | ",'','" + oItem_Detail.HClaim + "'" + |
| | | ",'" + oItem.HEmpID + "'" + |
| | | ",'','','" + oItem_Detail.HMaintainResult + "'" + |
| | | ",'0','0','','',0,0,'')"; |
| | | ",'0','0','','',0,0,'Y')"; |
| | | LogService.Write(sql_sub); |
| | | oCN.RunProc(sql_sub); |
| | | i += 1; |
| | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //long HInterID = 0; |
| | | //string HBillNo = ""; |
| | | string sql_main = "Insert Into Sc_MouldRepairWorkBillMain " + |
| | |
| | | ",HCycleUnit,HPlanTimes,HTimes,HEmpID,HManagerID" + |
| | | ",HDeptID,HExplanation,HInnerBillNo,HMouldID" + |
| | | ",HSupID,HRepairType,HNewModel,HNewDesignLife,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" + |
| | | ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" + |
| | | ",'0','0','" + oItem.HRepairBeginDate + "','" + oItem.HUpdateDate + "',''" + |
| | | ",HRepairAccepDate)values" + |
| | | "('" + BillType + "','" + BillType + "'," + HInterID + ",'" + oItem.HBillNo + "','"+ oItem .HDate+ "'" + |
| | | ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark + "','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" + |
| | | ",'0','"+ HRepairID + "','" + oItem.HRepairBeginDate + "','" + oItem.HRepairEndDate + "',''" + |
| | | ",'å°æ¶','" + oItem.HPlanTimes + "','" + oItem.HTimes + "','" + oItem.HEmpID + "',0" + |
| | | ",'" + oItem.HDeptID + "','','" + oItem.HInstanceID + "','" + oItem.HMouldID + "'" + |
| | | ",'0','å
é¨ç»´ä¿®','','" + oItem.HNewDesignLife + "','',0,0)"; |
| | | ",'0','å
é¨ç»´ä¿®','','" + oItem.HNewDesignLife + "','1',0,0" + |
| | | ",'"+ oItem.HRepairAccepDate + "')"; |
| | | LogService.Write(sql_main); |
| | | oCN.RunProc(sql_main); |
| | | int i = 1; |
| | |
| | | ",HRepairID,HRepairExplanation,HManagerID,HMoney) values" + |
| | | "('" + HInterID + "'," + i + ",'','','','" + oItem_Detail.HRemark + "'" + |
| | | ",0,0,'','',0,0" + |
| | | ",0,'" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "',0)"; |
| | | ","+ HRepairID + ",'" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "',0)"; |
| | | LogService.Write(sql_sub); |
| | | oCN.RunProc(sql_sub); |
| | | i += 1; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e.Message); |
| | | msg = e.Message; |
| | | oCN.RollBack(); |
| | | return false; |
| | |
| | | #region è·å 宿-设å¤ç»´ä¿®è®°å½å å®ä¾IDå表对åºçå®ä¾è¯¦æ
|
| | | public bool getInstanceDetailList___EquipRepairWeiXiu_YiDa(string appType, string systemToken, string userID, string formUuid, List<string> IDList, ref List<EquipRepairWeiXiu> lsmain, ref string msg, int size = 500) |
| | | { |
| | | |
| | | string a = ""; |
| | | try |
| | | { |
| | | int startIndex = 0; |
| | |
| | | continue; |
| | | } |
| | | |
| | | //æ¥ä¿®ç±»å« |
| | | if (keys.Contains("multiSelectField_lfg9hgyv")) |
| | | { |
| | | string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["multiSelectField_lfg9hgyv"])); |
| | | |
| | | oItem.HRepairCategory = HDate_Temp[0]; |
| | | } |
| | | |
| | | //ç´§æ¥ç¨åº¦ |
| | | if (keys.Contains("radioField_kzgkw10c")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["radioField_kzgkw10c"].ToString(); |
| | | |
| | | oItem.HUrgenLevel = HDate_Temp; |
| | | } |
| | | |
| | | //æ¥ä¿®äºº |
| | | if (keys.Contains("employeeField_lkasesrk")) |
| | | { |
| | | string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["employeeField_lkasesrk"])); |
| | | |
| | | oItem.HRepairer = HDate_Temp[0]; |
| | | } |
| | | |
| | | //æ¯å¦æäº§è½å½±å |
| | | if (keys.Contains("textField_lyjddw0r")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_lyjddw0r"].ToString(); |
| | | |
| | | oItem.HIsCapacityImpact = HDate_Temp; |
| | | } |
| | | |
| | | //ç»´ä¿®æ¶é´ |
| | | if (keys.Contains("textField_l2r95oo2")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_l2r95oo2"].ToString(); |
| | | bool containsNumber = HDate_Temp.Any(c => char.IsDigit(c)); |
| | | |
| | | if (!containsNumber) |
| | | { |
| | | HDate_Temp = "0"; |
| | | } |
| | | LogService.Write("1:------"+HDate_Temp+ ",2:------" + int.Parse(new string(HDate_Temp.Where(char.IsDigit).ToArray()))); |
| | | //a = HDate_Temp; |
| | | oItem.HTimes = int.Parse(new string(HDate_Temp.Where(char.IsDigit).ToArray())); |
| | | oItem.HPlanTimes = int.Parse(new string(HDate_Temp.Where(char.IsDigit).ToArray())); |
| | | } |
| | | |
| | | //设å¤ç¼ç |
| | | if (keys.Contains("textField_lfg9hgys")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_lfg9hgys"].ToString(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock) where HNumber='" + HDate_Temp + "'", "Gy_MouldFileMain"); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_EquipFileBillMain with(nolock) where HEquipFileNo='" + HDate_Temp + "'", "Gy_EquipFileBillMain"); |
| | | string HEquipID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | oItem.HEquipID = long.Parse(HEquipID); |
| | | oItem.HRemark2 = HDate_Temp; |
| | | } |
| | | |
| | | |
| | | //ç»´ä¿®é¨é¨ |
| | | if (keys.Contains("selectField_kzgkw10a")) |
| | |
| | | oItem.HDeptID = long.Parse(HDeptID); |
| | | } |
| | | |
| | | |
| | | //维修人 |
| | | if (keys.Contains("employeeField_lthwkdh2")) |
| | | { |
| | | string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["employeeField_lthwkdh2"])); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock) where HNumber='" + HDate_Temp[0] + "'", "Gy_Employee"); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock) where HName='" + HDate_Temp[0] + "'", "Gy_Employee"); |
| | | string HEmpID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HEmpID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | oItem.HEmpID = long.Parse(HEmpID); |
| | | } |
| | | |
| | | //ç»´ä¿®æ¶é´ |
| | | if (keys.Contains("textField_l2r95oo2")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_l2r95oo2"].ToString(); |
| | | |
| | | oItem.HTimes = long.Parse(HDate_Temp); |
| | | oItem.HPlanTimes = long.Parse(HDate_Temp); |
| | | } |
| | | |
| | | //ç»´ä¿®å
容 |
| | |
| | | if (keys.Contains("textareaField_lthwo99r")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textareaField_lthwo99r"].ToString(); |
| | | |
| | | oItem.HExplanation = HDate_Temp; |
| | | sub.HRepairExplanation = HDate_Temp; |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | //LogService.Write(a); |
| | | a = ""; |
| | | continue; |
| | | } |
| | | } |
| | |
| | | int pageNumber = 1; |
| | | int pageSize = 100; |
| | | |
| | | //è·å模å
·ç»´ä¿®ä¿å
»è¡¨çå®ä¾IDå表 |
| | | //è·å设å¤ç»´ä¿®ä¿å
»è¡¨çå®ä¾IDå表 |
| | | List<string> IDList = new List<string>(); |
| | | if (getInstanceIDList_YiDa(appType, systemToken, userID, formUuid, pageNumber, pageSize, ref IDList, ref msg) == false) |
| | | { |
| | |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | |
| | | DataSet dataSet = oCN.RunProcReturn(@"select HItemID from Gy_Repair a with(nolock) where a.HRemark like'%éé忥%' and HName like'%设å¤ç»´ä¿®%'", "Gy_Repair"); |
| | | string HRepairID = "0"; |
| | | if (dataSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | HRepairID = dataSet.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | |
| | | foreach (EquipRepairWeiXiu oItem in lsmain) |
| | | { |
| | | //ç»´ä¿®è®°å½ |
| | |
| | | ",HEquipID,HRepairID,HPlanTimes,HEmpID,HManagerID,HTimes" + |
| | | ",HDeptID,HExplanation,HInnerBillNo,HRepairBeginDate,HRepairEndDate" + |
| | | ",HRepairContent,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" + |
| | | ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ",HRepairCategory,HUrgenLevel,HRepairer,HIsCapacityImpact)" + |
| | | "values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark2 + "','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" + |
| | | ",'" + oItem.HEquipID + "','0','" + oItem.HTimes + "','" + oItem.HEmpID + "','" + oItem.HEmpID + "','" + oItem.HTimes + "'" + |
| | | ",'" + oItem.HDeptID + "','" + oItem.HExplanation + "','" + oItem.HInstanceID + "','',''" + |
| | | ",'" + oItem.HRepairContent + "','å°æ¶','','0',0)"; |
| | | ",'" + oItem.HEquipID + "','"+ HRepairID + "','" + oItem.HTimes + "','" + oItem.HEmpID + "','" + oItem.HEmpID + "','" + oItem.HTimes + "'" + |
| | | ",'" + oItem.HDeptID + "','"+ oItem.HExplanation + "','" + oItem.HInstanceID + "','"+ oItem.HMakeDate + "','" + oItem.HUpdateDate + "'" + |
| | | ",'" + oItem.HRepairContent + "','å°æ¶','æå·¥å½å
¥','0',0" + |
| | | ",'"+ oItem.HRepairCategory + "','" + oItem.HUrgenLevel + "','" + oItem.HRepairer + "','" + oItem.HIsCapacityImpact + "')"; |
| | | LogService.Write(sql_main); |
| | | oCN.RunProc(sql_main); |
| | | int i = 1; |
| | |
| | | ",HRepairID,HManagerID,HRepairExplanation,HEmpID)" + |
| | | "values('" + HInterID + "'," + i + ",'','','','" + oItem_Detail.HRemark + "'" + |
| | | ",0,0,'','',0,0" + |
| | | ",0,'" + oItem.HEmpID + "','" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "')"; |
| | | "," + HRepairID + ",'" + oItem.HEmpID + "','" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "')"; |
| | | LogService.Write(sql_sub); |
| | | oCN.RunProc(sql_sub); |
| | | i += 1; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e.Message); |
| | | msg = e.Message; |
| | | oCN.RollBack(); |
| | | return false; |
| | |
| | | ",HPlanTimes=" + omodel.HPlanTimes.ToString() + |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HRepairCategory='" + omodel.HRepairCategory + "'" + |
| | | ",HUrgenLevel='" + omodel.HUrgenLevel + "'" + |
| | | ",HRepairer='" + omodel.HRepairer + "'" + |
| | | ",HIsCapacityImpact='" + omodel.HIsCapacityImpact + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HRepairContent='" + omodel.HRepairContent + "'" + |
| | | ",HMainSourceBillType='"+ omodel.HMainSourceBillType+"'"+ |
| | |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HEquipID,HRepairID,HPlanTimes,HEmpID,HManagerID,HTimes" + |
| | | ",HDeptID,HExplanation,HInnerBillNo,HRepairBeginDate,HRepairEndDate,HRepairContent,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" + |
| | | ",HRepairCategory,HUrgenLevel,HRepairer,HIsCapacityImpact" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" + |
| | | ", " + omodel.HEquipID.ToString() + "," + omodel.HRepairID.ToString() + "," + omodel.HPlanTimes.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HTimes.ToString() + |
| | | ", " + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','" + omodel.HRepairBeginDate + "','" + omodel.HRepairEndDate + "','" + omodel.HRepairContent + "','" + omodel.HCycleUnit + "','" + |
| | | omodel.HMainSourceBillType+"',"+ omodel.HMainSourceInterID.ToString()+","+ omodel.HMainSourceEntryID.ToString() + |
| | | ") "); |
| | | ",'"+ omodel.HRepairCategory + "','" + omodel.HUrgenLevel + "','" + omodel.HRepairer + "','" + omodel.HIsCapacityImpact + "') "); |
| | | //æå
¥å表 |
| | | foreach (Models.ClsSb_EquipRepairWorkBillSub oSub in DetailColl) |
| | | { |
| | |
| | | public string HCycleUnit;//varchar(10) --æ¶é´åä½(å°æ¶ï¼å¤©) |
| | | public Single HPlanTimes;// money --计åç»´ä¿®å·¥æ¶ |
| | | public Single HTimes;// money --å®é
ç»´ä¿®å·¥æ¶ |
| | | |
| | | public string HRepairCategory;// --æ¥ä¿®ç±»å« |
| | | public string HUrgenLevel;// --ç´§æ¥ç¨åº¦ |
| | | public string HRepairer;// --æ¥ä¿®äºº |
| | | public string HIsCapacityImpact;// --æ¯å¦æäº§è½å½±å |
| | | |
| | | } |
| | | } |
| | |
| | | E:\æºäºmes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache |
| | | E:\æºäºmes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll |
| | | E:\æºäºmes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb |
| | | E:\æºäºmes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache |