Commit 8c7de394 by huluobin

# fee

parent edef6ab3
...@@ -4,6 +4,7 @@ package com.blt.other.module.cost.controller; ...@@ -4,6 +4,7 @@ package com.blt.other.module.cost.controller;
import com.bailuntec.common.JsonUtilByFsJson; import com.bailuntec.common.JsonUtilByFsJson;
import com.bailuntec.cost.api.response.CostResult; import com.bailuntec.cost.api.response.CostResult;
import com.blt.other.module.cost.dto.request.AccountingSubjectAddReq; import com.blt.other.module.cost.dto.request.AccountingSubjectAddReq;
import com.blt.other.module.cost.dto.request.AccountingSubjectModifyReq;
import com.blt.other.module.cost.model.AccountingSubject; import com.blt.other.module.cost.model.AccountingSubject;
import com.blt.other.module.cost.service.IAccountingSubjectService; import com.blt.other.module.cost.service.IAccountingSubjectService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -45,7 +46,7 @@ public class AccountingSubjectController { ...@@ -45,7 +46,7 @@ public class AccountingSubjectController {
@ApiOperation("更新会计一级科目") @ApiOperation("更新会计一级科目")
@PostMapping("/modify") @PostMapping("/modify")
public CostResult<Void> modify(@RequestBody AccountingSubjectAddReq req) { public CostResult<Void> modify(@RequestBody AccountingSubjectModifyReq req) {
log.info("新增会计一级科目:{}", JsonUtilByFsJson.beanToJson(req)); log.info("新增会计一级科目:{}", JsonUtilByFsJson.beanToJson(req));
accountingSubjectService.modify(req); accountingSubjectService.modify(req);
return CostResult.success(); return CostResult.success();
......
...@@ -14,6 +14,9 @@ import lombok.Data; ...@@ -14,6 +14,9 @@ import lombok.Data;
@Data @Data
public class AccountingSubjectModifyReq { public class AccountingSubjectModifyReq {
@ApiModelProperty(value = "会计一级类目id")
private String id;
@ApiModelProperty(value = "会计一级类目编号") @ApiModelProperty(value = "会计一级类目编号")
private String subjectNo; private String subjectNo;
......
...@@ -2,6 +2,7 @@ package com.blt.other.module.cost.service; ...@@ -2,6 +2,7 @@ package com.blt.other.module.cost.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.blt.other.module.cost.dto.request.AccountingSubjectAddReq; import com.blt.other.module.cost.dto.request.AccountingSubjectAddReq;
import com.blt.other.module.cost.dto.request.AccountingSubjectModifyReq;
import com.blt.other.module.cost.model.AccountingSubject; import com.blt.other.module.cost.model.AccountingSubject;
/** /**
...@@ -26,5 +27,5 @@ public interface IAccountingSubjectService extends IService<AccountingSubject> { ...@@ -26,5 +27,5 @@ public interface IAccountingSubjectService extends IService<AccountingSubject> {
* *
* @param req req * @param req req
*/ */
void modify(AccountingSubjectAddReq req); void modify(AccountingSubjectModifyReq req);
} }
...@@ -5,6 +5,7 @@ import com.blt.other.module.auth.dao.OaUserMapper; ...@@ -5,6 +5,7 @@ import com.blt.other.module.auth.dao.OaUserMapper;
import com.blt.other.module.auth.model.OaUser; import com.blt.other.module.auth.model.OaUser;
import com.blt.other.module.cost.dao.AccountingSubjectMapper; import com.blt.other.module.cost.dao.AccountingSubjectMapper;
import com.blt.other.module.cost.dto.request.AccountingSubjectAddReq; import com.blt.other.module.cost.dto.request.AccountingSubjectAddReq;
import com.blt.other.module.cost.dto.request.AccountingSubjectModifyReq;
import com.blt.other.module.cost.model.AccountingSubject; import com.blt.other.module.cost.model.AccountingSubject;
import com.blt.other.module.cost.service.IAccountingSubjectService; import com.blt.other.module.cost.service.IAccountingSubjectService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -47,9 +48,11 @@ public class AccountingSubjectServiceImpl extends ServiceImpl<AccountingSubjectM ...@@ -47,9 +48,11 @@ public class AccountingSubjectServiceImpl extends ServiceImpl<AccountingSubjectM
@Override @Override
public void modify(AccountingSubjectAddReq req) { public void modify(AccountingSubjectModifyReq req) {
AccountingSubject accountingSubject = baseMapper.selectByNo(req.getSubjectNo()); AccountingSubject accountingSubject = baseMapper.selectById(req.getId());
accountingSubject.setSubjectNo(req.getSubjectNo());
accountingSubject.setUpdateUserId(req.getUpdateUserId()); accountingSubject.setUpdateUserId(req.getUpdateUserId());
OaUser oaUser = oaUserMapper.selectByOaUserId(req.getUpdateUserId()); OaUser oaUser = oaUserMapper.selectByOaUserId(req.getUpdateUserId());
......
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