| | |
| | | |
| | | [Route("Sc_MESBeginStepWorkBill/GetMESBeginStepWorkBill")] |
| | | [HttpGet] |
| | | public object GetMESBeginStepWorkBill(string sWhere,string user) |
| | | public object GetMESBeginStepWorkBill(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | LogService.Write("æ§è¡äº1"); |
| | | string sql1 = "select * from h_v_Sc_MESBeginWorkBillList_NEW where 1 = 1 "; |
| | | string sql = sql1 + sWhere+ " order by hmainid desc "; |
| | | string sql = sql1 + sWhere + " order by hmainid desc "; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MESBeginWorkBillList_NEW"); |
| | | } |
| | | |
| | |
| | | oItemSub.HOtherItem4 = ""; |
| | | oItemSub.HOtherItem5 = ""; |
| | | oItemSub.HPackType = ""; |
| | | oItemSub.HBatchNo=""; |
| | | oItemSub.HBatchNo = ""; |
| | | //oItemSub.HRelationMoney = 0; //å
³èéé¢ |
| | | //oItemSub.HRepairID = 0; //ç»´ä¿®é¡¹ç® |
| | | //oItemSub.HRepairExplanation =""; //ç»´ä¿®è¦æ± |
| | |
| | | |
| | | oCN.BeginTran(); |
| | | //å é¤å·¥åºæ±æ¥å表 |
| | | string sql1 = string.Format(@"delete Sc_ProcessReportSub where HInterID='"+HInterID+"' and HICMOInterID='" + HICMOInterID + "' and HICMOEntryID='" + HICMOEntryID + "'"); |
| | | string sql1 = string.Format(@"delete Sc_ProcessReportSub where HInterID='" + HInterID + "' and HICMOInterID='" + HICMOInterID + "' and HICMOEntryID='" + HICMOEntryID + "'"); |
| | | oCN.RunProc(sql1); |
| | | //å é¤å·¥åºæ±æ¥ä¸»è¡¨ |
| | | string sql = string.Format(@"delete Sc_ProcessReportMain where HInterID='" + HInterID + "'"); |
| | |
| | | #region æ¥å·¥å¹³å°æ¥æ£ç³è¯·ä¿å |
| | | [Route("Sc_MESBeginStepWorkBill/SaveGetMESProductReportBillList")] |
| | | [HttpGet] |
| | | public object SaveGetMESProductReportBillList(string ScMaxWork, string HSourceBillType, string workcode, int HSourceID, int HICMOInterID, int HICMOEntryID, string HMaker, string Czybm,string HProcID) |
| | | public object SaveGetMESProductReportBillList(string ScMaxWork, string HSourceBillType, string workcode, int HSourceID, int HICMOInterID, int HICMOEntryID, string HMaker, string Czybm, string HProcID) |
| | | { |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | |
| | | //model.HPRDORGID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HPRDORGID"]); |
| | | model.HMainSourceInterID = HICMOInterID; |
| | | model.HMainSourceEntryID = HICMOEntryID; |
| | | |
| | | |
| | | |
| | | //oWebs.Timeout = 30000; |
| | | bool flag = oWebs.set_SaveICMOProductReportBill_LayuiYqn(model, workcode, HSourceID, sHSourceType, HProcID, ref DBUtility.ClsPub.sErrInfo); |
| | |
| | | try |
| | | { |
| | | //夿æ¯å¦æç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("MES_ProcExchReport_Edit",1,false,user)) |
| | | if (!DBUtility.ClsPub.Security_Log("MES_ProcExchReport_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | if (oBill.omodel.HInterID == 0) |
| | | { |
| | | oCN.BeginTran(); |
| | | //ä¿®æ¹éè¶ç产åçç¶æ |
| | | oCN.RunProc("update AIS20200908101915zs..T_PRD_MOENTRY_A set FSTATUS=4,FPLANCONFIRMDATE=getdate() where FENTRYID=" + (EntyID).Split('-')[1]); |
| | | //访é®éè¶ |
| | | var loginRet = InvokeHelper.Login(); |
| | | var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); |
| | | if (isSuccess == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æä½å¤±è´¥,éè¶è´¦å·ç»å½å¼å¸¸ã" + loginRet; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | var json = new |
| | | { |
| | | //CreateOrgId = 0, |
| | | Numbers = BillNo, |
| | | //Ids = (EntyID).Split('-')[0], |
| | | PkEntryIds = (EntyID).Split('-')[1] |
| | | }; |
| | | Console.Write("json="+json); |
| | | var result = InvokeHelper.ExcuteOperation("PRD_MO", "ToStart", JsonConvert.SerializeObject(json)); |
| | | if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "对åºéè¶äºçäº§è®¢åæ´æ¹å¼å·¥ç¶æå¤±è´¥ï¼" + result; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //æ§è¡ä¿å |
| | | //var loginRet = InvokeHelper.Login(); |
| | | //var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); |
| | | //if (isSuccess == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æä½å¤±è´¥,éè¶è´¦å·ç»å½å¼å¸¸ã" + loginRet; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //var json = new |
| | | //{ |
| | | // //CreateOrgId = 0, |
| | | // Numbers = BillNo, |
| | | // //Ids = (EntyID).Split('-')[0], |
| | | // PkEntryIds = (EntyID).Split('-')[1] |
| | | //}; |
| | | //Console.Write("json=" + json); |
| | | //var result = InvokeHelper.ExcuteOperation("PRD_MO", "ToStart", JsonConvert.SerializeObject(json)); |
| | | //if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | //{ |
| | | // oCN.RollBack(); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "对åºéè¶äºçäº§è®¢åæ´æ¹å¼å·¥ç¶æå¤±è´¥ï¼" + result; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | ////æ§è¡ä¿å |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (bResult) |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | | } |