| | |
| | | public string HNewModel;// varchar(100) --ç»´ä¿®åæ°è§æ ¼ addnew |
| | | public Single HNewDesignLife;// money --æ°è®¾è®¡å¯¿å½ |
| | | public string HRemark; |
| | | public string HPlanNo; |
| | | public string HPlanInterID; |
| | | public DateTime HRequestComDate; |
| | | public double HRecentMainModule; |
| | | public double HCumulativeModule; |
| | | public double HProductionModule; |
| | | public DateTime HRepairAccepDate; |
| | | public string HMaintainLevID; |
| | | |
| | | |
| | | |
| | |
| | | //OriginatorId = "12", //æ ¹æ®æµç¨åèµ·äººå·¥å·æ¥è¯¢ã |
| | | |
| | | //TaskId = "12", //ä»»å¡IDã |
| | | //CreateFromTimeGMT = DateTime.Now.AddMonths(-10).ToString("yyyy-MM-dd"), //å建æ¶é´èµ·å§å¼ã |
| | | //CreateToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), //å建æ¶é´ç»æ¢å¼ã |
| | | //CreateFromTimeGMT = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd"), //å建æ¶é´èµ·å§å¼ã |
| | | //CreateToTimeGMT = DateTime.Now.AddDays(1).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"), //ä¿®æ¹æ¶é´ç»æ¢å¼ã |
| | | |
| | |
| | | |
| | | if (getInstanceByIdResponse.Body.InstanceStatus != "COMPLETED") |
| | | { |
| | | continue; |
| | | //continue; |
| | | } |
| | | |
| | | //å¼åæ¥æ |
| | |
| | | { |
| | | 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("selectField_m1ip9j31")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["selectField_m1ip9j31"].ToString(); |
| | | if (!HDate_Temp.Contains("ä¸çº§")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_MaintainLev where ä¿å
»çº§å«ä»£ç ='BY-SE-002'", "h_v_Gy_MaintainLev"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HDate_Temp = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | } |
| | | else if (HDate_Temp.Contains("ä¸çº§")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_MaintainLev where ä¿å
»çº§å«ä»£ç ='BY-SE-003'", "h_v_Gy_MaintainLev"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HDate_Temp = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | } |
| | | |
| | | oItem.HMaintainLevID = HDate_Temp; |
| | | } |
| | | |
| | | //修模å¼å§æ¶é´ |
| | |
| | | } |
| | | oItem.HMouldID = long.Parse(HMouldID); |
| | | oItem.HRemark = HDate_Temp; |
| | | |
| | | |
| | | //æ¥è¯¢ä¿å
»è®¡å |
| | | ds = oCN.RunProcReturn(@"select a.HInterID,a.HBillNo from Sc_MouldMaintainPlanBillMain a |
| | | inner join Sc_MouldMaintainPlanBillSub b on a.HInterID = b.HInterID |
| | | where a.HMouldID =" + oItem.HMouldID + " and a.HMaintainLevID = " + oItem.HMaintainLevID, "Sc_MouldMaintainPlanBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) { |
| | | oItem.HPlanInterID = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | oItem.HPlanNo = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | ",HPlanNo,HPlanInterID,HMouldID,HBeginDate" + |
| | | ",HEndDate" + |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID,HLastResult" + |
| | | ",HRequestComDate,HRecentMainModule,HCumulativeModule,HProductionModule)" + |
| | | ",HRequestComDate,HRecentMainModule,HCumulativeModule,HProductionModule" + |
| | | ",HPlanInterID,HPlanNo,HMaintainLevID)" + |
| | | "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 + "','',"+ HMouldMaintainRuleInterID + ",0,'OK'" + |
| | | ",'"+ oItem.HRequestComDate + "'," + oItem.HRecentMainModule + "," + oItem.HCumulativeModule + "," + oItem.HProductionModule + ")"; |
| | | ",'"+ oItem.HRequestComDate + "'," + oItem.HRecentMainModule + "," + oItem.HCumulativeModule + "," + oItem.HProductionModule + "" + |
| | | "," + oItem.HPlanInterID + "," + oItem.HPlanNo + "," + oItem.HMaintainLevID + ")"; |
| | | LogService.Write(sql_main); |
| | | oCN.RunProc(sql_main); |
| | | int i = 1; |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (oItem.HInstanceID != "9b6e108c-b7bf-45e4-910d-5629ac30d4aa") { |
| | | continue; |
| | | } |
| | | |
| | | //设å¤ç¼ç |
| | | if (keys.Contains("textField_lfg9hgys")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_lfg9hgys"].ToString(); |
| | | 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) |
| | | { |
| | | HEquipID = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | oItem.HEquipID = long.Parse(HEquipID); |
| | | oItem.HRemark2 = HDate_Temp; |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | //ç»´ä¿®é¨é¨ |
| | | if (keys.Contains("selectField_kzgkw10a")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["selectField_kzgkw10a"].ToString(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Department with(nolock) where HName='" + HDate_Temp + "'", "Gy_Department"); |
| | | string HDeptID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HDeptID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | oItem.HDeptID = long.Parse(HDeptID); |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | } |
| | | |
| | | //维修人 |
| | | 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 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); |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | } |
| | | |
| | | //ç»´ä¿®å
容 |
| | | if (keys.Contains("textField_l2r9bvwk")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_l2r9bvwk"].ToString(); |
| | | |
| | | oItem.HRepairContent = HDate_Temp; |
| | | } |
| | | |
| | | //æ¥ä¿®ç±»å« |
| | | if (keys.Contains("multiSelectField_lfg9hgyv")) |
| | | { |
| | |
| | | { |
| | | HDate_Temp = "0"; |
| | | } |
| | | LogService.Write("1:------"+HDate_Temp+ ",2:------" + int.Parse(new string(HDate_Temp.Where(char.IsDigit).ToArray()))); |
| | | //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_EquipFileBillMain with(nolock) where HEquipFileNo='" + HDate_Temp + "'", "Gy_EquipFileBillMain"); |
| | | string HEquipID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HEquipID = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | } |
| | | oItem.HEquipID = long.Parse(HEquipID); |
| | | oItem.HRemark2 = HDate_Temp; |
| | | } |
| | | |
| | | //ç»´ä¿®é¨é¨ |
| | | if (keys.Contains("selectField_kzgkw10a")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["selectField_kzgkw10a"].ToString(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Department with(nolock) where HName='" + HDate_Temp + "'", "Gy_Department"); |
| | | string HDeptID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HDeptID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | 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 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_l2r9bvwk")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_l2r9bvwk"].ToString(); |
| | | |
| | | oItem.HRepairContent = HDate_Temp; |
| | | } |
| | | |
| | | |
| | | //å表 ç»´ä¿®è¦æ± ç»´ä¿®å¤æ³¨(é®é¢æè¿°) |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | //LogService.Write(a); |
| | | LogService.Write(e.Message); |
| | | a = ""; |
| | | continue; |
| | | } |