Commit 08525780 by jianshuqin

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

parent cd9e3f7f
...@@ -78,5 +78,7 @@ public class CostTypeDomain { ...@@ -78,5 +78,7 @@ public class CostTypeDomain {
@TableField(value = "ns_accounting_subject_id") @TableField(value = "ns_accounting_subject_id")
private Integer nsAccountingSubjectId; private Integer nsAccountingSubjectId;
@ApiModelProperty("类别")
private String categoryName;
} }
...@@ -33,4 +33,6 @@ public class CostTypeAddReq { ...@@ -33,4 +33,6 @@ public class CostTypeAddReq {
@ApiModelProperty(value = "ns会计科目Id") @ApiModelProperty(value = "ns会计科目Id")
private Integer nsAccountingSubjectId; private Integer nsAccountingSubjectId;
@ApiModelProperty("类别")
private String categoryName;
} }
...@@ -34,4 +34,7 @@ public class CostTypeModifyReq { ...@@ -34,4 +34,7 @@ public class CostTypeModifyReq {
@ApiModelProperty(value = "ns会计科目Id") @ApiModelProperty(value = "ns会计科目Id")
private Integer nsAccountingSubjectId; private Integer nsAccountingSubjectId;
@ApiModelProperty("类别")
private String categoryName;
} }
...@@ -62,5 +62,6 @@ public class CostTypeResult { ...@@ -62,5 +62,6 @@ public class CostTypeResult {
private Integer nsAccountingSubjectId; private Integer nsAccountingSubjectId;
@ApiModelProperty("类别")
private String categoryName;
} }
...@@ -67,6 +67,7 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain ...@@ -67,6 +67,7 @@ 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.setCategoryName(req.getCategoryName());
this.save(costTypeDomain); this.save(costTypeDomain);
...@@ -81,7 +82,7 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain ...@@ -81,7 +82,7 @@ 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.setCategoryName(req.getCategoryName());
this.save(lendCostTypeDomain); this.save(lendCostTypeDomain);
} }
} }
...@@ -105,7 +106,7 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain ...@@ -105,7 +106,7 @@ 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.setCategoryName(req.getCategoryName());
this.updateById(lendCostTypeDomain); this.updateById(lendCostTypeDomain);
} }
...@@ -116,6 +117,7 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain ...@@ -116,6 +117,7 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
costTypeDomain.setUpdateUserId(oaUser.getOaUserId()); costTypeDomain.setUpdateUserId(oaUser.getOaUserId());
costTypeDomain.setUpdateUser(oaUser.getUserName()); costTypeDomain.setUpdateUser(oaUser.getUserName());
costTypeDomain.setNsAccountingSubjectId(req.getNsAccountingSubjectId()); costTypeDomain.setNsAccountingSubjectId(req.getNsAccountingSubjectId());
costTypeDomain.setCategoryName(req.getCategoryName());
if (req.getAccountingSubjectId() != null) { if (req.getAccountingSubjectId() != null) {
AccountingSubject accountingSubject = accountingSubjectMapper.selectById(req.getAccountingSubjectId()); AccountingSubject accountingSubject = accountingSubjectMapper.selectById(req.getAccountingSubjectId());
......
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
t1.create_user_id, t1.create_user_id,
t1.create_user, t1.create_user,
t1.is_manage_cost, t1.is_manage_cost,
t1.ns_accounting_subject_id t1.ns_accounting_subject_id,
t1.category_name
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}
...@@ -57,7 +58,8 @@ ...@@ -57,7 +58,8 @@
t1.create_user_id, t1.create_user_id,
t1.create_user, t1.create_user,
t1.is_manage_cost, t1.is_manage_cost,
t1.ns_accounting_subject_id t1.ns_accounting_subject_id,
t1.category_name
from cost_type t1 from cost_type t1
left join accounting_subject t2 on t1.accounting_subject_no = t2.subject_no left join accounting_subject t2 on t1.accounting_subject_no = t2.subject_no
where t1.id = #{id} where t1.id = #{id}
...@@ -75,7 +77,8 @@ ...@@ -75,7 +77,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,
t1.category_name
from cost_type t1 from cost_type t1
left join accounting_subject t2 on t1.accounting_subject_no = t2.subject_no left join accounting_subject t2 on t1.accounting_subject_no = t2.subject_no
where t1.type_no = #{typeNo} where t1.type_no = #{typeNo}
...@@ -94,7 +97,8 @@ ...@@ -94,7 +97,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,
t1.category_name
from cost_type t1 from cost_type t1
left join accounting_subject t2 on t1.accounting_subject_no = t2.subject_no left join accounting_subject t2 on t1.accounting_subject_no = t2.subject_no
where t1.type_name = #{typeName} where t1.type_name = #{typeName}
......
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