| | |
| | | } |
| | | } |
| | | |
| | | #region 车间定位 车间查询条码是否存在 |
| | | [Route("KF_ICInventory_WorkShop/SearchHBarCode")] |
| | | [HttpGet] |
| | | public object checkHBarCode_Batch(string HBarCode, string user, int HOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + HBarCode + "'", "h_v_Gy_BarCodeBill"); |
| | | |
| | | //判断条码是否存在条码档案 |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "[0000-1-037]校验成功"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-1-010]没有返回任何记录!当前批次码无入库信息请检查是否扫错"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-1-010]没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 车间定位 删除条码库存记录 |
| | | [Route("KF_ICInventory_WorkShop/ClearHBarCode")] |
| | | [HttpGet] |
| | | public object ClearHBarCode(string HBarCode, long HWHID, long HSPID, string user, int HOrgID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | //保存后控制========================================= |
| | | ds = oCN.RunProcReturn($"exec h_p_KF_MaterialUpper_Clear '{HBarCode}','{HWHID}',{HSPID},'{user}',{HOrgID}", "h_p_KF_ICInventory_Clear"); |
| | | |
| | | //写入日志 |
| | | ClsPub.Add_Log("", "删除项目,物料代码:" + HBarCode + ",仓位id:" + HSPID, user); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-1-010]没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | //车间定位 车间上下架时间查询 |
| | | [Route("Kf_WorkShopICStockBill/List")] |
| | | [HttpGet] |
| | |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | List<object> columnNameList = new List<object>(); |
| | | if(sWhere!=null) |
| | | { |
| | | sWhere = sWhere.Replace("'", "''"); |
| | | } |
| | | DataSet ds = oCN.RunProcReturn("exec h_p_KF_WorkShopICStockBillList '" + HBillType + "','" + HCarBarCode + "','" + HProcExBillNo + "','" + HMaterNumber + "'," + HWHID + "," + HSPID + ",'" + sWhere + "'", "h_p_KF_WorkShopICStockBillList"); |
| | | //添加列名 |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |