diff --git a/resource/sql/档案支持一对多.sql b/resource/sql/档案支持一对多.sql index 02026be5a..7c45075d7 100644 --- a/resource/sql/档案支持一对多.sql +++ b/resource/sql/档案支持一对多.sql @@ -1,5 +1,5 @@ ALTER TABLE hrsa_salary_archive -ADD COLUMN tax_agent_id bigint(0) NULL COMMENT '个税扣缴义务人id' +ADD COLUMN tax_agent_id bigint(0) NULL COMMENT '个税扣缴义务人id', ADD COLUMN pay_start_date datetime(0) NULL DEFAULT NULL COMMENT '起始发薪日期' , ADD COLUMN pay_end_date datetime(0) NULL DEFAULT NULL COMMENT '最后发薪日期' ; diff --git a/src/com/engine/salary/service/impl/SalaryFormulaServiceImpl.java b/src/com/engine/salary/service/impl/SalaryFormulaServiceImpl.java index 3b48d370e..6b72b7a0a 100644 --- a/src/com/engine/salary/service/impl/SalaryFormulaServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryFormulaServiceImpl.java @@ -153,9 +153,7 @@ public class SalaryFormulaServiceImpl extends Service implements SalaryFormulaSe } //试运行公式 - if (ReferenceTypeEnum.parseByValue(param.getReferenceType()) == ReferenceTypeEnum.FORMULA) { - checkRun(param); - } + checkRun(param); FormulaPO formulaPO = new FormulaPO(); String formula = param.getFormula(); @@ -242,6 +240,12 @@ public class SalaryFormulaServiceImpl extends Service implements SalaryFormulaSe } } } + + if (ReferenceTypeEnum.parseByValue(param.getReferenceType()) == ReferenceTypeEnum.SQL) { + if (formulaRunScript.contains(";") || formulaRunScript.contains("--")) { + throw new SalaryRunTimeException("SQL配置异常,请去除';'或者'--'"); + } + } }