Prechádzať zdrojové kódy

07 30 8 fix add accounting parent and son accountType same

hr 4 rokov pred
rodič
commit
58b015e4a2

+ 3 - 0
src/main/java/com/imed/costaccount/service/impl/AccountingServiceImpl.java

@@ -104,6 +104,9 @@ public class AccountingServiceImpl extends ServiceImpl<AccountingMapper, Account
             if (Objects.isNull(byId)) {
                 throw new CostException(500, "上层级别会计科目已被移除");
             }
+            if (!byId.getAccountingType().equals(accountingSaveDTO.getAccountingType())) {
+                throw new CostException(500, "会计科目类型要与上层一致");
+            }
             String oldParentIds = byId.getAllParentIds();
             if ("0".equals(oldParentIds)) {
                 allParentIds = parentId + "";