Commit 8c7de394 by huluobin

# fee

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