Commit 76f3549c by jianshuqin

--story=1010432 --user=简曙勤 【费用系统】调整费用大类没有设置默认为费用小类 https://www.tapd.cn/55346466/s/1013093

parent 11861989
...@@ -193,7 +193,7 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -193,7 +193,7 @@ public class CostApiServiceImpl implements CostApiService {
} }
costDomain.setTypeNo(costTypeDomain.getTypeNo()); costDomain.setTypeNo(costTypeDomain.getTypeNo());
costDomain.setTypeName(costTypeDomain.getTypeName()); costDomain.setTypeName(costTypeDomain.getTypeName());
costDomain.setCategoryName(StringUtils.isNotBlank(costTypeDomain.getCategoryName()) ? costTypeDomain.getCategoryName() : (StringUtils.isNotBlank(costDomain.getProject()) && costDomain.getProject().equals("集团") ? "管理成本" : "日常费用")); costDomain.setCategoryName(StringUtils.isNotBlank(costTypeDomain.getCategoryName()) ? costTypeDomain.getCategoryName() : costDomain.getTypeName());
costDomain.setAccountingSubjectId(costTypeDomain.getAccountingSubjectId()); costDomain.setAccountingSubjectId(costTypeDomain.getAccountingSubjectId());
costDomain.setAccountingSubjectNo(costTypeDomain.getAccountingSubjectNo()); costDomain.setAccountingSubjectNo(costTypeDomain.getAccountingSubjectNo());
costDomain.setNsAccountingSubjectId(costTypeDomain.getNsAccountingSubjectId()); costDomain.setNsAccountingSubjectId(costTypeDomain.getNsAccountingSubjectId());
...@@ -245,7 +245,7 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -245,7 +245,7 @@ public class CostApiServiceImpl implements CostApiService {
} }
costDomain.setTypeNo(costTypeDomain.getTypeNo()); costDomain.setTypeNo(costTypeDomain.getTypeNo());
costDomain.setTypeName(costTypeDomain.getTypeName()); costDomain.setTypeName(costTypeDomain.getTypeName());
costDomain.setCategoryName(StringUtils.isNotBlank(costTypeDomain.getCategoryName()) ? costTypeDomain.getCategoryName() : (StringUtils.isNotBlank(costDomain.getProject()) && costDomain.getProject().equals("集团") ? "管理成本" : "日常费用")); costDomain.setCategoryName(StringUtils.isNotBlank(costTypeDomain.getCategoryName()) ? costTypeDomain.getCategoryName() : costDomain.getTypeName());
costDomain.setAccountingSubjectId(costTypeDomain.getAccountingSubjectId()); costDomain.setAccountingSubjectId(costTypeDomain.getAccountingSubjectId());
costDomain.setAccountingSubjectNo(costTypeDomain.getAccountingSubjectNo()); costDomain.setAccountingSubjectNo(costTypeDomain.getAccountingSubjectNo());
costDomain.setNsAccountingSubjectId(costTypeDomain.getNsAccountingSubjectId()); costDomain.setNsAccountingSubjectId(costTypeDomain.getNsAccountingSubjectId());
......
...@@ -99,7 +99,7 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail ...@@ -99,7 +99,7 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail
costDetailDomain.setTypeId(costTypeDomain.getId()); costDetailDomain.setTypeId(costTypeDomain.getId());
costDetailDomain.setTypeNo(costTypeDomain.getTypeNo()); costDetailDomain.setTypeNo(costTypeDomain.getTypeNo());
costDetailDomain.setTypeName(costTypeDomain.getTypeName()); costDetailDomain.setTypeName(costTypeDomain.getTypeName());
costDetailDomain.setCategoryName(StringUtils.isNotBlank(costTypeDomain.getCategoryName()) ? costTypeDomain.getCategoryName() : (StringUtils.isNotBlank(costDetailDomain.getProject()) && costDetailDomain.getProject().equals("集团") ? "管理成本" : "日常费用")); costDetailDomain.setCategoryName(StringUtils.isNotBlank(costTypeDomain.getCategoryName()) ? costTypeDomain.getCategoryName() : costDetailDomain.getTypeName());
costDetailDomain.setAccountingSubjectNo(accountingSubject.getSubjectNo()); costDetailDomain.setAccountingSubjectNo(accountingSubject.getSubjectNo());
costDetailDomain.setAccountingSubjectName(accountingSubject.getName()); costDetailDomain.setAccountingSubjectName(accountingSubject.getName());
} }
......
...@@ -186,7 +186,7 @@ public abstract class AbstractCostService implements CostService { ...@@ -186,7 +186,7 @@ public abstract class AbstractCostService implements CostService {
if (accountingSubject != null) { if (accountingSubject != null) {
costDomain.setTypeNo(costDomain.getTypeNo()); costDomain.setTypeNo(costDomain.getTypeNo());
costDomain.setTypeName(costTypeDomain.getTypeName()); costDomain.setTypeName(costTypeDomain.getTypeName());
costDomain.setCategoryName(StringUtils.isNotBlank(costTypeDomain.getCategoryName()) ? costTypeDomain.getCategoryName() : (StringUtils.isNotBlank(costDomain.getProject()) && costDomain.getProject().equals("集团") ? "管理成本" : "日常费用")); costDomain.setCategoryName(StringUtils.isNotBlank(costTypeDomain.getCategoryName()) ? costTypeDomain.getCategoryName() : costDomain.getTypeName());
costDomain.setAccountingSubjectNo(accountingSubject.getSubjectNo()); costDomain.setAccountingSubjectNo(accountingSubject.getSubjectNo());
costDomain.setAccountingSubjectName(accountingSubject.getName()); costDomain.setAccountingSubjectName(accountingSubject.getName());
} }
...@@ -251,7 +251,7 @@ public abstract class AbstractCostService implements CostService { ...@@ -251,7 +251,7 @@ public abstract class AbstractCostService implements CostService {
costDomain.setLastModifyDate(LocalDateTime.now()); costDomain.setLastModifyDate(LocalDateTime.now());
if (StringUtils.isBlank(costTypeDomain.getCategoryName())) { if (StringUtils.isBlank(costTypeDomain.getCategoryName())) {
costDomain.setCategoryName((StringUtils.isNotBlank(costDetailDomains.get(0).getProject()) && costDetailDomains.get(0).getProject().equals("集团") ? "管理成本" : "日常费用")); costDomain.setCategoryName(costDomain.getTypeName());
} }
costDao.updateById(costDomain); costDao.updateById(costDomain);
......
...@@ -86,7 +86,7 @@ public class CostPlanNewLend1ServiceImpl extends AbstractCostPlanService impleme ...@@ -86,7 +86,7 @@ public class CostPlanNewLend1ServiceImpl extends AbstractCostPlanService impleme
costDomain.setToRmbRate(toRmbRate); costDomain.setToRmbRate(toRmbRate);
costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP)); costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP));
if(StringUtils.isBlank(costDomain.getCategoryName())){ if(StringUtils.isBlank(costDomain.getCategoryName())){
costDomain.setCategoryName((StringUtils.isNotBlank(costDomain.getProject()) && costDomain.getProject().equals("集团") ? "管理成本" : "日常费用")); costDomain.setCategoryName(costDomain.getTypeName());
} }
int insert = costDao.insert(costDomain); int insert = costDao.insert(costDomain);
...@@ -109,7 +109,7 @@ public class CostPlanNewLend1ServiceImpl extends AbstractCostPlanService impleme ...@@ -109,7 +109,7 @@ public class CostPlanNewLend1ServiceImpl extends AbstractCostPlanService impleme
if(StringUtils.isNotBlank(costDomain.getCategoryName())){ if(StringUtils.isNotBlank(costDomain.getCategoryName())){
costDetail.setCategoryName(costDomain.getCategoryName()); costDetail.setCategoryName(costDomain.getCategoryName());
} else { } else {
costDetail.setCategoryName((StringUtils.isNotBlank(costDetail.getProject()) && costDetail.getProject().equals("集团") ? "管理成本" : "日常费用")); costDetail.setCategoryName(costDetail.getTypeName());
} }
// 生成付款费用详情 // 生成付款费用详情
costDetailDao.insert(costDetail); costDetailDao.insert(costDetail);
......
...@@ -104,7 +104,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme ...@@ -104,7 +104,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
costDomain.setToRmbRate(toRmbRate); costDomain.setToRmbRate(toRmbRate);
costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP)); costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP));
if(StringUtils.isBlank(costDomain.getCategoryName())){ if(StringUtils.isBlank(costDomain.getCategoryName())){
costDomain.setCategoryName((StringUtils.isNotBlank(costDomain.getProject()) && costDomain.getProject().equals("集团") ? "管理成本" : "日常费用")); costDomain.setCategoryName(costDomain.getTypeName());
} }
costDao.insert(costDomain); costDao.insert(costDomain);
...@@ -132,7 +132,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme ...@@ -132,7 +132,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
costDomain.setToRmbRate(toRmbRate); costDomain.setToRmbRate(toRmbRate);
costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP)); costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP));
if(StringUtils.isNotBlank(costDomain.getCategoryName())){ if(StringUtils.isNotBlank(costDomain.getCategoryName())){
costDomain.setCategoryName((StringUtils.isNotBlank(costDomain.getProject()) && costDomain.getProject().equals("集团") ? "管理成本" : "日常费用")); costDomain.setCategoryName(costDomain.getTypeName());
} }
costDao.insert(costDomain); costDao.insert(costDomain);
...@@ -232,7 +232,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme ...@@ -232,7 +232,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
costDomain.setToRmbRate(toRmbRate1); costDomain.setToRmbRate(toRmbRate1);
costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate1).setScale(2, BigDecimal.ROUND_HALF_UP)); costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate1).setScale(2, BigDecimal.ROUND_HALF_UP));
if(StringUtils.isBlank(costDomain.getCategoryName())){ if(StringUtils.isBlank(costDomain.getCategoryName())){
costDomain.setCategoryName((StringUtils.isNotBlank(costDomain.getProject()) && costDomain.getProject().equals("集团") ? "管理成本" : "日常费用")); costDomain.setCategoryName(costDomain.getTypeName());
} }
costDao.insert(costDomain); costDao.insert(costDomain);
......
...@@ -128,7 +128,7 @@ public class CostPlanNewPayServiceImpl extends AbstractCostPlanService implement ...@@ -128,7 +128,7 @@ public class CostPlanNewPayServiceImpl extends AbstractCostPlanService implement
if(StringUtils.isNotBlank(costTypeDomain.getCategoryName())){ if(StringUtils.isNotBlank(costTypeDomain.getCategoryName())){
costDetail.setCategoryName(costTypeDomain.getCategoryName()); costDetail.setCategoryName(costTypeDomain.getCategoryName());
} else { } else {
costDetail.setCategoryName((StringUtils.isNotBlank(costDetail.getProject()) && costDetail.getProject().equals("集团") ? "管理成本" : "日常费用")); costDetail.setCategoryName(costDetail.getTypeName());
} }
// 生成付款费用详情 // 生成付款费用详情
costDetailDao.insert(costDetail); costDetailDao.insert(costDetail);
......
...@@ -80,7 +80,7 @@ public class CostPlanNewReceiptServiceImpl extends AbstractCostPlanService imple ...@@ -80,7 +80,7 @@ public class CostPlanNewReceiptServiceImpl extends AbstractCostPlanService imple
costDomain.setToRmbRate(toRmbRate); costDomain.setToRmbRate(toRmbRate);
costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP)); costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP));
if(StringUtils.isBlank(costDomain.getCategoryName())){ if(StringUtils.isBlank(costDomain.getCategoryName())){
costDomain.setCategoryName((StringUtils.isNotBlank(costDomain.getProject()) && costDomain.getProject().equals("集团") ? "管理成本" : "日常费用")); costDomain.setCategoryName(costDomain.getTypeName());
} }
Integer insert = costDao.insert(costDomain); Integer insert = costDao.insert(costDomain);
......
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