Browse Source

Merge branch 'master' into kitchenmanage

tmp
zhaoy 9 months ago
parent
commit
9d0f63086e
6 changed files with 16 additions and 4 deletions
  1. +4
    -0
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsTypeService.cs
  2. +2
    -1
      BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionQueryInputDto.cs
  3. +2
    -1
      BPA.SAAS.Manage.Application/Device/Services/DeviceVesionService.cs
  4. +4
    -0
      BPA.SAAS.Manage.Application/Org/Services/OrganizeService.cs
  5. +3
    -1
      BPA.SAAS.Manage.Application/Org/Services/RoleService.cs
  6. +1
    -1
      BPA.SAAS.Manage.Application/Org/Services/UserService.cs

+ 4
- 0
BPA.SAAS.Manage.Application/DataBase/Services/GoodsTypeService.cs View File

@@ -78,6 +78,10 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
Sort = dto.Sort,
Status = CommonStatus.ENABLE,
};
if (string.IsNullOrWhiteSpace(dto.Pid))
{
newType.Pid = "0";
}
var res =await _db.Insertable(newType).CallEntityMethod(m => m.Create()).ExecuteCommandAsync();
return res > 0;
}


+ 2
- 1
BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionQueryInputDto.cs View File

@@ -9,6 +9,7 @@ namespace BPA.SAAS.Manage.Application.Device.Dtos.DeviceVesion
{
public class DeviceVesionQueryInputDto : PageInputBase
{
public string ProductId { get; set; }
public string ProductName { get; set; }
public string Vesion { get; set; }
}
}

+ 2
- 1
BPA.SAAS.Manage.Application/Device/Services/DeviceVesionService.cs View File

@@ -29,7 +29,8 @@ namespace BPA.SAAS.Manage.Application.Device.Services
{
var total = new RefAsync<int>();
var data = await _db.Queryable<BPA_ProductVesion,BPA_Product>((a, b) => new JoinQueryInfos(JoinType.Left, b.Id == a.ProductId))
.WhereIF(!string.IsNullOrWhiteSpace(inputDto.ProductId), x => x.ProductId.Contains(inputDto.ProductId))
.WhereIF(!string.IsNullOrWhiteSpace(inputDto.ProductName), (a, b) => b.Name.Contains(inputDto.ProductName))
.WhereIF(!string.IsNullOrWhiteSpace(inputDto.Vesion), (a, b) => a.Vesion.Contains(inputDto.Vesion))
.OrderBy(a => a.CreateAt, OrderByType.Desc)
.Select((a,b)=>new DeviceVesionModel()
{


+ 4
- 0
BPA.SAAS.Manage.Application/Org/Services/OrganizeService.cs View File

@@ -74,6 +74,10 @@ namespace BPA.SAAS.Manage.Application.Org.Services
if (tel == false) throw Oops.Oh("手机号错误");
}
var sysOrg = input.Adapt<BPA_Organize>();
if (string.IsNullOrWhiteSpace(sysOrg.PID))
{
sysOrg.PID = "0";
}
await FillPids(sysOrg);
return await _db.Insertable(sysOrg).CallEntityMethod(m => m.Create()).ExecuteCommandAsync()>0;
}


+ 3
- 1
BPA.SAAS.Manage.Application/Org/Services/RoleService.cs View File

@@ -1,5 +1,6 @@
using BPA.SAAS.Manage.Application.Org.Dtos.Role;
using BPA.SAAS.Manage.Application.Org.Interface;
using BPA.SAAS.Manage.Application.System.Dtos;
using BPA.SAAS.Manage.Comm.Const;
using BPA.SAAS.Manage.Comm.Enum;
using BPA.SAAS.Manage.Core.Base;
@@ -149,6 +150,7 @@ namespace BPA.SAAS.Manage.Application.Org.Services
{
List<BPA_RoleMenu> models = new List<BPA_RoleMenu>();
List<string> NewMenuId = new List<string>();
_db.Deleteable<BPA_RoleMenu>(t => t.SysRoleId == input.SysRoleId).ExecuteCommandHasChange();
if (input.SysMenuId != null)
{
var Menus = _db.Queryable<BPA_Menu>().ToList();
@@ -181,7 +183,7 @@ namespace BPA.SAAS.Manage.Application.Org.Services
if (models.Count <= 0)
return true;

_db.Deleteable<BPA_RoleMenu>(t => t.SysRoleId == input.SysRoleId).ExecuteCommandHasChange();
return await _db.Insertable(models).ExecuteCommandAsync() > 0;




+ 1
- 1
BPA.SAAS.Manage.Application/Org/Services/UserService.cs View File

@@ -64,7 +64,7 @@ namespace BPA.SAAS.Manage.Application.Org.Services
user.Password = MD5Encryption.Encrypt("123456").ToLower();
var check = _db.Queryable<BPA_Users>().First(t => t.Account == user.Account);
if (check != null)
return false;
throw Oops.Oh("登录账户不能重复");
return await _db.Insertable(user).CallEntityMethod(t => t.Create()).ExecuteCommandAsync()> 0;
}
/// <summary>


Loading…
Cancel
Save