Commit 4c495fa0 by huluobin

# 更新

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