yl
2022-08-22 b6349cb2b3a868c8c917ca221bb7eaf6f272bdd2
VueWebApi/Controllers/BasicSettingController.cs
@@ -17,6 +17,7 @@
{
    [RoutePrefix(prefix: "api/BasicSetting")]
    [ControllerGroup("基础设置","在线接口")]
    [ChannelActionFilter]
    public class BasicSettingController : ApiController
    {
        //定义全局信息返回变量
@@ -171,12 +172,13 @@
            string Password = obj["Password"].ToString(); //密码
            string Enable = obj["Enable"].ToString(); //在职状态
            string StuOrg = obj["StuOrg"].ToString(); //选择组织编码
            string groupcode= obj["groupcode"].ToString(); //所属班组编码
            string wagetype = obj["wagetype"].ToString(); //工资类型
            string Mobile = obj["Mobile"].ToString(); //联系方式
            string Email = obj["Email"].ToString(); //电子邮箱
            string Operator = obj["Operator"].ToString(); //操作人员
            string OperType = obj["OperType"].ToString();  //操作类型
            mes = BasicSettingBLL.AddUpdateUser(UserId, UserCode, UserName, Password, Enable, StuOrg, wagetype, Mobile, Email, Operator, OperType);
            mes = BasicSettingBLL.AddUpdateUser(UserId, UserCode, UserName, Password, Enable, StuOrg, groupcode, wagetype, Mobile, Email, Operator, OperType);
            return TJson.toJson(mes);
        }
        #endregion
@@ -238,7 +240,7 @@
        /// <returns></returns>
        [Route(template: "ImportUserExcel")]
        [HttpPost]
        public HttpResponseMessage ImportUserExcel(HttpPostedFileBase files)
        public HttpResponseMessage ImportUserExcel(HttpPostedFileBase files,string username)
        {
            string savePath;
            if (files == null || files.ContentLength <= 0)
@@ -248,7 +250,6 @@
            }
            else
            {
                var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //登录用户名
                string filename = Path.GetFileName(files.FileName);
                int filesize = files.ContentLength;//获取上传文件的大小单位为字节byte
                string fileEx = System.IO.Path.GetExtension(filename);//获取上传文件的扩展名
@@ -620,7 +621,7 @@
            string person = obj["person"].ToString(); //联系人
            string contact = obj["contact"].ToString(); //联系方式
            string description = obj["description"].ToString(); //补充描述
            var usercode = "Admin";//HttpContext.Current.Request.Cookies["admin"].Value.ToString();
            var usercode = HttpContext.Current.Request.Cookies["admin"].Value.ToString();
            string OperType = obj["OperType"].ToString();  //操作类型
            mes = BasicSettingBLL.AddUpdateCurrentUnit(unitid, unitcode, unitname, mtypecode, btypecode,htypecode, person, contact, description, usercode, OperType);
            return TJson.toJson(mes);