| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | public DLL.ClsKf_MateOutBill BillNew0 = new DLL.ClsKf_MateOutBill(); //模å
·æ¥åºå
¥åºå¯¹åºåæ®ç±» |
| | | public DLL.ClsKf_MateOutBill BillOld0 = new DLL.ClsKf_MateOutBill(); //模å
·æ¥åºå
¥åºå¯¹åºåæ®ç±» |
| | | |
| | | #region çäº§é¢æåå表 |
| | | |
| | | |
| | | [Route("Kf_MateOutBill/GetMateOutBillList")] |
| | | [HttpGet] |
| | | public object GetMateOutBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); //å®ä¹å£°æåé ï¼æéè¿ new List<object>()å建ç å®ä¾ï¼èµå¼ç»åé |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_MateOutBillQuery", 1, false, user)) |
| | | { |
| | |
| | | } |
| | | |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBillList_Search " + sWhere + " order by æ¥æ desc, hmainid desc", "h_v_IF_MateOutBillList_Search"); |
| | | |
| | | foreach (DataColumn col in ds.Tables[0].Columns)//éådsä¸ç¬¬ä¸ä¸ªè¡¨ï¼Tables[0]ï¼çææåï¼Columnsï¼æ¯æ¬¡å¾ªç¯ä¸ï¼colåé伿æå½ååçå¼ç¨ |
| | | { |
| | | Type dataType = col.DataType; //è·åå½åæ°æ®ç±»åä¼ å
¥ èªå®ä¹åédatadataType |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; //åç¬¦ä¸²æ¼æ¥ // å°åååæ°æ®ç±»åä¿¡æ¯æ¼æ¥æä¸ä¸ªJSONæ ¼å¼çå符串 |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sqlWhere == null || sqlWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(string.Format(@"select HMaterID ,ç©æä»£ç HMaterCode ,ç©æåç§° HMaterName,ç©æå
¬å¼ HMaterRuleType,è§æ ¼åå· HMaterSpec,ç¨é HRate,HUnitID,计éåä½ä»£ç HUnitCode,计éåä½ HUnitName,åºæ¶æ°é HQtyMust,宿¶æ°é HQty,åä»· HPrice,éé¢ HMoney,HWHID,颿ä»åºä»£ç HWHCode,颿ä»åº HWHName,表ä½å¤æ³¨ HRemark,å®é
ç§°é HWeight |
| | | ds = oCN.RunProcReturn(string.Format(@"select HMaterID ,ç©æä»£ç HMaterCode ,ç©æåç§° HMaterName,ç©æå
¬å¼ HMaterRuleType,è§æ ¼åå· HMaterSpec,ç¨é HRate,HUnitID,计éåä½ä»£ç HUnitCode,计éåä½ HUnitName,åºæ¶æ°é HQtyMust,宿¶æ°é HQty,åä»· HPrice,éé¢ HMoney,HWHID,颿ä»åºä»£ç HWHCode,颿ä»åº HWHName,表ä½å¤æ³¨ HRemark,å®é
ç§°é HWeight, ç¾æ¯ç©æå
¬å¼ HMaterRuleExternType, æ¯å°ç©æå
¬å¼ HMaterRuleExternType1 |
| | | from h_v_IF_MateOutBillList"), "H_V_IF_MATEOUTBILLLIST"); |
| | | |
| | | } |
| | |
| | | { |
| | | |
| | | //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark from Sc_MouldRepairCheckBillSub where 1 = 1 "; |
| | | string sql1 = string.Format(@"select HMaterID ,ç©æä»£ç HMaterCode ,ç©æåç§° HMaterName,ç©æå
¬å¼ HMaterRuleType,è§æ ¼åå· HMaterSpec,ç¨é HRate, HUnitID,计éåä½ä»£ç HUnitCode,计éåä½ HUnitName,åºæ¶æ°é HQtyMust,宿¶æ°é HQty,åä»· HPrice,éé¢ HMoney,HWHID,颿ä»åºä»£ç HWHCode,颿ä»åº HWHName,表ä½å¤æ³¨ HRemark, å®é
ç§°é HWeight |
| | | string sql1 = string.Format(@"select HMaterID ,ç©æä»£ç HMaterCode ,ç©æåç§° HMaterName,ç©æå
¬å¼ HMaterRuleType,è§æ ¼åå· HMaterSpec,ç¨é HRate, HUnitID,计éåä½ä»£ç HUnitCode,计éåä½ HUnitName,åºæ¶æ°é HQtyMust,宿¶æ°é HQty,åä»· HPrice,éé¢ HMoney,HWHID,颿ä»åºä»£ç HWHCode,颿ä»åº HWHName,表ä½å¤æ³¨ HRemark, å®é
ç§°é HWeight, ç¾æ¯ç©æå
¬å¼ HMaterRuleExternType, æ¯å°ç©æå
¬å¼ HMaterRuleExternType1 |
| | | from h_v_IF_MateOutBillList WHERE 1=1"); |
| | | string sql = sql1 + sqlWhere + " order by HSubID asc"; |
| | | ds = oCN.RunProcReturn(sql, "H_V_IF_MATEOUTBILLLIST"); |
| | |
| | | //oItem.HMaker = ""; |
| | | UserName = oItem.HMaker; //å¶å人 |
| | | oItem.HBillType = "1204"; |
| | | oItem.HBillSubType = "1204"; |
| | | //oItem.HBillSubType = "1204"; |
| | | //oItem.HBillNo = ""; //åæ®å· |
| | | //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --æ¥æ |
| | | //oItem.HInnerBillNo = ""; // --å
é¨åæ®å· |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | string sql = "select top(1) " + |
| | | "a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo,a.HInterID HProcExchInterID,a.HMaterID,m1.HName HMaterName,a.HMaterModel HModel,a.HMaterModel2 HModel2,a.HCusID,c1.HName HCusName,a.HWeight" + |
| | | "a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo,a.HInterID HProcExchInterID,a.HMaterID,m1.HName HMaterName,a.HMaterModel HModel,a.HMaterModel2 HModel2,a.HCusID,c1.HName HCusName,a.HWeight,a.HQty" + |
| | | " from Sc_ProcessExchangeBillMain AS a " + |
| | | " LEFT OUTER JOIN Gy_Material AS m1 on a.HMaterID = m1.HItemID " + |
| | | " LEFT OUTER JOIN Gy_Customer AS c1 on a.HCusID = c1.HItemID " + |
| | |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | string sql = "select a.HItemID HMaterID,a.HNumber HMaterNumber,a.HName HMaterName,a.HMaterRuleType,a.HModel HMaterModel,a.HUnitID, b.HNumber HUnitNumber, b.HName HUnitName" + |
| | | string sql = "select a.HItemID HMaterID,a.HNumber HMaterNumber,a.HName HMaterName,a.HMaterRuleType,a.HModel HMaterModel,a.HUnitID, b.HNumber HUnitNumber, b.HName HUnitName, a.HMaterRuleExternType, a.HMaterRuleExternType1" + |
| | | " from Gy_Material AS a " + |
| | | " LEFT OUTER JOIN Gy_Unit AS b on a.HUnitID = b.HItemID " + |
| | | " where a.HItemID =" + HMaterID; |
| | |
| | | |
| | | //è¿è¡éè¦è¿è¡çå®¡æ ¸/åå®¡æ ¸æä½ |
| | | if (IsAudit == 0) //å®¡æ ¸æäº¤ |
| | | { |
| | | //å®¡æ ¸æ´æ° åæ¶åºå表 |
| | | ds = oCn.RunProcReturn("exec h_KF_UPDateICinventory '" + oBill.omodel.HInterID + "','" + oBill.omodel.HBillType + "','1'", "h_KF_UPDateICinventory"); |
| | | |
| | | { |
| | | //å®¡æ ¸æäº¤ |
| | | if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸æäº¤ |
| | | { |
| | | //å®¡æ ¸æ´æ° åæ¶åºå表 |
| | | ds = oCn.RunProcReturn("exec h_KF_UPDateICinventory '" + oBill.omodel.HInterID + "','" + oBill.omodel.HBillType + "','2'", "h_KF_UPDateICinventory"); |
| | | |
| | | { |
| | | //åå®¡æ ¸æäº¤AbandonCheck |
| | | if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¹æ®åæ®å·ï¼åæ¥çäº§é¢æå |
| | | [Route("Kf_MateOutBillController/GetKf_MateOutBill_Sync_Json")] |
| | | [HttpGet] |
| | | public json GetKf_MateOutBill_Sync_Json(string HBillNo, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | string sql = string.Empty; |
| | | string sErrMsg = ""; |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | { |
| | | //ç³»ç»åæ°æ¯å¦ä¸ºç§æäºæ¨¡å¼,N为å
¬æäºæ¨¡å¼ï¼Yä¸ºç§æäºæ¨¡å¼ |
| | | //ç§æäºæ¨¡å¼ï¼éè¿è°ç¨åå¨è¿ç¨è¿è¡åæ¥ |
| | | if (oSystemParameter.omodel.WMS_CloudMode.ToUpper() == "Y") |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_IFCLD_ERPSourceBillToLocal_MateOut '" + HBillNo + "'", "h_p_IFCLD_ERPSourceBillToLocal_MateOut"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮忥åçé误ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 2) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "忮忥æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | //å
¬æäºæ¨¡å¼ï¼éè¿è°ç¨WEBAPIæ¹å¼è¿è¡åæ¥ |
| | | else if (oSystemParameter.omodel.WMS_CloudMode.ToUpper() == "N") |
| | | { |
| | | //夿éè¶äºæ¯å¦ç»å½æå |
| | | var loginRet = InvokeHelper.Login(); |
| | | var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); |
| | | //夿æ¯å¦ç»å½æå |
| | | if (isSuccess <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ¥å¤±è´¥ï¼éè¶äºç»å
¥ä¸æåï¼è¯·ç¡®è®¤Cçé
ç½®æä»¶æè®¾ç½®éè¶äºå¯¹åºç½åãè´¦å¥ãç»å½ç¨æ·ãç»å½å¯ç æ¯å¦æ£ç¡®ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | var json = new |
| | | { |
| | | CreateOrgId = 0, |
| | | Number = HBillNo, |
| | | Id = "" |
| | | }; |
| | | //æ¥ç è·åæ°æ® |
| | | var _result = InvokeHelper.View("PRD_PickMtrl", JsonConvert.SerializeObject(json)); |
| | | var _saveObj = JObject.Parse(_result); |
| | | //夿éè¶äºæ°æ®æ¯å¦è·åæå |
| | | if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éè¶äºçäº§é¢æåè·å失败ï¼" + _result; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCn.BeginTran(); |
| | | //æ¥æ¾æ¬å°çäº§é¢æåè¡¨ä¸æ¯å¦åå¨è¯¥åæ®ï¼åå¨è·åæ¬ååæ®IDï¼ä¸åå¨åè·åæå¤§åæ®ID |
| | | Int64 HNewInterID = 0; |
| | | ds = oCn.RunProcReturn("select HInterID from Kf_ICStockBillMain with(nolock) where HBillNo = '" + HBillNo + "' and HBillType='1204'", "Kf_ICStockBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | HNewInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref sErrMsg); |
| | | } |
| | | else |
| | | { |
| | | HNewInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]); |
| | | } |
| | | |
| | | //æ ¹æ®åæ®å·å 餿¬å°çäº§é¢æåä¸å¯¹åºåæ® |
| | | oCn.RunProc("Delete b from Kf_ICStockBillMain a inner join Kf_ICStockBillSub b on a.HInterID=b.HInterID where a.HBillNo = '" + HBillNo + "' and a.HBillType='1204'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Kf_ICStockBillMain where HBillNo = '" + HBillNo + "' and HBillType='1204'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | //ä¸»è¡¨æ°æ®èµå¼ |
| | | var MainData = new |
| | | { |
| | | HInterID = HNewInterID, |
| | | HBillNo = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["BillNo"]), |
| | | HBillType = "1204", |
| | | HBillSubType = "1204", |
| | | HMainSourceBillType = "", |
| | | HDate = DBUtility.ClsPub.isDate(_saveObj["Result"]["Result"]["Date"]), |
| | | HSupID = 0, |
| | | HWHID = 0, |
| | | HSCWHID = 0, |
| | | HEmpID = 0, |
| | | HManagerID = 0, |
| | | HSecManagerID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["PickerId_Id"]), |
| | | HKeeperID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["FSTOCKERID_Id"]), |
| | | HDeptID = 0, |
| | | HCurID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["CurrId_Id"]), |
| | | HSeOrderBillNo = "", |
| | | HExplanation = "CLD导å
¥", |
| | | HRemark = "", |
| | | HInnerBillNo = "", |
| | | HRedBlueFlag = 0, |
| | | HBillStatus = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["ApproverId_Id"]) == 0 ? 1 : 2, |
| | | HMaker = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["CreatorId"]["Name"]), |
| | | HMakeDate = DBUtility.ClsPub.isDate(_saveObj["Result"]["Result"]["CreateDate"]), |
| | | HChecker = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["ApproverId_Id"]) == 0 ? "" : DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["ApproverId"]["Name"]), |
| | | HCheckDate = DBUtility.ClsPub.isDate(_saveObj["Result"]["Result"]["ApproveDate"]), |
| | | HUpDater = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["ModifierId_Id"]) == 0 ? "" : DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["ModifierId"]["Name"]), |
| | | HUpDateDate = DBUtility.ClsPub.isDate(_saveObj["Result"]["Result"]["ModifyDate"]), |
| | | HDeleteMan = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["CANCELER_Id"]) == 0 ? "" : DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["CANCELER"]["Name"]), |
| | | HDeleteDate = DBUtility.ClsPub.isDate(_saveObj["Result"]["Result"]["CancelDate"]), |
| | | HOWNERID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["OwnerId_Id"]), |
| | | HOWNERTYPEID = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["OwnerTypeId"]), |
| | | HERPInterID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["Id"]), |
| | | HERPBillType = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["BillType_Id"]), |
| | | HERPBillNo = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["BillNo"]), |
| | | HPRDORGID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["PrdOrgId_Id"]), |
| | | HSTOCKORGID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["StockOrgId_Id"]), |
| | | }; |
| | | //åå
¥ä¸»è¡¨ |
| | | sql = $@"Insert into Kf_ICStockBillMain |
| | | (HInterID,HYear,HPeriod,HBillNo,HBillType,HBillSubType,HMainSourceBillType,HDate |
| | | ,HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID,HKeeperID,HDeptID,HCurID |
| | | ,HSeOrderBillNo,HExplanation,HRemark,HInnerBillNo,HRedBlueFlag,HBillStatus |
| | | ,HMaker,HMakeDate |
| | | ,HChecker,HCheckDate |
| | | ,HUpDater,HUpDateDate |
| | | ,HDeleteMan,HDeleteDate |
| | | ,HOWNERID,HOWNERTYPEID,HERPInterID,HERPBillType,HERPBillNo |
| | | ,HPRDORGID,HSTOCKORGID) |
| | | Values({MainData.HInterID},year('{MainData.HDate}'),month('{MainData.HDate}'),'{MainData.HBillNo}','{MainData.HBillType}','{MainData.HBillSubType}','{MainData.HMainSourceBillType}','{MainData.HDate}' |
| | | , {MainData.HSupID},{MainData.HWHID},{MainData.HSCWHID},{MainData.HEmpID},{MainData.HManagerID},{MainData.HSecManagerID},{MainData.HKeeperID},{MainData.HDeptID},{MainData.HCurID} |
| | | ,'{MainData.HSeOrderBillNo}','{MainData.HExplanation}','{MainData.HRemark}','{MainData.HInnerBillNo}',{MainData.HRedBlueFlag},{MainData.HBillStatus} |
| | | ,'{MainData.HMaker}','{MainData.HMakeDate}' |
| | | ,'{MainData.HChecker}',case when '{MainData.HCheckDate}' = '1900/1/1 0:00:00' then NULL else '{MainData.HCheckDate}' end |
| | | ,'{MainData.HUpDater}',case when '{MainData.HUpDateDate}' = '1900/1/1 0:00:00' then NULL else '{MainData.HUpDateDate}' end |
| | | ,'{MainData.HDeleteMan}',case when '{MainData.HDeleteDate}' = '1900/1/1 0:00:00' then NULL else '{MainData.HDeleteDate}' end |
| | | , {MainData.HOWNERID},'{MainData.HOWNERTYPEID}',{MainData.HERPInterID},'{MainData.HERPBillType}','{MainData.HERPBillNo}' |
| | | , {MainData.HPRDORGID},{MainData.HSTOCKORGID})"; |
| | | oCn.RunProc(sql.Replace("\r\n", "")); |
| | | |
| | | //åè¡¨æ°æ®èµå¼ |
| | | var dataArr = _saveObj["Result"]["Result"]["Entity"]; |
| | | foreach (var oSub in dataArr) |
| | | { |
| | | var subData = new |
| | | { |
| | | HInterID = HNewInterID, |
| | | HEntryID = DBUtility.ClsPub.isLong(oSub["Id"]), |
| | | HMTONo = DBUtility.ClsPub.isStrNull(oSub["MTONO"]), |
| | | HPlanMode = 0, |
| | | HRemark = "", |
| | | HExpressNumber = "", |
| | | HMaterID = DBUtility.ClsPub.isLong(oSub["MaterialId_Id"]), |
| | | HUnitID = DBUtility.ClsPub.isLong(oSub["UnitId_Id"]), |
| | | HBatchNo = DBUtility.ClsPub.isStrNull(oSub["Lot_Text"]), |
| | | HPropertyID = DBUtility.ClsPub.isLong(oSub["AuxPropId_Id"]), |
| | | HWHID = DBUtility.ClsPub.isLong(oSub["StockId_Id"]), |
| | | HSPID = DBUtility.ClsPub.isLong(oSub["StockLocId_Id"]), |
| | | HSCWHID = 0, |
| | | HSCSPID = 0, |
| | | HQtyMust = DBUtility.ClsPub.isDoule(oSub["AppQty"]), |
| | | HQty = DBUtility.ClsPub.isDoule(oSub["ActualQty"]), |
| | | HPrice = DBUtility.ClsPub.isDoule(oSub["FPrice"]), |
| | | HMoney = DBUtility.ClsPub.isDoule(oSub["FAmount"]), |
| | | HTaxPrice = DBUtility.ClsPub.isDoule(oSub["FPrice"]), |
| | | HTaxRate = 1, |
| | | HTaxMoney = DBUtility.ClsPub.isDoule(oSub["FAmount"]), |
| | | HRelationQty = DBUtility.ClsPub.isDoule(oSub["SelPrcdReturnQty"]), |
| | | HRelationMoney = 0, |
| | | HSourceInterID = DBUtility.ClsPub.isLong(oSub["SrcInterId"]), |
| | | HSourceEntryID = DBUtility.ClsPub.isLong(oSub["SrcEnteryId"]), |
| | | HSourceBillNo = DBUtility.ClsPub.isStrNull(oSub["SrcBillNo"]), |
| | | HSourceBillType = DBUtility.ClsPub.isStrNull(oSub["SrcBillType"]), |
| | | HERPInterID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["Id"]), |
| | | HERPEntryID = DBUtility.ClsPub.isLong(oSub["Id"]), |
| | | HERPBillNo_Sub = "", |
| | | HPOOrderInterID = 0, |
| | | HPOOrderEntryID = 0, |
| | | HPOOrderBillNo = "", |
| | | HSeOrderInterID = 0, |
| | | HSeOrderEntryID = 0, |
| | | HSeOrderBillNo = "", |
| | | HICMOInterID = DBUtility.ClsPub.isLong(oSub["MoId"]), |
| | | HICMOEntryID = DBUtility.ClsPub.isLong(oSub["MoEntryId"]), |
| | | HICMOBillNo = DBUtility.ClsPub.isStrNull(oSub["MoBillNo"]), |
| | | HWWOrderInterID = 0, |
| | | HWWOrderEntryID = 0, |
| | | HWWOrderBillNo = "", |
| | | HProduceDate = DBUtility.ClsPub.isDate(oSub["ProduceDate"]), |
| | | HExpiryDate = DBUtility.ClsPub.isDate(oSub["ExpiryDate"]), |
| | | HOWNERID = DBUtility.ClsPub.isLong(oSub["OwnerId_Id"]), |
| | | HOWNERTYPEID = DBUtility.ClsPub.isStrNull(oSub["OwnerTypeId"]), |
| | | HKEEPERID = DBUtility.ClsPub.isLong(oSub["KeeperId_Id"]), |
| | | HKEEPERTYPEID = DBUtility.ClsPub.isStrNull(oSub["KeeperTypeId"]), |
| | | }; |
| | | |
| | | //åå
¥å表 |
| | | sql = $@"Insert into Kf_ICStockBillSub |
| | | (HInterID,HEntryID,HMTONo,HPlanMode,HRemark,HExpressNumber |
| | | ,HMaterID,HUnitID,HBatchNo,HPropertyID,HWHID,HSPID,HSCWHID,HSCSPID |
| | | ,HQtyMust,HQty,HPrice,HMoney,HTaxPrice,HTaxRate,HTaxMoney,HRelationQty,HRelationMoney |
| | | ,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HERPInterID,HERPEntryID,HERPBillNo_Sub |
| | | ,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo |
| | | ,HICMOInterID,HICMOEntryID,HICMOBillNo,HWWOrderInterID,HWWOrderEntryID,HWWOrderBillNo |
| | | ,HProduceDate |
| | | ,HExpiryDate |
| | | ,HOWNERID,HOWNERTYPEID,HKEEPERID,HKEEPERTYPEID) |
| | | Values ({subData.HInterID},{subData.HEntryID},'{subData.HMTONo}',{subData.HPlanMode},'{subData.HRemark}','{subData.HExpressNumber}' |
| | | ,{subData.HMaterID},{subData.HUnitID},'{subData.HBatchNo}',{subData.HPropertyID},{subData.HWHID},{subData.HSPID},{subData.HSCWHID},{subData.HSCSPID} |
| | | ,{subData.HQtyMust},{subData.HQty},{subData.HPrice},{subData.HMoney},{subData.HTaxPrice},{subData.HTaxRate},{subData.HTaxMoney},{subData.HRelationQty},{subData.HRelationMoney} |
| | | ,{subData.HSourceInterID},{subData.HSourceEntryID},'{subData.HSourceBillNo}','{subData.HSourceBillType}',{subData.HERPInterID},{subData.HERPEntryID},'{subData.HERPBillNo_Sub}' |
| | | ,{subData.HPOOrderInterID},{subData.HPOOrderEntryID},'{subData.HPOOrderBillNo}',{subData.HSeOrderInterID},{subData.HSeOrderEntryID},'{subData.HSeOrderBillNo}' |
| | | ,{subData.HICMOInterID},{subData.HICMOEntryID},'{subData.HICMOBillNo}',{subData.HWWOrderInterID},{subData.HWWOrderEntryID},'{subData.HWWOrderBillNo}' |
| | | ,case when '{subData.HProduceDate}' = '1900/1/1 0:00:00' then NULL else '{subData.HProduceDate}' end |
| | | ,case when '{subData.HExpiryDate}' = '1900/1/1 0:00:00' then NULL else '{subData.HExpiryDate}' end |
| | | ,{subData.HOWNERID},'{subData.HOWNERTYPEID}',{subData.HKEEPERID},'{subData.HKEEPERTYPEID}')"; |
| | | oCn.RunProc(sql.Replace("\r\n", "")); |
| | | } |
| | | |
| | | oCn.Commit(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "忮忥æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "䏿¯æåæ¥åè½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®åæ¥å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region çäº§é¢æå å®¡æ ¸åæ¥æä»¶ è°ç¨æ¥å£ |
| | | [Route("Kf_MateOutBill/Kf_MateOutBillSaveApi")] |
| | | [HttpPost] |
| | | public object Kf_MateOutBillSaveApi([FromBody] JObject sMainSub) |
| | | { |
| | | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | |
| | | LogService.Write("çäº§é¢æå忥,ä¿åæ¹æ³æ§è¡ï¼" + sMainSub.ToString()); |
| | | sMainSub["model"]["hredblueflag"] = string.Equals(sMainSub["model"]["hredblueflag"].ToString(), "0") ? false : true; |
| | | var model = sMainSub["model"].ToString(); |
| | | // foreach(JObject entryOne in sMainSub["model"]["HENTRY"]) |
| | | // { |
| | | // entryOne["hentryclosedate"] = string.IsNullOrWhiteSpace(entryOne["hentryclosedate"].ToString()) |
| | | // ? new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).ToString() : entryOne["hentryclosedate"]; |
| | | // |
| | | // entryOne["hclosetype"] = string.Equals(entryOne["hclosetype"].ToString(), "0") ? false : true; |
| | | // } |
| | | var entry = sMainSub["model"]["HENTRY"].ToString(); |
| | | |
| | | model = "[" + model.ToString() + "]"; |
| | | List<ClsKf_MateOutBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsKf_MateOutBillMain>>(model); |
| | | List<ClsKf_MateOutBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsKf_MateOutBillSub>>(entry); |
| | | var HInterID_Old = mainList[0].HInterID; |
| | | |
| | | // 夿 æ°æ®åºä¸æ¯å¦åå¨idååæ®å·ç¸ççæåæ®ï¼åå¨ï¼åé建ï¼åªæidå·ç¸çï¼åç³è¯·æ°çidå· |
| | | var ds1 = oCn.RunProcReturn($@" |
| | | select hmainid HInterID, åæ®å· HBillNO from h_v_IF_MateOutBillList_Search where hmainid = {mainList[0].HInterID} |
| | | ", "h_v_IF_MateOutBillList_Search"); |
| | | |
| | | if (ds1.Tables[0].Rows.Count > 0 && ds1.Tables[0].Rows[0]["HInterID"] != null) { |
| | | if(string.Equals(ds1.Tables[0].Rows[0]["HBillNo"].ToString(), mainList[0].HBillNo, StringComparison.OrdinalIgnoreCase)){ |
| | | string sql = string.Empty; |
| | | sql = $"delete Kf_ICStockBillMain where HinterID = {mainList[0].HInterID}"; |
| | | oCn.RunProc(sql); |
| | | sql = $"delete Kf_ICStockBillSub where HinterID = {mainList[0].HInterID}"; |
| | | oCn.RunProc(sql); |
| | | } |
| | | else |
| | | { |
| | | // éæ°ç³è¯·HInterID |
| | | var HInterID_Exch = DBUtility.ClsPub.CreateBillID("1204", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | mainList[0].HInterID = HInterID_Exch; |
| | | |
| | | foreach(var oSub in subList) |
| | | { |
| | | oSub.HInterID = HInterID_Exch; |
| | | } |
| | | |
| | | } |
| | | } |
| | | // string sql = string.Empty; |
| | | // sql = $"delete Kf_ICStockBillMain where HinterID = {mainList[0].HInterID}"; |
| | | // oCn.RunProc(sql); |
| | | // sql = $"delete Kf_ICStockBillSub where HinterID = {mainList[0].HInterID}"; |
| | | // oCn.RunProc(sql); |
| | | // 主表 |
| | | oCn.RunProc($@"Insert Into Kf_ICStockBillMain |
| | | ( |
| | | HInterID, HYear, HPeriod, HBillNo, HBillType, HBillSubType, HMainSourceBillType, HDate, |
| | | HSupID, HWHID, HSCWHID, HEmpID, HManagerID, HSecManagerID, HKeeperID, HDeptID, HCurID, |
| | | HSeOrderBillNo, HExplanation, HRemark, HInnerBillNo, HRedBlueFlag, HBillStatus, |
| | | HMaker, HMakeDate, HChecker, HCheckDate, |
| | | HUpDater, HUpDateDate, HDeleteMan, HDeleteDate, |
| | | HOWNERID, HOWNERTYPEID, HERPInterID, HERPBillType, HERPBillNo, |
| | | HPRDORGID, HSTOCKORGID, HSTOCKERGROUPID, HPURCHASERGROUPID, HDEMANDORGID, HCORRESPONDORGID, |
| | | HPROVIDERCONTACTID, HSUPPLYID, HSETTLEID, HCHARGEID, HPURCHASEDEPTID, HBUSINESSTYPE, |
| | | HSUPPLYADDRESS, HPAYORGID, HSETTLEORGID, HSETTLETYPEID, HPAYCONDITIONID, HSETTLECURRID, |
| | | HEXCHANGETYPEID, HDISCOUNTLISTID, HEXCHANGERATE, HPRICETIMEPOINT, HLOCALCURRID, HISINCLUDEDTAX, |
| | | HISPRICEEXCLUDETAX |
| | | ) |
| | | values( |
| | | '{mainList[0].HInterID}','{mainList[0].HYear}','{mainList[0].HPeriod}','{mainList[0].HBillNo}', |
| | | '{mainList[0].HBillType}','{mainList[0].HBillSubType}','{mainList[0].HMainSourceBillType}','{mainList[0].HDate}', |
| | | '{mainList[0].HSupID}','{mainList[0].HWHID}','{mainList[0].HSCWHID}','{mainList[0].HEmpID}','{mainList[0].HManagerID}', |
| | | '{mainList[0].HSecManagerID}','{mainList[0].HKeeperID}','{mainList[0].HDeptID}','{mainList[0].HCurID}', |
| | | '{mainList[0].HSeOrderBillNo}','{mainList[0].HExplanation}','{mainList[0].HRemark}','{mainList[0].HInnerBillNo}', |
| | | '{mainList[0].HRedBlueFlag}',{mainList[0].HBillStatus},'{mainList[0].HMaker}','{mainList[0].HMakeDate}', |
| | | '{mainList[0].HChecker}','{mainList[0].HCheckDate}','{mainList[0].HUpDater}','{mainList[0].HUpDateDate}', |
| | | '{mainList[0].HDeleteMan}','{mainList[0].HDeleteDate}','{mainList[0].HOWNERID}','{mainList[0].HOWNERTYPEID}', |
| | | '{mainList[0].HERPInterID}','{mainList[0].HERPBillType}','{mainList[0].HERPBillNo}','{mainList[0].HPRDORGID}', |
| | | '{mainList[0].HSTOCKORGID}','{mainList[0].HSTOCKERGROUPID}','{mainList[0].HPURCHASERGROUPID}','{mainList[0].HDEMANDORGID}', |
| | | '{mainList[0].HCORRESPONDORGID}','{mainList[0].HPROVIDERCONTACTID}','{mainList[0].HSUPPLYID}','{mainList[0].HSETTLEID}', |
| | | '{mainList[0].HCHARGEID}','{mainList[0].HPURCHASEDEPTID}','{mainList[0].HBUSINESSTYPE}','{mainList[0].HSUPPLYADDRESS}', |
| | | '{mainList[0].HPAYORGID}','{mainList[0].HSETTLEORGID}','{mainList[0].HSETTLETYPEID}','{mainList[0].HPAYCONDITIONID}', |
| | | '{mainList[0].HSETTLECURRID}','{mainList[0].HEXCHANGETYPEID}','{mainList[0].HDISCOUNTLISTID}','{mainList[0].HEXCHANGERATE}', |
| | | '{mainList[0].HPRICETIMEPOINT}','{mainList[0].HLOCALCURRID}','{mainList[0].HISINCLUDEDTAX}','{mainList[0].HISPRICEEXCLUDETAX}' |
| | | )"); |
| | | // å表 |
| | | foreach (var osub in subList) |
| | | { |
| | | // var syncSorceBillRes = oCn.RunProcReturn($@" |
| | | // exec h_p_IFCLD_ERPSourceBillToLocal_MateOutBill_GetSourceInfo |
| | | // '{osub.HSourceBillType}', '{osub.HSourceBillNo}', {osub.HSourceInterID}, {osub.HSourceEntryID} |
| | | // ", "h_p_IFCLD_ERPSourceBillToLocal_MateOutBill_GetSourceInfo"); |
| | | // LogService.Write($@" |
| | | // exec h_p_IFCLD_ERPSourceBillToLocal_MateOutBill_GetSourceInfo |
| | | // '{osub.HSourceBillType}', '{osub.HSourceBillNo}', {osub.HSourceInterID}, {osub.HSourceEntryID} |
| | | // ", "h_p_IFCLD_ERPSourceBillToLocal_MateOutBill_GetSourceInfo"); |
| | | // string HERPInterID = "0"; |
| | | // string HERPEntryID = "0"; |
| | | // if (syncSorceBillRes != null && syncSorceBillRes.Tables.Count > 0) |
| | | // { |
| | | // osub.HSourceEntryID = (long)syncSorceBillRes.Tables[0].Rows[0]["HEntryID"]; |
| | | // osub.HSourceInterID = (long)syncSorceBillRes.Tables[0].Rows[0]["HInterID"]; |
| | | // HERPInterID = syncSorceBillRes.Tables[0].Rows[0]["HERPInterID"].ToString(); |
| | | // HERPEntryID = syncSorceBillRes.Tables[0].Rows[0]["HERPInterID"].ToString(); |
| | | // } |
| | | |
| | | |
| | | oCn.RunProc($@"Insert into Kf_ICStockBillSub |
| | | ( |
| | | HInterID, HEntryID, HMTONo, HPlanMode, HRemark, HExpressNumber, |
| | | HMaterID, HUnitID, HBatchNo, HPropertyID, HWHID, HSPID, HSCWHID, HSCSPID, |
| | | HQtyMust, HQty, HPrice, HMoney, HTaxPrice, HTaxRate, HTaxMoney, HRelationQty, HRelationMoney, |
| | | HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType, HERPInterID, HERPEntryID, HERPBillNo_Sub, |
| | | HPOOrderInterID, HPOOrderEntryID, HPOOrderBillNo, HSeOrderInterID, HSeOrderEntryID, HSeOrderBillNo, |
| | | HICMOInterID, HICMOEntryID, HICMOBillNo, HWWOrderInterID, HWWOrderEntryID, HWWOrderBillNo, |
| | | HProduceDate, HExpiryDate, HOWNERID, HOWNERTYPEID, HKEEPERID, HKEEPERTYPEID, |
| | | HSUPPLIERLOT, HREQTRACENO, HPROJECTNO, HGIVEAWAY, HSYSPRICE, HPRICECOEFFICIENT, |
| | | HDISCOUNTRATE, HBASEUNITPRICE, HTAXCOMBINATION, HPRICELISTENTRY, HCOSTPRICE, HSEQ, |
| | | HROWTYPE, HPARENTMATID, HPRILSTENTRYID, HPURBASENUM, HSTOCKBASEDEN, HBFLOWID, |
| | | HSTOCKSTATUSID, HPRICEUNITID, HBASEUNITID, HSNUNITID, HREMAININSTOCKUNITID, HEXTAUXUNITID, |
| | | HTAXRATEID, HTAXRATE_TAX, HTAXAMOUNT, HCOSTPERCENT, HCOSTAMOUNT, HVAT, |
| | | HSELLERWITHHOLDING, HBUYERWITHHOLDING |
| | | ) |
| | | values ( |
| | | '{osub.HInterID}','{osub.HEntryID}','{osub.HMTONo}',{osub.HPlanMode},'{osub.HRemark}','{osub.HExpressNumber}', |
| | | '{osub.HMaterID}','{osub.HUnitID}','{osub.HBatchNo}','{osub.HPropertyID}','{osub.HWHID}', |
| | | '{osub.HSPID}','{osub.HSCWHID}','{osub.HSCSPID}', '{osub.HQtyMust}','{osub.HQty}','{osub.HPrice}', |
| | | '{osub.HMoney}', '{osub.HTaxPrice}', '{osub.HTaxRate}', '{osub.HTaxMoney}', '{osub.HRelationQty}', |
| | | '{osub.HRelationMoney}','{osub.HSourceInterID}','{osub.HSourceEntryID}','{osub.HSourceBillNo}', |
| | | '{osub.HSourceBillType}','{osub.HERPInterID}','{osub.HERPEntryID}','{osub.HERPBillNo_Sub}', |
| | | '{osub.HPOOrderInterID}','{osub.HPOOrderEntryID}','{osub.HPOOrderBillNo}','{osub.HSeOrderInterID}', |
| | | '{osub.HSeOrderEntryID}','{osub.HSeOrderBillNo}','{osub.HICMOInterID}','{osub.HICMOEntryID}', |
| | | '{osub.HICMOBillNo}','{osub.HWWOrderInterID}','{osub.HWWOrderEntryID}', '{osub.HWWOrderBillNo}', |
| | | '{osub.HProduceDate}','{osub.HExpiryDate}', '{osub.HOWNERID}','{osub.HOWNERTYPEID}','{osub.HKEEPERID}', |
| | | '{osub.HKEEPERTYPEID}', '{osub.HSUPPLIERLOT}', '{osub.HREQTRACENO}', '{osub.HPROJECTNO}','{osub.HGIVEAWAY}', |
| | | '{osub.HSYSPRICE}', '{osub.HPRICECOEFFICIENT}','{osub.HDISCOUNTRATE}','{osub.HBASEUNITPRICE}', '{osub.HTAXCOMBINATION}', |
| | | '{osub.HPRICELISTENTRY}','{osub.HCOSTPRICE}', '{osub.HSEQ}','{osub.HROWTYPE}','{osub.HPARENTMATID}', '{osub.HPRILSTENTRYID}', |
| | | '{osub.HPURBASENUM}','{osub.HSTOCKBASEDEN}', '{osub.HBFLOWID}','{osub.HSTOCKSTATUSID}','{osub.HPRICEUNITID}', '{osub.HBASEUNITID}', |
| | | '{osub.HSNUNITID}', '{osub.HREMAININSTOCKUNITID}','{osub.HEXTAUXUNITID}','{osub.HTAXRATEID}','{osub.HTAXRATE_TAX}','{osub.HTAXAMOUNT}', |
| | | '{osub.HCOSTPERCENT}','{osub.HCOSTAMOUNT}','{osub.HVAT}','{osub.HSELLERWITHHOLDING}','{osub.HBUYERWITHHOLDING}' |
| | | )"); |
| | | } |
| | | |
| | | oCn.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®ä¿åæåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch(Exception e) |
| | | { |
| | | LogService.Write("éè´è®¢å忥å¼å¸¸,ä¿åæ¹æ³æ§è¡å®æå¼å¸¸ï¼" + e.Message.ToString()); |
| | | |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ¡ç æç» |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <returns></returns> |
| | | [Route("Kf_MateOutBillController/BarCodeNote")] |
| | | [HttpGet] |
| | | public object SellOutBill_BarCodeNote(int HInterID) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameListSum = new List<object>(); |
| | | List<object> columnNameList0 = new List<object>(); |
| | | List<object> columnNameList1 = new List<object>(); |
| | | List<object> columnNameList2 = new List<object>(); |
| | | |
| | | string sql = "exec h_p_IFCLD_ERPSourceBillToLocal_MateOut " + HInterID; |
| | | ds = oCn.RunProcReturn(sql, " h_p_IFCLD_ERPSourceBillToLocal_MateOut"); |
| | | |
| | | //æ·»å åºæ¬ä¿¡æ¯ åå |
| | | foreach (DataColumn col in ds.Tables[1].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList0.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | //æ·»å ç åä¿¡æ¯ åå |
| | | foreach (DataColumn col in ds.Tables[2].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList1.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | //æ·»å æ¡ç æç» åå |
| | | foreach (DataColumn col in ds.Tables[3].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList2.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | columnNameListSum.Add(columnNameList0); |
| | | columnNameListSum.Add(columnNameList1); |
| | | columnNameListSum.Add(columnNameList2); |
| | | |
| | | List<DataTable> tableList = new List<DataTable>(); |
| | | tableList.Add(ds.Tables[1]); |
| | | tableList.Add(ds.Tables[2]); |
| | | tableList.Add(ds.Tables[3]); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = tableList; |
| | | objJsonResult.list = columnNameListSum; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |