| | |
| | | ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" + |
| | | ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" + |
| | | ",HTechnologyParameter,HPicNum,HProcCheckNote" + |
| | | ",HOverRate" + |
| | | ",HOverRate,HWorkTimes_S,HSNCtrl" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HProcNo.ToString() + "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" + |
| | | "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() + |
| | |
| | | "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + "," + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() + |
| | | ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() + |
| | | ",'" + oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() + |
| | | "', " + oSub.HOverRate.ToString() + |
| | | "', " + oSub.HOverRate.ToString() + "," + oSub.HWorkTimes_S.ToString() + "," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) + |
| | | ") "); |
| | | } |
| | | // |
| | | oCn.RunProc("exec h_p_Gy_RoutingBillCheck " + omodel.HInterID.ToString()); //设置é»è®¤å·¥èºè·¯çº¿ |
| | | oCn.RunProc("exec h_p_Gy_RoutingBillCheck " + omodel.HInterID.ToString() + ",'" + DBUtility.ClsPub.CurUserName + "'"); //设置é»è®¤å·¥èºè·¯çº¿ |
| | | //oCn.RunProc("exec h_p_Sc_ProcessExchangeBillSetUpdate " + omodel.HInterID.ToString()); //设置é¦éæ«é æµè½¬æ è®° ç åæ®µã |
| | | // |
| | | //夿æ¯å¦éå¤å·¥åºå· |
| | |
| | | ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" + |
| | | ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" + |
| | | ",HTechnologyParameter,HPicNum,HProcCheckNote" + |
| | | ",HOverRate,HProcWorkNum" + |
| | | ",HOverRate,HProcWorkNum,HWorkTimes_S,HSNCtrl" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HProcNo.ToString() + "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" + |
| | | "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() + |
| | |
| | | "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + ", " + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() + |
| | | ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() + |
| | | ",'"+ oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() + |
| | | "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'" + |
| | | "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HWorkTimes_S.ToString() + "," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) + |
| | | ") "); |
| | | } |
| | | // |
| | | oCn.RunProc("exec h_p_Gy_RoutingBillCheck " + omodel.HInterID.ToString()); //设置é»è®¤å·¥èºè·¯çº¿ |
| | | oCn.RunProc("exec h_p_Gy_RoutingBillCheck " + omodel.HInterID.ToString() + ",'" + DBUtility.ClsPub.CurUserName + "'"); //设置é»è®¤å·¥èºè·¯çº¿ |
| | | //oCn.RunProc("exec h_p_Sc_ProcessExchangeBillSetUpdate " + omodel.HInterID.ToString()); //设置é¦éæ«é æµè½¬æ è®° ç åæ®µã |
| | | // |
| | | //夿æ¯å¦éå¤å·¥åºå· |
| | |
| | | { |
| | | //æ¥è¯¢ä¸»è¡¨ |
| | | DataSet Ds ; |
| | | Ds = oCn.RunProcReturn("Select * from Gy_RoutingBillMain Where HInterID=" + lngBillKey.ToString()+" and HPRDORGID='"+DBUtility.ClsPub.HOrgID.ToString()+"'", "Gy_RoutingBillMain"); |
| | | Ds = oCn.RunProcReturn("Select * from Gy_RoutingBillMain Where HInterID=" + lngBillKey.ToString(), "Gy_RoutingBillMain"); |
| | | if(Ds.Tables[0].Rows.Count==0) |
| | | { |
| | | sReturn = "åæ®æªæ¾å°ï¼"; |
| | |
| | | } |
| | | //èµå¼ |
| | | omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString()); |
| | | omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"].ToString()); |
| | | |
| | | omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); |
| | | omodel.HName = Ds.Tables[0].Rows[0]["HName"].ToString().Trim(); |
| | | omodel.HDate = Convert.ToDateTime(Ds.Tables[0].Rows[0]["HDate"].ToString().Trim()); |
| | |
| | | oSub.HPicNum = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HPicNum"]); |
| | | oSub.HProcCheckNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcCheckNote"]); |
| | | oSub.HOverRate = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HOverRate"]); |
| | | oSub.HWorkTimes_S = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWorkTimes_S"]); |
| | | oSub.HSNCtrl = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HSNCtrl"]); |
| | | DetailColl.Add(oSub); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |
| | |
| | | } |
| | | } |
| | | |
| | | //驳å |
| | | public override bool RejectCheckFlowProgress(Int64 lngBillKey, string HBillNo, string sUser, ref string sReturn) |
| | | { |
| | | |
| | | if (isUse(lngBillKey, ref sReturn)) |
| | | { |
| | | return false; |
| | | } |
| | | try |
| | | { |
| | | //å¼å¯äºå¡ |
| | | oCn.BeginTran(); |
| | | |
| | | //夿æ¯å¦åå¨å®¡æ ¸è¿çé¡¹ç® |
| | | //string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + this.BillType + "' and ISNULL(HChecker,'') <> ''"; |
| | | //DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); |
| | | //if (ds0 != null && ds0.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // sReturn = "åæ®ä¸åå¨å·²ç»å®¡æ ¸ç项ç®ï¼"; |
| | | // return false; |
| | | //} |
| | | |
| | | //è·åéè¦é©³åçå®¡æ ¸é¡¹ç® |
| | | string sql0 = "select c.* from Xt_CheckFlowMain as a " + |
| | | "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " + |
| | | "inner join Xt_BillCheckFlowStatus as c on a.HBillTypeID = c.HBillTypeID and b.HCheckItemID = c.HCheckItemID " + |
| | | "where c.HBillTypeID = '" + this.BillType + "' and c.HBillInterID = " + lngBillKey + " " + |
| | | "order by b.HFlowNo asc"; |
| | | DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); |
| | | if (ds0 == null || ds0.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "驳å失败!åå :æªå起审æ¹ï¼ï¼"; |
| | | return false; |
| | | } |
| | | //è·åå½åå®¡æ ¸é¡¹ç® |
| | | string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString(); //å®¡æ¹æµå
ç |
| | | sql0 = "select * from " + MvarItemKey + " where HInterID = " + lngBillKey; |
| | | ds0 = oCn.RunProcReturn(sql0, MvarItemKey); |
| | | string HCheckItemNowID = ds0.Tables[0].Rows[0]["HCheckItemNowID"].ToString(); //å½å审æ¹é¡¹ç®å
ç |
| | | //æ¥æ¾æ¯å¦ææé |
| | | string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + sUser + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + ""; |
| | | DataSet ds01 = oCn.RunProcReturn(sql01, "Xt_CheckUserRight"); |
| | | //è·åç¨æ·åç§° |
| | | DataSet DsUser = new DataSet(); |
| | | DsUser = oCn.RunProcReturn("select * from gy_czygl where czybm='" + sUser.Trim() + "'", "gy_czygl"); |
| | | if(DsUser.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "æ æ³æ¾å°è¯¥ç¨æ·ï¼"; |
| | | return false; |
| | | } |
| | | string userName = DsUser.Tables[0].Rows[0]["czymc"].ToString(); |
| | | |
| | | if (ds01.Tables[0].Rows.Count == 0 && !DBUtility.ClsPub.Security_Log_second("Gy_RoutingBill_Check", 1, false, userName))//åæ®åå®¡æ ¸æé为å¤çº§å®¡æ ¸é©³åæé |
| | | { |
| | | sReturn = "æ æéï¼"; |
| | | return false; |
| | | } |
| | | //æ´æ° 驳åå é¤å®¡æ ¸æµç¶æè¡¨ |
| | | string sql02 = "Delete Xt_BillCheckFlowStatus where HBillTypeID = '" + this.BillType + "' and HBillInterID=" + lngBillKey + " and HCheckFlowID=" + HCheckFlowID; |
| | | oCn.RunProc(sql02); |
| | | oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=5,HCheckItemNowID = 0,HCheckItemNextID = 0 Where HInterID=" + lngBillKey.ToString()); |
| | | |
| | | //åå
¥æ¥å¿ |
| | | string WorkList = "驳ååæ®ï¼åæ®å·ï¼" + HBillNo; |
| | | string SystemName = "LMES-" + MvarReportTitle + "模å"; |
| | | oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " + |
| | | "(getdate(),'" + sUser + "','" + "111" + "','" + WorkList + "','" + SystemName + "','" + "1111" + "','驳å')" |
| | | ); |
| | | |
| | | sReturn = "åå®¡æ ¸åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | |
| | | //å¯ç¨å·¥èºè·¯çº¿ |
| | | public bool Sub_RoutingCheckAndUsed(Int64 HInterID) |
| | | { |