| | |
| | | } |
| | | #endregion |
| | | |
| | | #region æå¼å¡åæ´å æ°å¢ä¿å |
| | | [Route("MES_Sc_ProcessExchangeBillMain_Note_PDA/ProcessExchangeBillMain_NoteAddBill")] |
| | | [HttpPost] |
| | | public object ProcessExchangeBillMain_NoteAddBill([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | try |
| | | { |
| | | //ååºåå |
| | | string msg2 = "[" + sArray[0].ToString() + "]"; |
| | | string user = sArray[1].ToString();//ç¨æ·å |
| | | string OperationType = sArray[2].ToString();//ç±»å |
| | | |
| | | //夿æ¯å¦æç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Change", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ åæ´æé!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<Model.Sc_ProcessExchangeBillMain_Note> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.Sc_ProcessExchangeBillMain_Note>>(msg2); |
| | | |
| | | long HSouceID_Original = list[0].HSouceID_Original; |
| | | long HSouceID_Now = list[0].HSouceID_Now; |
| | | long HOrgID = list[0].HOrgID;//ç»ç»ID |
| | | String HICMOBillNo = list[0].HICMOBillNo;//ä»»å¡å |
| | | long HICMOInterID = list[0].HICMOInterID;//ä»»å¡åID |
| | | long HProcExchInterID = list[0].HProcExchInterID; |
| | | long HProcExchEntryID = list[0].HProcExchEntryID; |
| | | String HProcExchBillNo = list[0].HProcExchBillNo; |
| | | String HBillNo_Note = list[0].HBillNo_Note;//æå¼å¡ |
| | | long HMaterID = list[0].HMaterID;//产åID |
| | | long HUnitID = list[0].HUnitID;//计éåä½ |
| | | long HProcID = list[0].HProcID;//å·¥åºID |
| | | string HMaker = user;//å¶å人 |
| | | string HMakeDate = list[0].HMakeDate;//å¶åæ¥æ |
| | | |
| | | //忮宿´æ§å¤æ |
| | | if (HProcExchBillNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æµè½¬å¡æ²¡æéæ©ï¼è¯·æ«ææ¡å½¢ç æè¾å
¥æ¡å½¢ç åå车"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | if (OperationType == "1") |
| | | { |
| | | oCN.RunProc("Insert Into Sc_ProcessExchangeBillMain_Note " + |
| | | "(HBillNo_Note,HSouceID_Original,HSouceID_Now,HOrgID,HICMOInterID,HICMOBillNo,HProcExchBillNo,HProcExchInterID" + |
| | | ",HProcExchEntryID,HMaterID,HUnitID,HProcID,HMaker,HMakeDate)" + |
| | | " values('" + HBillNo_Note + "','" + HSouceID_Original + "'," + HSouceID_Now + ",'" + HOrgID + "'," + HICMOInterID + ",'"+ HICMOBillNo + "','" + HProcExchBillNo + "' ," + HProcExchInterID + |
| | | "," + HProcExchEntryID + ",'" + HMaterID + "','" + HUnitID + "'," + HProcID + ",'" + HMaker + "','" + HMakeDate + "')" ); |
| | | |
| | | oCN.RunProc("update Sc_ProcessExchangeBillSub set HSourceID=" + HSouceID_Now + " where HInterID=" + HProcExchInterID + " and HEntryID=" + HProcExchEntryID); |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æä½ç±»åæ æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ°å¢åæ®æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region åºç«æ±æ¥åæ¾ç¤ºè¡¨ä½æç» |
| | | [Route("Cj_StationEntrustInBill/DisBillEntryList")] |