Commit 266fb527 by jianshuqin

增加功能:费用单增加费用大类

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