| | |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_UpdatePonderationBillMain_Temp_BarCode_Json")] |
| | | [HttpGet] |
| | | public object set_UpdatePonderationBillMain_Temp_BarCode_Json(long HInterID, string HBillType, string HBarCode, int HQty) |
| | | public object set_UpdatePonderationBillMain_Temp_BarCode_Json(long HInterID, string HBillType, string HBarCode, double HQty, long HItemID) |
| | | { |
| | | try |
| | | { |
| | | //(HBarCode_Pack <> '' and HInterID = { HInterID.ToString() } and HBillType = '{HBillType}' and HBarCode_Pack = '{HBarCode}') or |
| | | // (HBarCode <> '' and HInterID ={ HInterID.ToString()} |
| | | //and HBillType = '{HBillType}' and HBarCode = '{HBarCode}') |
| | | // æ ¹æ®ææ¡ç åæ®µåæ¡ç åæ®µ 夿 æ´æ°çæ¡ç æ°éæ¯å¦å¤§äºæå¤§æ°éæå°äº0 |
| | | ds = oCn.RunProcReturn($@"select * from KF_PonderationBillMain_Temp where |
| | | (HBarCode_Pack<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode_Pack='{HBarCode}') or |
| | | (HBarCode<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode='{HBarCode}') |
| | | HItemID = {HItemID} |
| | | ", "KF_PonderationBillMain_Temp"); |
| | | |
| | | if(ds == null || ds.Tables[0].Rows.Count == 0) |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if(Double.Parse(ds.Tables[0].Rows[0]["HQtyMust"].ToString()) < HQty) |
| | | { |
| | | // æ´æ°çæ¡ç æ°éæ¯å¦å¤§äºæå¤§æ°é |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"æ´æ°å¤±è´¥ï¼æ¡ç æ°é{HQty}å¤§äºæå¤§å¯æ«æ°é{ds.Tables[0].Rows[0]["HQtyMust"].ToString()}..."; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if(Double.Parse(ds.Tables[0].Rows[0]["HQtyMust"].ToString()) < HQty) |
| | | //{ |
| | | //// æ´æ°çæ¡ç æ°éæ¯å¦å¤§äºæå¤§æ°é |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = $"æ´æ°å¤±è´¥ï¼æ¡ç æ°é{HQty}å¤§äºæå¤§å¯æ«æ°é{ds.Tables[0].Rows[0]["HQtyMust"].ToString()}..."; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | |
| | | //æ ¹æ®ææ¡ç åæ®µæ´æ°æ¬åæ¡ç åºå
¥åºç¼åè¡¨æ°æ® |
| | | oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode_Pack<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode_Pack='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode_Pack<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode_Pack='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | //æ ¹æ®æ¡ç åæ®µæ´æ°æ¬åæ¡ç åºå
¥åºç¼åè¡¨æ°æ® |
| | | oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | //æ ¹æ®æ¡ç èªå¢å æ´æ° æ¡ç åºå
¥åºç¼åè¡¨æ°æ® |
| | | oCn.RunProc($"exec h_p_KF_PonderationBillMain_Temp_Update {HInterID}, '{HBillType}', '{HBarCode}', {HQty}, {HItemID}", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |