| | |
| | | |
| | | if (getInstanceByIdResponse.Body.InstanceStatus != "COMPLETED") |
| | | { |
| | | //continue; |
| | | continue; |
| | | } |
| | | |
| | | //å¼åæ¥æ |
| | |
| | | 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"); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock) where HMouldNo='" + HDate_Temp + "'", "Gy_MouldFileMain"); |
| | | string HMouldID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | 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"); |
| | | |
| | | oItem.HPlanInterID = ""; |
| | | 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(); |
| | |
| | | string sql_main = "Insert Into Sc_MouldMaintainBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HUpDateDate" + |
| | | ",HPlanNo,HPlanInterID,HMouldID,HBeginDate" + |
| | | ",HMouldID,HBeginDate" + |
| | | ",HEndDate" + |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID,HLastResult" + |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HLastResult" + |
| | | ",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.HMouldID + "','" + oItem.HRepairBeginDate + "'" + |
| | | ",'" + oItem.HRepairEndDate + "'" + |
| | | ",'" + oItem.HInstanceID + "','',"+ HMouldMaintainRuleInterID + ",0,'OK'" + |
| | | ",'" + oItem.HInstanceID + "','',"+ HMouldMaintainRuleInterID + ",'OK'" + |
| | | ",'"+ oItem.HRequestComDate + "'," + oItem.HRecentMainModule + "," + oItem.HCumulativeModule + "," + oItem.HProductionModule + "" + |
| | | "," + oItem.HPlanInterID + "," + oItem.HPlanNo + "," + oItem.HMaintainLevID + ")"; |
| | | "," + (oItem.HPlanInterID == "" ? "0" : 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 (oItem.HInstanceID != "9b6e108c-b7bf-45e4-910d-5629ac30d4aa") { |
| | | // continue; |
| | | //} |
| | | |
| | | //设å¤ç¼ç |
| | | if (keys.Contains("textField_lfg9hgys")) |