Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | ",HMainSourceBillType=" + omodel.HMainSourceBillType.ToString() + |
| | | ",HMainSourceInterID=" + omodel.HMainSourceInterID.ToString() + |
| | | ",HMainSourceEntryID=" + omodel.HMainSourceEntryID.ToString() + |
| | | ",HMainSourceBillNo=" + omodel.HMainSourceBillNo.ToString() + |
| | | ",HMainSourceBillNo='" + omodel.HMainSourceBillNo.ToString() +"'"+ |
| | | ",HSourceID=" + omodel.HSourceID.ToString() + |
| | | ",HProcID=" + omodel.HProcID.ToString() + |
| | | ",HMaterID=" + omodel.HMaterID.ToString() + |
| | |
| | | ",'" + oSub.HBarCode + "','" + oSub.HBarCode_Pack + "','" + oSub.HBillNo_bak + "'" + |
| | | ") "); |
| | | } |
| | | sReturn = "ä¿®æ¹åæ®æåï¼"; |
| | | sReturn = omodel.HInterID.ToString(); |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | //å é¤åæ® |
| | | public override bool DeleteBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //夿æ¯å¦å
许å é¤ |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_Sc_MaterToSourceBill_DelCtrl @HInterId=" + lngBillKey + "", "h_p_Sc_MaterToSourceBill_DelCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | sReturn = "æ éªè¯æ°æ®ï¼"; |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | return false; |
| | | } |
| | | |
| | | //å é¤å
³èå
³ç³» |
| | | oCn.RunProc("exec h_p_Sc_MaterToSourceBill_DelRelation @HInterId=" + lngBillKey + ""); |
| | | |
| | | //å 餿ç»è¡¨ |
| | | oCn.RunProc("Delete From " + MvarItemKeySub + " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤ä¸»è¡¨ |
| | | oCn.RunProc("Delete From " + MvarItemKey + " where HInterID=" + lngBillKey.ToString()); |
| | | |
| | | sReturn = "å é¤åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //å®¡æ ¸ |
| | | public bool CheckBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | |
| | | " (HInterID,HEntryID," + |
| | | "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + |
| | | "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + |
| | | "HDotCheckItem,HDotCheckPart,HClaim," + |
| | | "HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," + |
| | | "HManagerID,HManagerNumber" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + |
| | | ",'" + oSub.HCloseMan + "','"+oSub.HEntryCloseDate+"'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + |
| | | ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | ",'" + oSub.HDotCheckItem + "','"+oSub.HDotCheckPart+"','" + oSub.HClaim + |
| | | "'," + oSub.HManagerID.ToString()+",'" +oSub.HManagerNumber+"'"+ |
| | | ",'" + oSub.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + |
| | | "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'" + |
| | | ") "); |
| | | } |
| | | // |
| | |
| | | |
| | | #region 设å¤ç¹æ£è®°å½è¡¨ ä¿å/ç¼è¾ |
| | | /// <summary> |
| | | /// ä¿å模å
·ç»´ä¿®å |
| | | /// ç¹æ£è®°å½è¡¨ ä¿å |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sqlWhere == null || sqlWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select ç¹æ£é¡¹ç® HDotCheckItem,ç¹æ£é¨ä½ HDotCheckPart ,å
·ä½è¦æ± HClaim,表ä½å¤æ³¨ HRemark,è´è´£äººID HManagerID,è´è´£äººç¼ç HManagerCode,è´è´£äºº HManagerName from h_v_Sb_EquipDotCheckBillList", "h_v_Sb_EquipDotCheckBillList"); |
| | | ds = oCN.RunProcReturn("select ç¹æ£é¡¹ç®ID HDotCheckItemID,ç¹æ£é¡¹ç®ä»£ç as HDotCheckCode ,ç¹æ£é¡¹ç® HDotCheckItem,ç¹æ£é¨ä½ HDotCheckPart ,å
·ä½è¦æ± HClaim,表ä½å¤æ³¨ HRemark,è´è´£äººID HManagerID,è´è´£äººç¼ç HManagerCode,è´è´£äºº HManagerName from h_v_Sb_EquipDotCheckBillList", "h_v_Sb_EquipDotCheckBillList"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select ç¹æ£é¡¹ç® HDotCheckItem,ç¹æ£é¨ä½ HDotCheckPart,å
·ä½è¦æ± HClaim,表ä½å¤æ³¨ HRemark,è´è´£äººID HManagerID,è´è´£äººç¼ç HManagerCode,è´è´£äºº HManagerName from h_v_Sb_EquipDotCheckBillList where 1 = 1 "; |
| | | string sql1 = "select ç¹æ£é¡¹ç®ID HDotCheckItemID,ç¹æ£é¡¹ç®ä»£ç as HDotCheckCode ,ç¹æ£é¡¹ç® HDotCheckItem,ç¹æ£é¨ä½ HDotCheckPart,å
·ä½è¦æ± HClaim,表ä½å¤æ³¨ HRemark,è´è´£äººID HManagerID,è´è´£äººç¼ç HManagerCode,è´è´£äºº HManagerName from h_v_Sb_EquipDotCheckBillList where 1 = 1 "; |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList"); |
| | | objJsonResult.code = "0"; |
| | |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | | } |
| | | #endregion |
| | | #region[设å¤ç¹æ£è®¡å表ç¼è¾æ¶è·åè¡¨é¢æ°æ®] |
| | | #region[设å¤ç¹æ£è®¡å表ç¼è¾æ¶è·åè¡¨ä½æ°æ®] |
| | | [Route("Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListProjectDetai")] |
| | | [HttpGet] |
| | | public object Sb_EquipDotCheckPlanBillListProjectDetai(string sqlWhere) |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sqlWhere == null || sqlWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select ç¹æ£é¡¹ç® HDotCheckItem,ç¹æ£é¨ä½ HDotCheckPart ,å
·ä½è¦æ± HClaim,表ä½å¤æ³¨ HRemark,è´è´£äººä»£ç HManagerID,è´è´£äºº HManagerName from h_v_Sb_EquipDotCheckPlanBillList", "h_v_Sb_EquipDotCheckPlanBillList"); |
| | | ds = oCN.RunProcReturn("select ç¹æ£é¡¹ç®ID HDotCheckItemID,ç¹æ£é¡¹ç®ä»£ç HDotCheckCode ,ç¹æ£é¡¹ç® HDotCheckItem,ç¹æ£é¨ä½ HDotCheckPart ,å
·ä½è¦æ± HClaim,表ä½å¤æ³¨ HRemark,è´è´£äººID HManagerID,è´è´£äººä»£ç HManagerCode,è´è´£äºº HManagerName from h_v_Sb_EquipDotCheckPlanBillList", "h_v_Sb_EquipDotCheckPlanBillList"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select ç¹æ£é¡¹ç® HDotCheckItem,ç¹æ£é¨ä½ HDotCheckPart ,å
·ä½è¦æ± HClaim,表ä½å¤æ³¨ HRemark,è´è´£äººä»£ç HManagerID,è´è´£äºº HManagerName from h_v_Sb_EquipDotCheckPlanBillList where 1 = 1 "; |
| | | string sql1 = "select ç¹æ£é¡¹ç®ID HDotCheckItemID,ç¹æ£é¡¹ç®ä»£ç HDotCheckCode ,ç¹æ£é¡¹ç® HDotCheckItem,ç¹æ£é¨ä½ HDotCheckPart ,å
·ä½è¦æ± HClaim,表ä½å¤æ³¨ HRemark,è´è´£äººID HManagerID,è´è´£äººä»£ç HManagerCode,è´è´£äºº HManagerName from h_v_Sb_EquipDotCheckPlanBillList where 1 = 1 "; |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanBillList"); |
| | | objJsonResult.code = "0"; |
| | |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_MaterToSourceBillList " + sWhere, "h_v_Sc_MaterToSourceBillList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_MaterToSourceBillMain " + sWhere, "h_v_Sc_MaterToSourceBillMain"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sc_MaterToSourceBillList where 1 = 1 "; |
| | | string sql1 = "select * from h_v_Sc_MaterToSourceBillMain where 1 = 1 "; |
| | | string sql = sql1 + sWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_MaterToSourceBillList"); |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_MaterToSourceBillMain"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [䏿é²éåå é¤åè½] |
| | | /// <summary> |
| | | /// å¼å·¥åå é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sc_MaterToSourceBill/DeltetMaterToSourceBill")] |
| | | [HttpGet] |
| | | public object DeltetMaterToSourceBill(string HInterID, string UserName) |
| | | { |
| | | DBUtility.ClsPub.CurUserName = UserName; |
| | | //ç¼è¾æé |
| | | //if (!DBUtility.ClsPub.Security_Log("MES_MaterToSourceBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ å 餿éï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | if (lngBillKey == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DAL.ClsSc_MESMaterToSourceBill oBill = new DAL.ClsSc_MESMaterToSourceBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | if (oBill.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å½åå¤äºä¸è½å é¤ç¶æ,ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HChecker != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ç»å®¡æ ¸,ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (IsDete) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªæ¾å°"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | |
| | | else |
| | | { |
| | | bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //è¿å主ID |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | if (bResult) |
| | |
| | | "," + omodel.HSourceInterID.ToString() + "," + omodel.HSourceEntryID.ToString() + ",'" + omodel.HSourceBillNo + "','" + omodel.HSplitNO + "','" + omodel.HSourceBillType + "'" + |
| | | "," + omodel.HRelationInterID.ToString() + "," + omodel.HRelationEntryID.ToString() + ",'" + omodel.HRelationBillNo + "'," + omodel.HReportEntryID.ToString() + |
| | | ") "); |
| | | double sumqty = omodel.HQty + omodel.HBadQty + omodel.HWasterQty; //æ±æ¥æ°é+ä¸è¯+æ¥åº |
| | | //ååçäº§ç¶æä¸´æ¶è¡¨Sc_ICMOBillStatus_Tmpæåæ±æ¥æ°é HSplitRelationQty |
| | | oCn.RunProc("update Sc_ICMOBillStatus_Tmp set HSplitRelationQty=HSplitRelationQty+"+ sumqty + " where HICMOBillNo='"+omodel.HICMOBillNo+"' and HSourceID='"+omodel.HSourceID+"' and HICMOInterID='"+omodel.HICMOInterID+"' and HICMOEntryID='"+omodel.HICMOEntryID+"'"); |
| | | |
| | | //忬¡éªè¯ ä¿åæ¯å¦ åç |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl"); |
| | |
| | | <WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected> |
| | | <WebStackScaffolding_LayoutPageFile /> |
| | | <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected> |
| | | <NameOfLastUsedPublishProfile>D:\Gitä»åº\项ç®\MESWMS\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> |
| | | <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> |
| | | <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> |
| | | <UseIISExpress>false</UseIISExpress> |
| | | <Use64BitIISExpress /> |