Commit 65599e10 by huluobin

# update

parent 92477396
...@@ -2,7 +2,6 @@ package com.blt.other.module.cost.service.impl; ...@@ -2,7 +2,6 @@ package com.blt.other.module.cost.service.impl;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.bailuntec.common.BeanUtils; import com.bailuntec.common.BeanUtils;
import com.bailuntec.common.StringUtils;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -85,11 +84,25 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain ...@@ -85,11 +84,25 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
log.info("{} 更新费用类型", oaUser.getUserName()); log.info("{} 更新费用类型", oaUser.getUserName());
if (req.getTypeNo() != null) { if (req.getTypeNo() != null) {
CostTypeDomain costTypeDomain = baseMapper.selectByNo(req.getTypeNo()); CostTypeDomain costTypeDomain = baseMapper.selectByNo(req.getTypeNo());
if (costTypeDomain.getCostTemplateType().equals(CostTypeDomain.feeType)) {
CostTypeDomain lendCostTypeDomain = baseMapper.selectByNameAndType(costTypeDomain.getTypeName(), CostTypeDomain.feeType);
lendCostTypeDomain.setTypeName(req.getTypeName().trim());
lendCostTypeDomain.setDescription(req.getDescription());
lendCostTypeDomain.setUpdateUserId(oaUser.getOaUserId());
lendCostTypeDomain.setUpdateUser(oaUser.getUserName());
lendCostTypeDomain.setLastUpdateTime(LocalDateTime.now());
if (req.getAccountingSubjectId() != null) {
lendCostTypeDomain.setAccountingSubjectId(req.getAccountingSubjectId());
}
lendCostTypeDomain.setIsManageCost(req.getIsManageCost());
this.updateById(lendCostTypeDomain);
}
costTypeDomain.setTypeName(req.getTypeName().trim()); costTypeDomain.setTypeName(req.getTypeName().trim());
costTypeDomain.setDescription(req.getDescription()); costTypeDomain.setDescription(req.getDescription());
costTypeDomain.setUpdateUserId(oaUser.getOaUserId()); costTypeDomain.setUpdateUserId(oaUser.getOaUserId());
costTypeDomain.setUpdateUser(oaUser.getUserName()); costTypeDomain.setUpdateUser(oaUser.getUserName());
costTypeDomain.setLastUpdateTime(LocalDateTime.now());
if (req.getAccountingSubjectId() != null) { if (req.getAccountingSubjectId() != null) {
costTypeDomain.setAccountingSubjectId(req.getAccountingSubjectId()); costTypeDomain.setAccountingSubjectId(req.getAccountingSubjectId());
......
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