直接调拨核对模块,扫源单方法增加私有云模式时通过WEBAPI重新同步单据功能;领料出库核对模块,扫物料条码调用方法修改,增加系统参数判断,安瑞先解析条码;新增设备维修记录报表调用方法
| | |
| | | //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo); |
| | | WebS.WebService1 oWebs = new WebS.WebService1(); |
| | | WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS(); |
| | | string sExpressNumber = ""; |
| | | //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); |
| | | |
| | | Kf_MoveStockBillController obill = new Kf_MoveStockBillController(); |
| | | //éæ°åæ¥ç´æ¥è°æ¨å |
| | | objJsonResult = obill.GetKf_MoveStockBill_Sync_Json(HBillNo, HBillType); |
| | | |
| | | WebSoBar = oWebs.get_BillBarCode_MoveStockCheck(HBillNo, HBillType, HMaker, HOwnerID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | |
| | | { |
| | | WebS.WebService1 oWebs = new WebS.WebService1(); |
| | | WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS(); |
| | | string sBarCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker); |
| | | string sExpressNumber = ""; |
| | | WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sBarCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, (double)sQty, HOWNERID, ref ClsPub.sErrInfo); |
| | | bool flag = WebSoBar == null; |
| | | object result; |
| | | if (flag) |
| | | //è·åç³»ç»åæ° |
| | | string sErrMsg = ""; |
| | | string sJXCode = ""; |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | { |
| | | this.objJsonResult.code = "0"; |
| | | this.objJsonResult.count = 0; |
| | | this.objJsonResult.Message = ClsPub.sErrInfo; |
| | | this.objJsonResult.data = null; |
| | | result = this.objJsonResult; |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "å®ç") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker); |
| | | } |
| | | else |
| | | { |
| | | sJXCode = sCode; |
| | | } |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, (double)sQty, HOWNERID, ref ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | this.objJsonResult.code = "0"; |
| | | this.objJsonResult.count = 1; |
| | | this.objJsonResult.Message = ClsPub.sErrInfo; |
| | | this.objJsonResult.data = WebSoBar; |
| | | result = this.objJsonResult; |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 设å¤ç»´ä¿®è®°å½æ¥è¡¨ |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç»´ä¿®è®°å½æ¥è¡¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sb_EquipReportController/GetSb_EquipRepairReport_Json")] |
| | | [HttpGet] |
| | | public object GetSb_EquipRepairReport_Json(DateTime HBeginDate, DateTime HEndDate, Int64 HStockOrgID, string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sb_EquipRepairReport '" + HBeginDate.ToShortDateString() + "','" + HEndDate.ToShortDateString() + "'," + HStockOrgID.ToString() + "," + sWhere, "h_p_Sb_EquipRepairReport"); |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¿åæ¥è¡¨ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Data; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class Kf_MoveStockBillController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | public const string ModName = "1207"; //åæ®ç±»å |
| | | public const string ModCaption = "ç´æ¥è°æ¨å"; //åæ®åç§° |
| | | public const string ModRightName = "Kf_MoveStockBill"; |
| | | public const string ModRightNameList = ModRightName + "List"; //å表 |
| | | public const string ModRightNameEdit = ModRightName + "_Edit"; //ç¼è¾ |
| | | public const string ModRightNameCheck = ModRightName + "_Check"; //å®¡æ ¸ |
| | | public const string ModRightNameClose = ModRightName + "_Close"; //å
³é |
| | | public const string ModRightNameDelete = ModRightName + "_Delete"; //ä½åº |
| | | public const string ModRightNameDrop = ModRightName + "_Drop"; //å é¤ |
| | | public const string ModRightNameMoney = ModRightName + "_Money"; //éé¢ |
| | | public const string ModRightNameQty = ModRightName + "_Qty"; //æ°é |
| | | public DataSet ds = new DataSet(); |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | public DAL.ClsKf_MoveStockBill oBill = new DAL.ClsKf_MoveStockBill(); |
| | | |
| | | |
| | | #region æ ¹æ®åæ®å·ï¼åæ¥ç´æ¥è°æ¨å |
| | | [Route("Kf_MoveStockBillController/GetKf_MoveStockBill_Sync_Json")] |
| | | [HttpGet] |
| | | public json GetKf_MoveStockBill_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_MoveStock '" + HBillNo + "'", "h_p_IFCLD_ERPSourceBillToLocal_MoveStock"); |
| | | 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("STK_TransferDirect", 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='1207'", "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='1207'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Kf_ICStockBillMain where HBillNo = '" + HBillNo + "' and HBillType='1207'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | //ä¸»è¡¨æ°æ®èµå¼ |
| | | var MainData = new |
| | | { |
| | | HInterID = HNewInterID, |
| | | HBillNo = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["BillNo"]), |
| | | HBillType = "1207", |
| | | HBillSubType = "1207", |
| | | HMainSourceBillType = "", |
| | | HDate = DBUtility.ClsPub.isDate(_saveObj["Result"]["Result"]["Date"]), |
| | | HSupID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["SupplierID_Id"]), |
| | | HWHID = 0, |
| | | HSCWHID = 0, |
| | | HEmpID = 0, |
| | | HManagerID = 0, |
| | | HSecManagerID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["SalerId_Id"]), |
| | | HKeeperID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["StockerId_Id"]), |
| | | HDeptID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["SaleDeptId_Id"]), |
| | | HCurID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["CustID_Id"]), |
| | | HSeOrderBillNo = "", |
| | | HExplanation = "CLD导å
¥", |
| | | HRemark = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["Note"]), |
| | | 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"]), |
| | | HStockStyle = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["TransferBizType"]) == "InnerOrgTransfer" ? "ç»ç»å
è°æ¨" : "è·¨ç»ç»è°æ¨", |
| | | HOWNERID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["OwnerIdHead_Id"]), |
| | | HOWNERTYPEID = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["OwnerTypeIdHead"]), |
| | | HERPInterID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["Id"]), |
| | | HERPBillType = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["BillTypeID_Id"]), |
| | | HERPBillNo = DBUtility.ClsPub.isStrNull(_saveObj["Result"]["Result"]["BillNo"]), |
| | | HSTOCKINORGID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["StockOrgId_Id"]), |
| | | HSTOCKOUTORGID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["StockOutOrgId_Id"]), |
| | | HSALEORGID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["SaleOrgId_Id"]), |
| | | HSETTLEORGID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["SettleOrgId_Id"]), |
| | | HPRDORGID = 0, |
| | | HSTOCKORGID = DBUtility.ClsPub.isLong(_saveObj["Result"]["Result"]["StockOutOrgId_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 |
| | | ,HStockStyle |
| | | ,HOWNERID,HOWNERTYPEID,HERPInterID,HERPBillType,HERPBillNo |
| | | ,HSTOCKINORGID,HSTOCKOUTORGID,HSALEORGID,HSETTLEORGID |
| | | ,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.HStockStyle}' |
| | | , {MainData.HOWNERID},'{MainData.HOWNERTYPEID}',{MainData.HERPInterID},'{MainData.HERPBillType}','{MainData.HERPBillNo}' |
| | | , {MainData.HSTOCKINORGID},{MainData.HSTOCKOUTORGID},{MainData.HSALEORGID},{MainData.HSETTLEORGID} |
| | | , {MainData.HPRDORGID},{MainData.HSTOCKORGID})"; |
| | | oCn.RunProc(sql.Replace("\r\n", "")); |
| | | |
| | | //åè¡¨æ°æ®èµå¼ |
| | | var dataArr = _saveObj["Result"]["Result"]["TransferDirectEntry"]; |
| | | 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 = DBUtility.ClsPub.isStrNull(oSub["NoteEntry"]), |
| | | HExpressNumber = "", |
| | | HMaterID = DBUtility.ClsPub.isLong(oSub["MaterialId_Id"]), |
| | | HUnitID = DBUtility.ClsPub.isLong(oSub["UnitId_Id"]), |
| | | HBatchNo = DBUtility.ClsPub.isStrNull(oSub["DestLot_Text"]), |
| | | HPropertyID = DBUtility.ClsPub.isLong(oSub["AuxPropId_Id"]), |
| | | HWHID = DBUtility.ClsPub.isLong(oSub["DestStockId_Id"]), |
| | | HSPID = DBUtility.ClsPub.isLong(oSub["DestStockLocId_Id"]), |
| | | HSCWHID = DBUtility.ClsPub.isLong(oSub["SrcStockId_Id"]), |
| | | HSCSPID = DBUtility.ClsPub.isLong(oSub["SrcStockLocId_Id"]), |
| | | HQtyMust = DBUtility.ClsPub.isDoule(oSub["Qty"]), |
| | | HQty = DBUtility.ClsPub.isDoule(oSub["Qty"]), |
| | | HPrice = DBUtility.ClsPub.isDoule(oSub["Price"]), |
| | | HMoney = DBUtility.ClsPub.isDoule(oSub["Amount"]), |
| | | HTaxPrice = DBUtility.ClsPub.isDoule(oSub["Price"]), |
| | | HTaxRate = 1, |
| | | HTaxMoney = DBUtility.ClsPub.isDoule(oSub["Amount"]), |
| | | HRelationQty = 0, |
| | | HRelationMoney = 0, |
| | | HSourceInterID = 0, |
| | | HSourceEntryID = 0, |
| | | HSourceBillNo = DBUtility.ClsPub.isStrNull(oSub["SrcBillNo"]), |
| | | HSourceBillType = DBUtility.ClsPub.isStrNull(oSub["SrcBillTypeId"]), |
| | | 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 = 0, |
| | | HICMOEntryID = 0, |
| | | HICMOBillNo = "", |
| | | 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 |
| | | |
| | | } |
| | | } |
| | |
| | | <!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>--> |
| | | <!--<add key="FileIP" value="http://localhost:8080/" />--> |
| | | <!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/> --> |
| | | <add key="sUrl" value="http://192.168.0.81/WEBS-WMS/WebService1.asmx"/><!--é¢å°å¼æº--> |
| | | <add key="sUrl" value="http://192.168.0.11/WEBS-WMS/WebService1.asmx"/><!--é¢å°å¼æº--> |
| | | <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> å¤å®--> |
| | | <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> --> |
| | | <!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/> åæ¥ç§æ--> |
| | |
| | | </basicHttpBinding> |
| | | </bindings> |
| | | <client> |
| | | <endpoint address="http://192.168.0.81/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding" |
| | | <endpoint address="http://192.168.0.11/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding" |
| | | bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" |
| | | name="WebService1Soap" /> |
| | | </client> |
| | |
| | | <applicationSettings> |
| | | <WebAPI.Properties.Settings> |
| | | <setting name="WebAPI_WebS_WebService1" serializeAs="String"> |
| | | <value>http://192.168.0.81/WEBS-WMS/WebService1.asmx</value> |
| | | <value>http://192.168.0.11/WEBS-WMS/WebService1.asmx</value> |
| | | </setting> |
| | | </WebAPI.Properties.Settings> |
| | | </applicationSettings> |
| | |
| | | <Compile Include="Controllers\CJGL\Cj_SendGoodsBillController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Mes_OrderProcFlowAllReportController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Gy_MaterPreventErrMouldBillController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\Kf_MoveStockBillController.cs" /> |
| | | <Compile Include="Controllers\å质管ç\è´¨éæåº¦ç®æ å\QC_MonthTarGetBillController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Qc_PreventErrMouldCheckBillController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Sc_WorkBeginDotCheckBillController.cs" /> |