api命名规范,字典常量规范
This commit is contained in:
@@ -16,6 +16,8 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.OpenXmlFormats.Shared;
|
||||
using Senparc.Weixin.Work.AdvancedAPIs.OaDataOpen;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entitys;
|
||||
using Tnb.ProductionMgr.Entitys;
|
||||
using Tnb.ProductionMgr.Entitys.Dto.PrdManage;
|
||||
using Tnb.ProductionMgr.Entitys.Dto.WorkOrder;
|
||||
using Tnb.ProductionMgr.Entitys.Entity;
|
||||
@@ -23,12 +25,12 @@ using Tnb.ProductionMgr.Entitys.新文件夹;
|
||||
using Tnb.ProductionPlanMgr.Entitys.Dto.WorkOrder;
|
||||
using Tnb.ProductionPlanMgr.Interfaces;
|
||||
|
||||
namespace Tnb.ProductionPlanMgr
|
||||
namespace Tnb.ProductionMgr
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产计划管理
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "ProductionMgr", Area = "production", Order = 700)]
|
||||
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 700)]
|
||||
[Route("api/[area]/[controller]/[action]")]
|
||||
public class PrdMoService : IPrdMoService, IDynamicApiController, ITransient
|
||||
{
|
||||
@@ -135,7 +137,7 @@ namespace Tnb.ProductionPlanMgr
|
||||
[HttpGet("sort/{eqpId}")]
|
||||
public async Task<dynamic> PrdTaskSort(string eqpId)
|
||||
{
|
||||
var taskStatusDic = await _dictionaryDataService.GetDicByTypeId(DictionaryConstants.PrdTaskStatusTypeId);
|
||||
var taskStatusDic = await _dictionaryDataService.GetDicByTypeId(DictConst.PrdTaskStatusTypeId);
|
||||
var list = await _repository.AsSugarClient().Queryable<PrdTask>()
|
||||
.Where(it => it.eqp_id == eqpId)
|
||||
.OrderBy(o => o.estimated_start_date)
|
||||
@@ -163,7 +165,7 @@ namespace Tnb.ProductionPlanMgr
|
||||
{
|
||||
var list = await _repository.AsSugarClient().Queryable<PrdTaskLog>().Where(it => it.id == taskId).ToListAsync();
|
||||
var data = list.Adapt<List<PrdTaskOperOutput>>();
|
||||
var dic = await _dictionaryDataService.GetDicByTypeId(DictionaryConstants.PrdTaskStatusTypeId);
|
||||
var dic = await _dictionaryDataService.GetDicByTypeId(DictConst.PrdTaskStatusTypeId);
|
||||
_repository.AsSugarClient().ThenMapper(data, x => x.statusName = dic.ContainsKey(x.status) ? dic[x.status].ToString() : "");
|
||||
return data;
|
||||
}
|
||||
@@ -195,7 +197,7 @@ namespace Tnb.ProductionPlanMgr
|
||||
}
|
||||
|
||||
var row = await db.Updateable<PrdMo>()
|
||||
.SetColumns(it => new PrdMo { mo_status = DictionaryConstants.IssueId })
|
||||
.SetColumns(it => new PrdMo { mo_status = DictConst.IssueId })
|
||||
.Where(it => input.WorkOrderIds.Contains(it.id))
|
||||
.ExecuteCommandAsync();
|
||||
return (row > 0);
|
||||
@@ -362,7 +364,7 @@ namespace Tnb.ProductionPlanMgr
|
||||
}
|
||||
var db = _repository.AsSugarClient();
|
||||
var row = await db.Updateable<PrdTask>()
|
||||
.SetColumns(it => new PrdTask { status = DictionaryConstants.ToBeStartedEnCode })
|
||||
.SetColumns(it => new PrdTask { status = DictConst.ToBeStartedEnCode })
|
||||
.Where(it => input.TaskIds.Contains(it.id))
|
||||
.ExecuteCommandAsync();
|
||||
return (row > 0);
|
||||
|
||||
Reference in New Issue
Block a user