Commit d86b8c49 authored by 施翔轲's avatar 施翔轲

新增直接费费用项:新增编码长度校验

parent 8f0014af
...@@ -278,7 +278,9 @@ public class CbDirectExpenseServiceImpl extends ServiceImpl<CbDirectExpenseMappe ...@@ -278,7 +278,9 @@ public class CbDirectExpenseServiceImpl extends ServiceImpl<CbDirectExpenseMappe
directExpense.setIsImport(false); directExpense.setIsImport(false);
//取编码前两位字母,ZY代表专,LW代表劳,FG代表材 //取编码前两位字母,ZY代表专,LW代表劳,FG代表材
String code = directExpense.getCode().substring(0, 2); String originCode = directExpense.getCode();
Assert.isFalse(originCode.length() < 2, "编码长度不足");
String code = originCode.substring(0, 2);
switch (code) { switch (code) {
case CbProjectConstants.DIRECT_EXPENSE_CODE_ZHUAN: case CbProjectConstants.DIRECT_EXPENSE_CODE_ZHUAN:
directExpense.setExpenseCategoryTag(CbProjectConstants.DIRECT_EXPENSE_CATEGORY_TAG_ZHUAN); directExpense.setExpenseCategoryTag(CbProjectConstants.DIRECT_EXPENSE_CATEGORY_TAG_ZHUAN);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment