修改服务项目和状态

optimize
jianghaiqing 1 year ago
parent 9e72bf91f1
commit 66b929ee33

@ -2,13 +2,19 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application.Entity
{
/// <summary>
/// 服务流程与服务项目关系表
/// </summary>
[Tenant(CommonConst.MasterDb)]
[SugarTable("service_workflow_project_relation")]
[Description("服务流程与服务项目关系表")]
public class ServiceWorkFlowProjectRelation
{
/// <summary>

@ -1,12 +1,50 @@
using System;
using Furion.DistributedIDGenerator;
using Myshipping.Application.Entity.TrackingSystem;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application.Entity
{
internal class StatusSkuBaseInfo
[SugarTable("status_sku_base")]
[Description("状态主表")]
public class StatusSkuBaseInfo : TrackingSystemDbEntity
{
public StatusSkuBaseInfo()
{
PK_ID = IDGen.NextID().ToString();
CreatedTime = DateTime.Now;
}
/// <summary>
/// 状态代码
/// </summary>
public string STATUS_SKU_CODE { get; set; }
/// <summary>
/// 状态名称
/// </summary>
public string STATUS_SKU_NAME { get; set; }
/// <summary>
/// 显示颜色(背景色)
/// </summary>
public string BACKGROUND_COLOR { get; set; }
/// <summary>
/// 显示顺序号
/// </summary>
public int SORT_NO { get; set; }
/// <summary>
/// 是否启用
/// </summary>
public int IS_ENABLE { get; set; }
}
}

@ -44,7 +44,8 @@ namespace Myshipping.Application
/// </summary>
/// <param name="info">服务项目详情</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> Save(ServiceProjectBaseDto info)
[HttpPost("/ServiceProject/Save")]
public async Task<TaskManageOrderResultDto> Save([FromBody] ServiceProjectBaseDto info)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
@ -151,7 +152,8 @@ namespace Myshipping.Application
/// </summary>
/// <param name="info">服务项目详情</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> SaveAndEnable(ServiceProjectBaseDto info)
[HttpPost("/ServiceProject/SaveAndEnable")]
public async Task<TaskManageOrderResultDto> SaveAndEnable([FromBody]ServiceProjectBaseDto info)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
@ -178,13 +180,14 @@ namespace Myshipping.Application
/// </summary>
/// <param name="pkId">服务项目主键</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> SetEnable(string pkId)
[HttpGet("/ServiceProject/SetEnable")]
public async Task<TaskManageOrderResultDto> SetEnable([FromQuery] string pkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
try
{
if(string.IsNullOrWhiteSpace(pkId))
if (string.IsNullOrWhiteSpace(pkId))
{
throw Oops.Oh($"服务项目主键不能为空", typeof(InvalidOperationException));
}
@ -210,12 +213,12 @@ namespace Myshipping.Application
it.UpdatedTime,
it.UpdatedUserId,
it.UpdatedUserName
}).ExecuteCommandAsync();
result.succ = true;
result.msg = "执行成功";
}
catch (Exception ex)
{
@ -231,7 +234,8 @@ namespace Myshipping.Application
/// </summary>
/// <param name="pkId">服务项目主键</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> SetUnEnable(string pkId)
[HttpGet("/ServiceProject/SetUnEnable")]
public async Task<TaskManageOrderResultDto> SetUnEnable([FromQuery] string pkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
@ -283,7 +287,8 @@ namespace Myshipping.Application
/// </summary>
/// <param name="pkId">服务项目主键</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> Delete(string pkId)
[HttpGet("/ServiceProject/Delete")]
public async Task<TaskManageOrderResultDto> Delete([FromQuery] string pkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
@ -336,7 +341,8 @@ namespace Myshipping.Application
/// </summary>
/// <param name="pkId">服务项目主键</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> GetInfo(string pkId)
[HttpGet("/ServiceProject/GetInfo")]
public async Task<TaskManageOrderResultDto> GetInfo([FromQuery] string pkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
@ -374,7 +380,8 @@ namespace Myshipping.Application
/// <param name="queryItem">检索值</param>
/// <param name="topNum">最大返回行数默认15</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> QueryList(string queryItem, int topNum = 15)
[HttpGet("/ServiceProject/QueryList")]
public async Task<TaskManageOrderResultDto> QueryList([FromQuery] string queryItem, [FromQuery] int topNum = 15)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
@ -404,6 +411,7 @@ namespace Myshipping.Application
/// </summary>
/// <param name="QuerySearch">服务项目台账查询请求</param>
/// <returns>返回结果</returns>
[HttpGet("/ServiceProject/GetPage")]
public async Task<SqlSugarPagedList<ServiceProjectBasePageDto>> GetPageAsync(QueryServiceProjectBaseDto QuerySearch)
{
//制单日期

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class StatusSkuBaseService
{
}
}
Loading…
Cancel
Save