yangle
2023-03-10 dabd6d20c31442d461fc30c49aa04abd4549be6b
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -72,8 +72,8 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                long HProcNo = list[0].HProcNo;//流水号
                if (HProcNo <= 0)
                string HProcNo = list[0].HProcNo;//流水号
                if (HProcNo == "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -1042,5 +1042,61 @@
            }
        }
        #endregion
        #region 返回用户获取默认值列表
        [Route("Cj_StationInBill/GetDefValByUser")]
        [HttpGet]
        public object GetDefValByUser(string Czybm, string Czymc)
        {
            try
            {
                ////判断是否有查询权限
                //if (!DBUtility.ClsPub.Security_Log("Cj_StationInBill_Query", 1, false, user))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "无查询权限!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                if (Czymc == null || Czymc.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Cj_GetDefValByUser", "h_v_Cj_GetDefValByUser");
                }
                else
                {
                    string sql1 = "select * from h_v_Cj_GetDefValByUser where 1 = 1 ";
                    string sql = sql1 + " and 用户编码 ='" + Czybm + "' and 用户名称 ='" + Czymc + "'";
                    ds = oCN.RunProcReturn(sql, "h_v_Cj_GetDefValByUser");
                }
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}