| | |
| | | [HttpPost] |
| | | public object SaveGetMouldScrapOutHouseBillList([FromBody] JObject msg) |
| | | { |
| | | oCN.BeginTran(); |
| | | DAL.ClsSc_MouldScrapOutBill oBill = new DAL.ClsSc_MouldScrapOutBill(); |
| | | |
| | | var _value = msg["msg"].ToString(); |
| | |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "æµ·å") |
| | | { |
| | | if (setOutBill(msg)) |
| | | |
| | | if (setOutBill(msg, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; //æåï¼ |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éè¶åæ®ä¿å失败ï¼"; |
| | | objJsonResult.Message = "éè¶åæ®ä¿å失败ï¼"+ DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | objJsonResult.code = "0"; |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.Message; |
| | |
| | | } |
| | | } |
| | | |
| | | public bool setOutBill([FromBody] JObject msg) |
| | | public bool setOutBill([FromBody] JObject msg, ref string sErrInfo) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | |
| | | string sMainStr = sArray[0].ToString(); //ä¸»è¡¨æ°æ® |
| | | string sSubStr = sArray[1].ToString(); //åè¡¨æ°æ® |
| | | string HMaker = sArray[2].ToString(); //å¶å人 |
| | | long id; |
| | | DataSet ds = oCn.RunProcReturn("select max(HInterID) HInterID from Sc_MouldStockBillMain ", "Sc_MouldStockBillMain"); |
| | | try |
| | | { |
| | | //List<Model.ClsKf_OtherOutBillMain> lsmain = new List<Model.ClsKf_OtherOutBillMain>(); |
| | |
| | | //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | string sSourceBillType = "3832"; |
| | | if(lsmain[0].HInterID==0) |
| | | { |
| | | |
| | | id = Convert.ToInt64(ds.Tables[0].Rows[0]["HInterID"]); |
| | | |
| | | WebAPI.WebS.ClsKf_OtherOutBillMain websLsmain = new WebS.ClsKf_OtherOutBillMain(); |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HInterID = id; |
| | | websLsmain.HDate = lsmain[0].HDate; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HSupID = lsmain[0].HSupID; |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | |
| | | return false; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¯·ä»æ°å¢çé¢çæéè¶åæ®" +DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¸ä¼ 失败ï¼" + e.ToString(); |