Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | public Int64 HPRDORGID; |
| | | //ææç¶æ |
| | | public bool HUseFlag; |
| | | |
| | | } |
| | | } |
| | |
| | | { |
| | | omodel.Kf_MoveStockStepInBill_FIFOCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MoveStockStepInBill_SourceBarCodeCtl") |
| | | { |
| | | omodel.Kf_MoveStockStepInBill_SourceBarCodeCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | //éè´éæå |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_POStockInBackBill_AutoCheck") |
| | |
| | | public string Kf_MoveStockStepInBill_SourceWHSPCtl; //æ¯å¦åæºåä¸ä»åºä»ä½ï¼'Y'为æ¯ï¼ |
| | | public string Kf_MoveStockStepInBill_FIFOList; //å
è¿å
åºä¸æ¶æ¸
å |
| | | public string Kf_MoveStockStepInBill_FIFOCtl; //å
è¿å
åºæ§å¶ |
| | | public string Kf_MoveStockStepInBill_SourceBarCodeCtl; //æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | |
| | | //éè´éæ |
| | | public string Kf_POStockInBackBill_AutoCheck; //æ¯å¦èªå¨å®¡æ ¸ |
| | |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥è¯¢æé!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ æ¥è¯¢æé!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere+ " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery"); |
| | |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥è¯¢æé!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ////夿æ¯å¦ææ¥è¯¢æé |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ æ¥è¯¢æé!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeIssueBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeIssueBillQuery"); |
| | | objJsonResult.code = "1"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | [Route("POStockInBill/Delete_Json")] |
| | | [HttpGet] |
| | | public object Delete_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType) |
| | |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼"; |
| | |
| | | return HInterID; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å°è´§ç¡®è®¤æ«æ¶æéç¥åå· è·å表ä½åè¡¨å¤´æ°æ® |
| | | /// </summary> |
| | | /// <param name="HBarCode"></param> |
| | | /// <returns></returns> |
| | | public json Get_ReciveBillCheckDate(string HBarCode) |
| | | { |
| | | json objjson = new json(); |
| | |
| | | } |
| | | } |
| | | |
| | | [Route("POStockInBillList/AuditPOInStockBillPost")] |
| | | [HttpPost] |
| | | public object AuditPOInStockBill([FromBody] JObject msg) |
| | | { |
| | | try |
| | | { |
| | | string _msg = msg["msg"].ToString(); |
| | | _msg = _msg.Replace("\\", ""); |
| | | _msg = _msg.Replace("\n", ""); |
| | | List<Models.ReciveBill_FastModel> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ReciveBill_FastModel>>(_msg); |
| | | DAL.ClsCg_POInStockBill oBill = new DAL.ClsCg_POInStockBill(); |
| | | var hinterID = list[0].HInterID; |
| | | var FID = list[0].FID; |
| | | oCn.BeginTran(); |
| | | string sql = string.Empty; |
| | | foreach (var item in list) |
| | | { |
| | | if (item.HSQty == 0) |
| | | continue; |
| | | sql = $"update Cg_POInStockBillSub set Hqty = {item.HSQty} where HInterID ={item.HInterID} and HEntryID = {item.HEntryID}"; |
| | | oCn.RunProc(sql); |
| | | } |
| | | oCn.RunProc("exec h_p_Cg_UpDatePOOrderRelation_Del " + hinterID);//å é¤å
³èå
³ç³» |
| | | |
| | | JObject jsonRoot = new JObject(); |
| | | jsonRoot.Add("Creator", ""); |
| | | jsonRoot.Add("NeedUpDateFields", new JArray()); |
| | | jsonRoot.Add("NeedReturnFields", new JArray()); |
| | | jsonRoot.Add("IsDeleteEntry", "false"); |
| | | jsonRoot.Add("SubSystemId", ""); |
| | | jsonRoot.Add("IsVerifyBaseDataField", ""); |
| | | |
| | | JObject jsonModel = new JObject(); |
| | | jsonModel.Add("FID", FID); |
| | | JArray Entry = new JArray(); |
| | | foreach (var item in list) |
| | | { |
| | | if (item.HSQty == 0) |
| | | continue; |
| | | JObject jsonFPOOrderEntry = new JObject(); |
| | | jsonFPOOrderEntry.Add("FEntryID", item.FEntryID); |
| | | jsonFPOOrderEntry.Add("FHQty ", item.HSQty); ; |
| | | Entry.Add(jsonFPOOrderEntry); |
| | | } |
| | | jsonModel.Add("FEntity", Entry); |
| | | jsonRoot.Add("Model", jsonModel); |
| | | 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 result = InvokeHelper.Save("PUR_ReceiveBill", jsonRoot.ToString()); |
| | | //LogService.Write(result); |
| | | if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE") |
| | | { |
| | | LogService.Write("æ¶æéç¥åä¿®æ¹å¤±è´¥jsonRoot:" + jsonRoot.ToString()); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éè¶æ¶æéç¥åæ´æ°å¤±è´¥" + result; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | var json = new |
| | | { |
| | | Ids = FID, |
| | | }; |
| | | //æäº¤ |
| | | var _result = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject(json)); |
| | | var _saveObj = JObject.Parse(_result); |
| | | if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("æ¶æéç¥åæäº¤å¤±è´¥jsonRoot:" + jsonRoot.ToString()); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éè¶æ¶æéç¥åæäº¤å¤±è´¥" + _result; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | //å®¡æ ¸ |
| | | _result = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject(json)); |
| | | _saveObj = JObject.Parse(_result); |
| | | if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("æ¶æéç¥åå®¡æ ¸å¤±è´¥jsonRoot:" + jsonRoot.ToString()); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éè¶æ¶æéç¥åå®¡æ ¸å¤±è´¥jsonRoot" + _result; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | |
| | | sql = string.Format(@"update Cg_POInStockBillMain set |
| | | HBillStatus = 2 , |
| | | HCheckDate = getdate() |
| | | where HInterID in ({0})", HInterID); |
| | | oCn.RunProc(sql);//æ´æ°mesç¶æ |
| | | //æ´æ°æåå åæ¥æ´æ°éè¶ |
| | | 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 = "å¼å¸¸ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å°è´§ç¡®è®¤ æ«æ¡ç æ ¡éª |
| | | /// </summary> |
| | | /// <param name="HBarcode"></param> |
| | | /// <param name="HInterID"></param> |
| | | /// <returns></returns> |
| | | [Route("POStockInBillList/Get_ReciveBillByBarcode")] |
| | | [HttpGet] |
| | | public object Get_ReciveBillByBarcode(string HBarcode, string HInterID) |
| | | { |
| | | try |
| | | { |
| | | //æ ¡éªæ¡ç æ¯å¦åå¨ |
| | | string sql = $"select* from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode}'"; |
| | | DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¡ç ä¸åå¨ï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | //string sql = $"select * from H_v_SRM_POInStockBillList where åæ®å· ='{HBillno}'"; |
| | | //ds = oCn.RunProcReturn(sql, "H_v_SRM_POInStockBillList"); |
| | | //if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | |
| | | //} |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | //æ¶æéç¥åå®¡æ ¸ å®¡æ ¸æäº¤ |
| | | [Route("POStockInBillList/Exec_ReciveBillCheck")] |
| | | [HttpGet] |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MESBeginWorkBill/DeltetMESBeginWorkBill")] |
| | | [HttpGet] |
| | | public object DeltetMESBeginWorkBill(string HInterID,string UserName) |
| | | public object DeltetMESBeginWorkBill(string HInterID, string UserName) |
| | | { |
| | | DBUtility.ClsPub.CurUserName = UserName; |
| | | //ç¼è¾æé |
| | |
| | | [HttpGet] |
| | | public object AuditProcessReportList(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "MES_MESBeginWorkBill_Check"; |
| | | string ModRightNameCheck = "MES_MESBeginWorkBill_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | |
| | | [HttpPost] |
| | | public object SaveGetMESBeginWorkFrom([FromBody] JObject msg) |
| | | { |
| | | |
| | | |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | DBUtility.ClsPub.CurUserName =oItem.HMaker; |
| | | ClsXt_SystemParameter oClsXt_SystemParameter = new ClsXt_SystemParameter(); |
| | | string sCapName = oClsXt_SystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (sCapName.Contains("å¯è´")) |
| | | { |
| | | DataTable dt = getInfodatanow(oItem.HSourceID.ToString()); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | DataRow dr = dt.Rows[0]; |
| | | oItem.HRunStatus = dr["runStu"].ToString(); |
| | | oItem.HSourceBeginQty = Convert.ToDecimal(dr["countAll"]); |
| | | } |
| | | } |
| | | DBUtility.ClsPub.CurUserName = oItem.HMaker; |
| | | oItem.HBillType = "3787"; |
| | | oItem.HBillSubType = "3787"; |
| | | oItem.HBillStatus = 1; //åæ®ç¶æï¼1æªå®¡ï¼2å®¡æ ¸éè¿ï¼3å
³éï¼4ä½åºï¼5å®¡æ ¸éå,6å®¡æ ¸ä¸,7å·²é
ï¼8å·²åå¤ï¼9ç»æ¡ï¼10éªè¯,11ä¸è¾¾ï¼12å¼å·¥,13ç³è¯·å®¡æ¹,15ç³è¯·æ£éªï¼16 å¤å®åæ ¼ï¼17å¤å®ä¸åæ ¼ï¼ |
| | |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | { |
| | | |
| | | |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (bResult) |
| | | if (bResult) |
| | | { |
| | | objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //è¿å主ID |
| | | //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | if (bResult) |
| | | { |
| | | |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | public DataTable getInfodatanow(string hsoucreID) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | string sql = $" select HMacAddr, isnull(runStu,'')runStu, isnull(countAll,0)countAll from Gy_Source t1 left join HX_LIOTsys..Info_data_now t2 on t1.HMacAddr = t2.hid where t1.hitemid={hsoucreID}"; |
| | | DataTable dt = oCn.RunProcReturn(sql, "dt").Tables[0]; |
| | | return dt; |
| | | } |
| | | |
| | | #region æ¥å·¥å¹³å°éªè¯åæ®ç¶æ |
| | | [Route("Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus")] |
| | |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "Sc_ICMOBillWorkQtyStatus_Tmp"); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region æ¥å·¥å¹³å°äº§éæ±éªè¯æ±æ¥æ°éæ¯å¦è¶
åºè®¡åæ°éè¾ |
| | | /// <summary> |
| | | /// |
| | |
| | | if (bResult) |
| | | { |
| | | objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //è¿å主ID |
| | | //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MESBeginWorkBill/MESProductAuditProcessReportList")] |
| | | [HttpGet] |
| | | public object MESProductAuditProcessReportList(int HSourceID,int HSourceInterID,int HSourceEntryID,string HSourceBillNo, int HICMOInterID,int HICMOEntryID, int HInterID, int IsAudit, string CurUserName) |
| | | public object MESProductAuditProcessReportList(int HSourceID, int HSourceInterID, int HSourceEntryID, string HSourceBillNo, int HICMOInterID, int HICMOEntryID, int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "MES_ProcExchReport_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | |
| | | { |
| | | string StrMessage = ""; |
| | | //å®¡æ ¸æé |
| | | if (!WebClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName,ref StrMessage)) |
| | | if (!WebClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName, ref StrMessage)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | if (IsAudit == 0) //å®¡æ ¸æäº¤ |
| | | { |
| | | //å®¡æ ¸æäº¤ |
| | | if (oBill.CheckBill(HSourceID, HSourceInterID,HSourceEntryID,HSourceBillNo,HICMOInterID, HICMOEntryID, lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | if (oBill.CheckBill(HSourceID, HSourceInterID, HSourceEntryID, HSourceBillNo, HICMOInterID, HICMOEntryID, lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | #region æ¥å·¥å¹³å°äº§éæ±æ¥å é¤ |
| | | [Route("Sc_MESBeginWorkBill/DeltetMESProductReportBill")] |
| | | [HttpGet] |
| | | public object DeleteGetLineBindBillList(string HInterID,string HICMOInterID,string HICMOEntryID,string UserName) |
| | | public object DeleteGetLineBindBillList(string HInterID, string HICMOInterID, string HICMOEntryID, string UserName) |
| | | { |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | //æ¥è¯¢äº§éæ±æ¥ä¸´æ¶è¡¨æ°é |
| | | ds = oCN.RunProcReturn("select isnull(HQty,0) HQty,isnull(HWasterQty,0) HWasterQty,isnull(HBadQty,0) HBadQty from Sc_ICMOBillWorkQtyStatus_Tmp where HInterID='" + HInterID + "' and HICMOInterID='" + HICMOInterID + "' and HICMOEntryID='" + HICMOEntryID + "'", "Sc_ICMOBillWorkQtyStatus_Tmp"); |
| | | double HQty =double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString()); |
| | | double HQty = double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString()); |
| | | double HWasterQty = double.Parse(ds.Tables[0].Rows[0]["HWasterQty"].ToString()); |
| | | double HBadQty = double.Parse(ds.Tables[0].Rows[0]["HBadQty"].ToString()); |
| | | double sumqty = HQty + HBadQty + HWasterQty; //æ±æ¥æ°é+ä¸è¯+æ¥åº |
| | | //æ´æ°äº§éè£
é临æ¶è¡¨å·²æ±æ¥æ°é |
| | | string sql1 = string.Format(@"update Sc_ICMOBillStatus_Tmp set HICMOStatus='1',HFinishFlag='0', HRelationInterID=0,HSplitRelationQty=HSplitRelationQty-" + sumqty + ",HDateFinishQty=HDateFinishQty-"+ sumqty + " where HICMOInterID='"+ HICMOInterID + "' and HICMOEntryID='"+ HICMOEntryID + "'"); |
| | | //æ´æ°äº§éè£
é临æ¶è¡¨å·²æ±æ¥æ°é |
| | | string sql1 = string.Format(@"update Sc_ICMOBillStatus_Tmp set HICMOStatus='1',HFinishFlag='0', HRelationInterID=0,HSplitRelationQty=HSplitRelationQty-" + sumqty + ",HDateFinishQty=HDateFinishQty-" + sumqty + " where HICMOInterID='" + HICMOInterID + "' and HICMOEntryID='" + HICMOEntryID + "'"); |
| | | oCN.RunProc(sql1); |
| | | //æ´æ°åæ¢ç¶æå¼ |
| | | string sql = string.Format(@"delete Sc_ICMOBillWorkQtyStatus_Tmp where HInterID='" + HInterID + "'"); |
| | |
| | | #region æ¥å·¥å¹³å°æ¥æ£ç³è¯·ä¿å |
| | | [Route("Sc_MESBeginWorkBill/SaveGetMESProductReportBillList")] |
| | | [HttpGet] |
| | | public object SaveGetMESProductReportBillList(string ScMaxWork,string HSourceBillType, string workcode,int HSourceID,int HICMOInterID,int HICMOEntryID,string HMaker,string Czybm) |
| | | { |
| | | public object SaveGetMESProductReportBillList(string ScMaxWork, string HSourceBillType, string workcode, int HSourceID, int HICMOInterID, int HICMOEntryID, string HMaker, string Czybm) |
| | | { |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | |
| | | //} |
| | | |
| | | string sHSourceType = HSourceBillType; |
| | | string BillType = "3711"; //åæ®ç±»å (çäº§æ±æ¥å) |
| | | //å¾å°mainid |
| | | long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string BillType = "3711"; //åæ®ç±»å (çäº§æ±æ¥å) |
| | | //å¾å°mainid |
| | | long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //oCN.BeginTran(); |
| | | //æ ¹æ®åå·ãèµæºIDã订å主IDã订ååIDãå¶åäººè¿æ»¤äº§éæ±æ¥æ¥æ£ç³è¯·æäº¤æ°æ® |
| | | //string sql = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set |
| | |
| | | //ds = oCN.RunProcReturn("select top 1 * from Sc_ICMOBillWorkQtyStatus_Tmp where HICMOReportInterID='" + HInterID + "' and HICMOReportBillNo='" + ScMaxWork + "'", "Sc_ICMOBillWorkQtyStatus_Tmp"); |
| | | //if (ds.Tables[0].Rows.Count <= 0) |
| | | //{ |
| | | //oCN.RollBack(); |
| | | //oCN.RollBack(); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å½ååæ®æ äº§éæ±æ¥è®°å½ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | |
| | | WebS.ClsSc_ICMOReportBillMain model = new WebS.ClsSc_ICMOReportBillMain(); |
| | | model.HInterID = HInterID; |
| | | model.HBillNo = ScMaxWork; |
| | |
| | | //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_Layui(model,workcode,HSourceID, sHSourceType, ref DBUtility.ClsPub.sErrInfo); |
| | | bool flag = oWebs.set_SaveICMOProductReportBill_Layui(model, workcode, HSourceID, sHSourceType, ref DBUtility.ClsPub.sErrInfo); |
| | | if (flag) |
| | | { |
| | | //oCN.Commit(); |
| | |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | else |
| | | { |
| | | //oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼"+ flag+ ";"+ DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + flag + ";" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HBeginWorkTime,HSourceID" + |
| | | ",HSourceInterID_Main,HSourceEntryID_Main,HSourceBillNo_Main,HSourceBillType_Main" + |
| | | ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate,HRunStatus,HSourceBeginQty" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",getdate(),'" + omodel.HMaker+ "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" + |
| | |
| | | ",'" + omodel.HProcExchBillNo + "'," + omodel.HMaterID.ToString() + "," + omodel.HProcID.ToString() + "," + omodel.HICMOQty.ToString() + "," + omodel.HPlanQty.ToString() + ",getdate()," + omodel.HSourceID.ToString() + |
| | | ",'" + omodel.HMainSourceInterID.ToString() + "'," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType.ToString() + "'" + |
| | | ",'" + omodel.HMainSourceInterID.ToString() + "'," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType.ToString() + "'" + |
| | | "," + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HBarCode + "','" + omodel.HAddr + "','" + omodel.HBarCodeMaker + "',getdate()" + |
| | | "," + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HBarCode + "','" + omodel.HAddr + "','" + omodel.HBarCodeMaker + "',getdate(),'"+ omodel.HRunStatus + "','"+ omodel.HSourceBeginQty.ToString() + "'" + |
| | | ") "); |
| | | |
| | | //忬¡éªè¯ ä¿åæ¯å¦ åç |
| | |
| | | public String HBarCodeMaker; |
| | | public DateTime HBarCodeMakeDate; |
| | | new public string HMainSourceEntryID; |
| | | |
| | | public string HRunStatus; |
| | | public decimal HSourceBeginQty; |
| | | //public int HSourceInterID_Main; |
| | | //public int HSourceEntryID_Main; |
| | | //public string HSourceBillNo_Main; |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class OptionListModel |
| | | { |
| | | public string field { get; set; } |
| | | public string title { get; set; } |
| | | public bool sort { get; set; } |
| | | public bool hide { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class OptionListModel |
| | | public class ReciveBill_FastModel |
| | | { |
| | | public string field { get; set; } |
| | | public string title { get; set; } |
| | | public bool sort { get; set; } |
| | | public bool hide { get; set; } |
| | | public string HInterID { get; set; } |
| | | public string HEntryID { get; set; } |
| | | public decimal HQty { get; set; } |
| | | public decimal HSQty { get; set; } |
| | | public string FID { get; set; } |
| | | public string FEntryID { get; set; } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | <Compile Include="Models\Sc_WorkBillSortBillSub.cs" /> |
| | | <Compile Include="Models\Sc_WorkDemandPlanBillMain.cs" /> |
| | | <Compile Include="Models\Sc_WorkDemandPlanBillSub.cs" /> |
| | | <Compile Include="Models\å
¶å®\ReciveBill_FastModel.cs" /> |
| | | <Compile Include="Models\卿å\OptionListModel.cs" /> |
| | | <Compile Include="Models\åºç¡èµæ\Gy_ClassTimePrj.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsGy_ClassTimePrj_Model.cs" /> |