|
|
|
@ -62,7 +62,7 @@ namespace Myshipping.Application
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
result.succ = false;
|
|
|
|
|
result.msg = $"保存触发器异常,原因:{ex.Message}";
|
|
|
|
|
result.msg = $"保存触发器失败,原因:{ex.Message}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
@ -83,13 +83,13 @@ namespace Myshipping.Application
|
|
|
|
|
var id = await InnerSave(info, true);
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
|
result.msg = "保存成功";
|
|
|
|
|
result.msg = "保存并启用成功";
|
|
|
|
|
result.ext = id;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
result.succ = false;
|
|
|
|
|
result.msg = $"保存触发器异常,原因:{ex.Message}";
|
|
|
|
|
result.msg = $"保存并启用触发器失败,原因:{ex.Message}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
@ -109,6 +109,11 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
if (isSetEnable)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrWhiteSpace(entity.STATUS_TRIGGER_CODE) || string.IsNullOrWhiteSpace(entity.STATUS_TRIGGER_NAME))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Oh($"触发器代码或名称不能为空", typeof(InvalidOperationException));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
entity.IS_ENABLE = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -119,7 +124,9 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(info.StatusTriggerCode))
|
|
|
|
|
{
|
|
|
|
|
if (_statusTriggerBaseInfoRepository.AsQueryable().Any(a => a.STATUS_TRIGGER_CODE.Equals(info.StatusTriggerCode) && a.PK_ID != info.PKId))
|
|
|
|
|
string pkId = !string.IsNullOrWhiteSpace(info.PKId) ? info.PKId : string.Empty;
|
|
|
|
|
|
|
|
|
|
if (_statusTriggerBaseInfoRepository.AsQueryable().Any(a => a.STATUS_TRIGGER_CODE.Equals(info.StatusTriggerCode) && a.PK_ID != pkId))
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"服务流程触发器代码已存在不能重复保存");
|
|
|
|
|
|
|
|
|
@ -356,6 +363,9 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
if (opTypeEnum == OperateTypeEnum.SetEnable)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.STATUS_TRIGGER_CODE) || string.IsNullOrWhiteSpace(model.STATUS_TRIGGER_NAME))
|
|
|
|
|
throw Oops.Oh($"触发器代码或名称不能为空", typeof(InvalidOperationException));
|
|
|
|
|
|
|
|
|
|
model.IS_ENABLE = 1;
|
|
|
|
|
|
|
|
|
|
await _statusTriggerBaseInfoRepository.AsUpdateable(model).UpdateColumns(it => new
|
|
|
|
|