7个文件已修改
190 ■■■■■ 已修改文件
HTML/views/ASNSetting/ArrivalNotice.html 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportNotice.html 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/SysServer/UserInforServer.cs 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.Entity/SysEntity/SysUserInfor.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/PdaSoController.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/WeatherForecastController.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/ArrivalNotice.html
@@ -875,26 +875,34 @@
                    case "check":
                        // 代码区域
                        layer.confirm('确定复核此单据吗?', function (index) {
                            // 代码区域
                            var param = {
                                Id: data.Id,
                            };
                            sendData(IP + "/UpApi/FinishAsn", param, 'post', function (res) {
                                if (res.code == 0) { //成功
                                    layer.msg(res.msg, {
                                        icon: 1,
                                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    }, function () {
                                        refreshTable();
                                        doing = true
                                    });
                                } else { //不成功
                                    layer.msg(res.msg, {
                                        icon: 2,
                                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    }, function () { doing = true });
                                }
                            });
                            if (doing == true) {
                                doing = false;
                                // 代码区域
                                var param = {
                                    Id: data.Id,
                                };
                                sendData(IP + "/UpApi/FinishAsn", param, 'post', function (res) {
                                    if (res.code == 0) { //成功
                                        layer.msg(res.msg, {
                                            icon: 1,
                                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                        }, function () {
                                            refreshTable();
                                            doing = true
                                        });
                                    } else { //不成功
                                        layer.msg(res.msg, {
                                            icon: 2,
                                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                        }, function () { doing = true });
                                    }
                                });
                            } else {
                                layer.msg("请勿重复点击", {
                                    icon: 2,
                                    time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                });
                            }
                        });
                        break;
HTML/views/SOSetting/ExportNotice.html
@@ -1376,25 +1376,33 @@
                } else if (obj.event === 'check') {//复核
                    // 代码区域
                    layer.confirm('确定复核此单据吗?', function (index) {
                        var param = {
                            Id: data.Id,
                        };
                        sendData(IP + "/UpApi/FinishExportNotice", param, 'post', function (res) {
                            if (res.code == 0) { //成功
                                layer.msg(res.msg, {
                                    icon: 1,
                                    time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                }, function () {
                                    refreshTable();
                                    doing = true
                                });
                            } else { //不成功
                                layer.msg(res.msg, {
                                    icon: 2,
                                    time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                }, function () { doing = true });
                            }
                        });
                        if (isChongFu == true) {
                            isChongFu = false;
                            var param = {
                                Id: data.Id,
                            };
                            sendData(IP + "/UpApi/FinishExportNotice", param, 'post', function (res) {
                                if (res.code == 0) { //成功
                                    layer.msg(res.msg, {
                                        icon: 1,
                                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    }, function () {
                                        refreshTable();
                                        isChongFu = true;
                                    });
                                } else { //不成功
                                    layer.msg(res.msg, {
                                        icon: 2,
                                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    }, function () { isChongFu = true; });
                                }
                            });
                        } else {
                            layer.msg("请勿重复点击", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            });
                        }
                    });
                }
            });
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -140,7 +140,7 @@
                {
                    isNew = true;
                    var newPalletInfo = await Db.Queryable<SysPallets>().FirstAsync(m => m.IsDel == "0" && m.PalletNo == palletNoNew && m.Status == "0");
                    var newPalletInfo = await Db.Queryable<SysPallets>().FirstAsync(m => m.IsDel == "0" && m.PalletNo == palletNoNew);//&& m.Status == "0"
                    if (newPalletInfo == null)
                    {
                        throw Oops.Bah("新托盘信息不存在!");
@@ -234,10 +234,10 @@
                        {
                            throw Oops.Bah($"当前{item.BoxNo}已拣货完成,请勿重复拣货");
                        }
                        if (item.SkuNo != allot.SkuNo || item.LotNo != allot.LotNo)
                        {
                            throw Oops.Bah("当前托盘上有其他不同物料批次,拣货失败");
                        }
                        //if (item.SkuNo != allot.SkuNo || item.LotNo != allot.LotNo)
                        //{
                        //    throw Oops.Bah("当前托盘上有其他不同物料批次,拣货失败");
                        //}
                        //添加拣货明细
                        var completeDetail = new BllCompleteDetail()
                        {
Wms/WMS.BLL/SysServer/UserInforServer.cs
@@ -35,25 +35,49 @@
        public async Task<int> LoginAdmin(string loginName, string loginPwd)
        {
            //loginPwd = Md5Tools.CalcMd5(loginPwd);
            var modUser = await Db.Queryable<SysUserInfor>().FirstAsync(m => m.UserName == loginName && m.PassWord == loginPwd &&m.IsDel=="0");
            if (modUser != null) //账号密码是否正确
            //查询密码已错误次数
            string pwdErrNumSql = $@"select PwdErrNum from SysUserInfor where UserName='{loginName}'";
            int pwdErrNum = Db.Ado.GetInt(pwdErrNumSql);
            //设定密码错误的次数
            string funNumSql = $@"select SetValue from SysFunSetting where IsDel='0' and IsEnable='NO' and FunSetNo='pwdErrNum' and GroupNo='pwdErrNum'";
            int funNum = Db.Ado.GetInt(funNumSql);
            //比较设定次数和已错误次数
            if (pwdErrNum < funNum)
            {
                if (modUser.Status == "0") //当前账号是否正常启用
                //loginPwd = Md5Tools.CalcMd5(loginPwd);
                var modUser = await Db.Queryable<SysUserInfor>().FirstAsync(m => m.UserName == loginName && m.PassWord == loginPwd && m.IsDel == "0");
                if (modUser != null) //账号密码是否正确
                {
                    //最后登陆时间
                    await Db.Updateable(modUser).UpdateColumns(s => s.LoginTime == DateTime.Now).ExecuteCommandAsync();
                    return modUser.Id;
                    if (modUser.Status == "0") //当前账号是否正常启用
                    {
                        //密码错误次数+1
                        string uptErrNumSql = $@"update SysUserInfor set PwdErrNum=0 where UserName='{loginName}'";
                        int uptErrNum = Db.Ado.ExecuteCommand(uptErrNumSql);
                        //最后登陆时间
                        await Db.Updateable(modUser).UpdateColumns(s => s.LoginTime == DateTime.Now).ExecuteCommandAsync();
                        return modUser.Id;
                    }
                    else //当前账号被禁用
                    {
                        return 0;
                    }
                }
                else //当前账号被禁用
                else //账号密码不正确或没有此账号
                {
                    return 0;
                    //密码错误次数+1
                    string addErrNumSql = $@"update SysUserInfor set PwdErrNum+=1 where UserName='{loginName}'";
                    int addErrNum = Db.Ado.ExecuteCommand(addErrNumSql);
                    return -1;
                }
            }
            else //账号密码不正确或没有此账号
            else//锁定账号
            {
                return -1;
                return -2;
            }
        }
        /// <summary>
@@ -67,7 +91,7 @@
                                        .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id)
                                        .LeftJoin<SysDepartment>((a, b, c) => a.DepartmentNo == c.DepartmentNo)
                                        .LeftJoin<SysRoles>((a, b, c, d) => a.RoleNo == d.RoleNo)
                                        .Where((a,b,c,d)=>d.IsDel == "0")
                                        .Where((a, b, c, d) => d.IsDel == "0")
                                        .WhereIF(!string.IsNullOrEmpty(UserName), a => a.UserName.Contains(UserName))
                                        .WhereIF(!string.IsNullOrEmpty(DepartmentNo), a => a.DepartmentNo == DepartmentNo)
                                        .WhereIF(!string.IsNullOrEmpty(RoleNo), a => a.RoleNo == RoleNo)
@@ -195,7 +219,7 @@
        /// <param name="userId">用户id</param>
        /// <returns></returns>
        /// <exception cref="Exception">捕获异常</exception>
        public async Task<int> UptUserPassWord(string pwdNew,string pwdNewTwo, int userId)
        public async Task<int> UptUserPassWord(string pwdNew, string pwdNewTwo, int userId)
        {
            var funSet = Db.Queryable<SysFunSetting>().Where(m => m.IsDel == "0" && m.FunSetName == "密码规则" && m.IsEnable == "NO").ToList().FirstOrDefault();
            if (funSet != null)
Wms/WMS.Entity/SysEntity/SysUserInfor.cs
@@ -12,26 +12,32 @@
        /// 用户号
        /// </summary>
        public string UserNo { get; set; }
        /// <summary>
        /// 登录名称
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string RealName { get; set; }
        /// <summary>
        /// 密码 MD5加密
        /// </summary>
        public string PassWord { get; set; }
        /// <summary>
        /// 职工号
        /// </summary>
        public string JobNo { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public string Status { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
@@ -40,31 +46,36 @@
        /// 国籍
        /// </summary>
        public string Nationality { get; set; }
        /// <summary>
        /// 证件号
        /// </summary>
        public string Paper { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string Phone { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Addres { get; set; }
        /// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime? LoginTime { get; set; }
        /// <summary>
        /// 密码设置时间
        /// </summary>
        public DateTime? SetPasswordTime { get; set; }
        /// <summary>
        /// 角色号
@@ -80,5 +91,10 @@
        /// 备注
        /// </summary>
        public string Demo { get; set; }
        /// <summary>
        /// 密码错误次数
        /// </summary>
        public int PwdErrNum { get; set; } = 0;
    }
}
Wms/Wms/Controllers/PdaSoController.cs
@@ -90,7 +90,7 @@
        [HttpPost]
        public async Task<List<string>> GetPalletListBySo(PdaSoVm model)
        {
            return await _pdaSoSvc.GetPalletListBySo(model.SoNo,model.SoDetailId);
            return await _pdaSoSvc.GetPalletListBySo(model.SoNo, model.SoDetailId);
        }
@@ -102,7 +102,7 @@
        [HttpPost]
        public async Task<List<DetailIdSkuLotNo>> GetSoSkuLotNoListByPallet(PdaSoVm model)
        {
           return await _pdaSoSvc.GetSoSkuLotNoListByPallet(model.PalletNo, model.SoNo);
            return await _pdaSoSvc.GetSoSkuLotNoListByPallet(model.PalletNo, model.SoNo);
        }
@@ -243,7 +243,7 @@
            {
                return Ok(new HttpReturnModel { Success = "1", Message = e.Message });
            }
        }
@@ -268,7 +268,7 @@
        ///  <param name="LotNo">批次</param>
        /// <returns></returns>
        [HttpGet]
        public async Task<List<BoxInfo>> GetPingKuLocationInfo(string soNo,string SkuNo,string LotNo)
        public async Task<List<BoxInfo>> GetPingKuLocationInfo(string soNo, string SkuNo, string LotNo)
        {
            return await _pdaSoSvc.GetPingKuLocationInfo(soNo, SkuNo, LotNo);
        }
@@ -373,7 +373,7 @@
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        [HttpPost]
        public async Task ChejianPickNum(PdaSoVm model)
        public async Task ChejianPickNum(PdaSoVm model)
        {
            if (_userManager.UserId == 0)
            {
Wms/Wms/Controllers/WeatherForecastController.cs
@@ -59,7 +59,7 @@
            {
                var userId = await _userMan.LoginAdmin(model.LoginName, model.LoginPwd);
                if (userId != -1) //
                if (userId != -1 && userId != -2) //
                {
                    if (userId != 0) //正确返回
                    {
@@ -77,10 +77,14 @@
                        throw Oops.Bah("当前账号已被禁用");
                    }
                }
                else //账号密码错误
                else if (userId == -1) //账号密码错误
                {
                    throw Oops.Bah("当前账号或密码错误");
                }
                else
                {
                    throw Oops.Bah("当前账号已被锁定,请联系管理员处理");
                }
            }
            else //数据格式错误
            {