Commit 4c495fa0 by huluobin

# 更新

parent 5cdb9a3b
...@@ -15,27 +15,68 @@ import java.util.List; ...@@ -15,27 +15,68 @@ import java.util.List;
@Repository @Repository
public interface CostTypeDao extends BaseMapper<CostTypeDomain> { public interface CostTypeDao extends BaseMapper<CostTypeDomain> {
//分页获取费用类型 /**
* 分页获取费用类型
*
* @param page page
* @param req req
* @return res
*/
IPage<CostTypeResult> queryPage(@Param("page") IPage<CostTypeResult> page, IPage<CostTypeResult> queryPage(@Param("page") IPage<CostTypeResult> page,
@Param("req") CostTypeBaseReq req); @Param("req") CostTypeBaseReq req);
//获取全部费用类型 /**
* 获取全部费用类型
*
* @param req req
* @return res
*/
List<CostTypeResult> queryAll(@Param("req") CostTypeBaseReq req); List<CostTypeResult> queryAll(@Param("req") CostTypeBaseReq req);
//根据编号查 /**
* 根据编号查
*
* @param typeNo typeNo
* @return res
*/
CostTypeDomain selectByNo(String typeNo); CostTypeDomain selectByNo(String typeNo);
//获取费用类型详情 /**
* 获取费用类型详情
*
* @param id id
* @return res
*/
CostTypeResult queryDetail(Integer id); CostTypeResult queryDetail(Integer id);
//获取费用类型详情 /**
* 获取费用类型详情
*
* @param typeNo typeNo
* @return res
*/
CostTypeResult queryByNo(String typeNo); CostTypeResult queryByNo(String typeNo);
//根据费用类型名称和类型查询 /**
* 根据费用类型名称和类型查询
*
* @param name name
* @param type type
* @return res
*/
CostTypeDomain selectByNameAndType(@Param("name") String name, @Param("type") Integer type); CostTypeDomain selectByNameAndType(@Param("name") String name, @Param("type") Integer type);
// /**
* @return res
*/
List<CostTypeDomain> selectTestType(); List<CostTypeDomain> selectTestType();
/**
* 根据类型名称和会计科目名称查询
*
* @param typeName
* @param accountSubjectName
* @return
*/
CostTypeDomain selectByTypeNameAndAccountSubjectName(@Param("typeName") String typeName, @Param("accountSubjectName") String accountSubjectName); CostTypeDomain selectByTypeNameAndAccountSubjectName(@Param("typeName") String typeName, @Param("accountSubjectName") String accountSubjectName);
} }
...@@ -33,6 +33,9 @@ import java.time.LocalDateTime; ...@@ -33,6 +33,9 @@ import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/**
* @author robbendev
*/
@Service @Service
@Slf4j @Slf4j
public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain> implements CostTypeService { public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain> implements CostTypeService {
...@@ -64,7 +67,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain ...@@ -64,7 +67,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
costTypeDomain.setIsManageCost(req.getIsManageCost()); costTypeDomain.setIsManageCost(req.getIsManageCost());
costTypeDomain.setCostTemplateType(this.getCostTemplateType(req.getType())); costTypeDomain.setCostTemplateType(this.getCostTemplateType(req.getType()));
costTypeDomain.setNsAccountingSubjectId(req.getNsAccountingSubjectId());
this.save(costTypeDomain); this.save(costTypeDomain);
...@@ -79,7 +81,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain ...@@ -79,7 +81,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
lendCostTypeDomain.setTypeName(req.getTypeName()); lendCostTypeDomain.setTypeName(req.getTypeName());
lendCostTypeDomain.setDescription(req.getDescription()); lendCostTypeDomain.setDescription(req.getDescription());
lendCostTypeDomain.setAccountingSubjectId(lendAccountingSubject.getId()); lendCostTypeDomain.setAccountingSubjectId(lendAccountingSubject.getId());
lendCostTypeDomain.setNsAccountingSubjectId(req.getNsAccountingSubjectId());
this.save(lendCostTypeDomain); this.save(lendCostTypeDomain);
} }
...@@ -104,7 +105,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain ...@@ -104,7 +105,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
lendCostTypeDomain.setUpdateUser(oaUser.getUserName()); lendCostTypeDomain.setUpdateUser(oaUser.getUserName());
lendCostTypeDomain.setLastUpdateTime(LocalDateTime.now()); lendCostTypeDomain.setLastUpdateTime(LocalDateTime.now());
lendCostTypeDomain.setIsManageCost(req.getIsManageCost()); lendCostTypeDomain.setIsManageCost(req.getIsManageCost());
lendCostTypeDomain.setNsAccountingSubjectId(req.getNsAccountingSubjectId());
this.updateById(lendCostTypeDomain); this.updateById(lendCostTypeDomain);
} }
...@@ -115,7 +115,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain ...@@ -115,7 +115,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
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.setNsAccountingSubjectId(req.getNsAccountingSubjectId());
if (req.getAccountingSubjectId() != null) { if (req.getAccountingSubjectId() != null) {
AccountingSubject accountingSubject = accountingSubjectMapper.selectById(req.getAccountingSubjectId()); AccountingSubject accountingSubject = accountingSubjectMapper.selectById(req.getAccountingSubjectId());
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
t1.last_update_time, t1.last_update_time,
t1.create_user_id, t1.create_user_id,
t1.create_user, t1.create_user,
t1.is_manage_cost t1.is_manage_cost,
t2.ns_accounting_subject_id
from cost_type t1 from cost_type t1
left join accounting_subject t2 on t1.accounting_subject_id = t2.id left join accounting_subject t2 on t1.accounting_subject_id = t2.id
where t1.cost_template_type =#{req.costTemplateType} where t1.cost_template_type =#{req.costTemplateType}
......
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