|
|
@ -73,7 +73,7 @@ function getStandardDocFolders (opts) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 标准文档目录新增失败
|
|
|
|
|
|
|
|
function postStandardDocFolders (opts) { |
|
|
|
return async function (ctx, next) { |
|
|
|
|
|
|
@ -157,6 +157,11 @@ function postBusinessRules (opts) { |
|
|
|
|
|
|
|
const { id, name, description, problemType, problemLevel, ruleBasis } = ctx.request.body; |
|
|
|
|
|
|
|
let findOne = await models.BusinessRule.findOne({ where: { name: name } }) |
|
|
|
if ((!id && findOne) || (id && findOne && findOne.id != id)) { |
|
|
|
message = '业务规则名称重复' |
|
|
|
throw '' |
|
|
|
} |
|
|
|
if (id) { |
|
|
|
await models.BusinessRule.update({ |
|
|
|
name, description, problemType, problemLevel, ruleBasis |
|
|
|