Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -36,8 +36,16 @@ namespace Tnb.BasicData
|
|||||||
return await _repository.AsSugarClient().Queryable<BasProcessDefective>()
|
return await _repository.AsSugarClient().Queryable<BasProcessDefective>()
|
||||||
.LeftJoin<BasProcess>((a, b) => a.process_id == b.id)
|
.LeftJoin<BasProcess>((a, b) => a.process_id == b.id)
|
||||||
.LeftJoin<BasDefect>((a, b, c) => a.defective_id == c.id)
|
.LeftJoin<BasDefect>((a, b, c) => a.defective_id == c.id)
|
||||||
.Where((a, b, c) => a.process_id == processId)
|
.LeftJoin<BasDefectType>((a,b,c,d)=>c.defect_type_id==d.id)
|
||||||
.Select((a, b, c) => c).ToListAsync();
|
.Where((a, b, c) => a.process_id == processId && c.enabled==1)
|
||||||
|
.Select((a, b, c,d) => new
|
||||||
|
{
|
||||||
|
id = c.id,
|
||||||
|
defect_code = c.defect_code,
|
||||||
|
defect_name = c.defect_name,
|
||||||
|
defect_type_id = d.defect_type_name,
|
||||||
|
defect_type_id_id = d.id
|
||||||
|
}).ToListAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,6 +247,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
if (instockCOdes?.Count > 0)
|
if (instockCOdes?.Count > 0)
|
||||||
{
|
{
|
||||||
await _db.Updateable<WmsInstockD>().SetColumns(it => new WmsInstockD { line_status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => instockCOdes.Select(x => x.bill_d_id).Contains(it.id)).ExecuteCommandAsync();
|
await _db.Updateable<WmsInstockD>().SetColumns(it => new WmsInstockD { line_status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => instockCOdes.Select(x => x.bill_d_id).Contains(it.id)).ExecuteCommandAsync();
|
||||||
|
await _db.Updateable<WmsInstockH>().SetColumns(it => new WmsInstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == input.data[nameof(WmsHandleH.require_id)].ToString()).ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,9 +90,10 @@ public class PrintDevService : IDynamicApiController, ITransient
|
|||||||
[HttpGet("")]
|
[HttpGet("")]
|
||||||
public async Task<dynamic> GetList_Api([FromQuery] PrintDevListInput input)
|
public async Task<dynamic> GetList_Api([FromQuery] PrintDevListInput input)
|
||||||
{
|
{
|
||||||
var list = await _repository.AsSugarClient().Queryable<PrintDevEntity, UserEntity, UserEntity, DictionaryDataEntity>((a, b, c, d) =>
|
var list = await _repository.AsSugarClient().Queryable<PrintDevEntity, UserEntity, UserEntity, DictionaryTypeEntity,DictionaryDataEntity>((a, b, c, d,e) =>
|
||||||
new JoinQueryInfos(JoinType.Left, b.Id == a.CreatorUserId, JoinType.Left, c.Id == a.LastModifyUserId, JoinType.Left, a.Category == d.EnCode))
|
new JoinQueryInfos(JoinType.Left, b.Id == a.CreatorUserId, JoinType.Left, c.Id == a.LastModifyUserId,JoinType.Left,d.EnCode=="printDev", JoinType.Left, a.Category == e.EnCode && d.Id==e.DictionaryTypeId))
|
||||||
.Where((a, b, c, d) => a.DeleteMark == null && d.DictionaryTypeId == "202931027482510597").WhereIF(input.category.IsNotEmptyOrNull(), a => a.Category == input.category)
|
.Where((a, b, c, d,e) => a.DeleteMark == null )
|
||||||
|
.WhereIF(input.category.IsNotEmptyOrNull(), a => a.Category == input.category)
|
||||||
.WhereIF(input.keyword.IsNotEmptyOrNull(), a => a.FullName.Contains(input.keyword) || a.EnCode.Contains(input.keyword))
|
.WhereIF(input.keyword.IsNotEmptyOrNull(), a => a.FullName.Contains(input.keyword) || a.EnCode.Contains(input.keyword))
|
||||||
.OrderBy(a => a.SortCode).OrderBy(a => a.CreatorTime, OrderByType.Desc)
|
.OrderBy(a => a.SortCode).OrderBy(a => a.CreatorTime, OrderByType.Desc)
|
||||||
.Select((a, b, c, d) => new PrintDevListOutput
|
.Select((a, b, c, d) => new PrintDevListOutput
|
||||||
@@ -119,10 +120,10 @@ public class PrintDevService : IDynamicApiController, ITransient
|
|||||||
[HttpGet("Selector")]
|
[HttpGet("Selector")]
|
||||||
public async Task<dynamic> GetList_Api([FromQuery] string type)
|
public async Task<dynamic> GetList_Api([FromQuery] string type)
|
||||||
{
|
{
|
||||||
var list = await _repository.AsSugarClient().Queryable<PrintDevEntity, UserEntity, UserEntity, DictionaryDataEntity>((a, b, c, d) => new JoinQueryInfos(JoinType.Left, b.Id == a.CreatorUserId, JoinType.Left, c.Id == a.LastModifyUserId, JoinType.Left, a.Category == d.EnCode))
|
var list = await _repository.AsSugarClient().Queryable<PrintDevEntity, UserEntity, UserEntity, DictionaryTypeEntity,DictionaryDataEntity>((a, b, c, d,e) => new JoinQueryInfos(JoinType.Left, b.Id == a.CreatorUserId, JoinType.Left, c.Id == a.LastModifyUserId, JoinType.Left, d.EnCode=="printDev", JoinType.Left, a.Category == e.EnCode && d.Id==e.DictionaryTypeId))
|
||||||
.Where((a, b, c, d) => a.DeleteMark == null && d.DictionaryTypeId == "202931027482510597" && a.EnabledMark == 1).OrderBy(a => a.SortCode).OrderBy(a => a.CreatorTime, OrderByType.Desc)
|
.Where((a, b, c, d) => a.DeleteMark == null && a.EnabledMark == 1).OrderBy(a => a.SortCode).OrderBy(a => a.CreatorTime, OrderByType.Desc)
|
||||||
.WhereIF(type.IsNotEmptyOrNull(), (a) => a.Type == type.ParseToInt())
|
.WhereIF(type.IsNotEmptyOrNull(), (a) => a.Type == type.ParseToInt())
|
||||||
.Select((a, b, c, d) => new PrintDevListOutput
|
.Select((a, b, c, d,e) => new PrintDevListOutput
|
||||||
{
|
{
|
||||||
category = a.Category,
|
category = a.Category,
|
||||||
id = a.Id,
|
id = a.Id,
|
||||||
@@ -135,7 +136,7 @@ public class PrintDevService : IDynamicApiController, ITransient
|
|||||||
lastModifyUser = SqlFunc.MergeString(c.RealName, "/", c.Account),
|
lastModifyUser = SqlFunc.MergeString(c.RealName, "/", c.Account),
|
||||||
sortCode = a.SortCode,
|
sortCode = a.SortCode,
|
||||||
type = a.Type,
|
type = a.Type,
|
||||||
parentId = d.Id,
|
parentId = e.Id,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
// 数据库分类
|
// 数据库分类
|
||||||
|
|||||||
Reference in New Issue
Block a user