Commit 55853c14 by huluobin

# update

parent 5615042b
......@@ -10,10 +10,7 @@ import com.blt.other.module.cost.service.IAccountingSubjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
......@@ -59,4 +56,10 @@ public class AccountingSubjectController {
return CostResult.success(list);
}
@ApiOperation("根据id获取会计一级科目")
@PostMapping("/queryById")
public CostResult<AccountingSubject> queryById(@RequestParam Integer id) {
AccountingSubject accountingSubject = accountingSubjectService.getById(id);
return CostResult.success(accountingSubject);
}
}
......@@ -92,9 +92,9 @@ public class CostTypeController {
}
@ApiOperation("导出excel")
@PostMapping("/exportExcel")
@GetMapping("/exportExcel")
public CostResult<Void> exportExcel(HttpServletResponse response,
@RequestBody CostTypeExportExcelReq req) throws IOException {
CostTypeExportExcelReq req) throws IOException {
costTypeService.exportExcel(response, req);
return CostResult.success();
}
......
......@@ -21,8 +21,8 @@ public class CostTypeAddReq {
@ApiModelProperty("描述")
private String description;
@ApiModelProperty("会计一级科目")
private String accountingSubjectNo;
@ApiModelProperty("会计科目id")
private Integer accountingSubjectId;
@ApiModelProperty("1-费用类型 2-收入类型")
private Integer type;
......
......@@ -44,7 +44,7 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
public void addCostType(CostTypeAddReq req) {
CostTypeDomain costTypeDomain = new CostTypeDomain();
AccountingSubject accountingSubject = accountingSubjectMapper.selectByNo(req.getAccountingSubjectNo());
AccountingSubject accountingSubject = accountingSubjectMapper.selectById(req.getAccountingSubjectId());
costTypeDomain.setAccountingSubjectId(accountingSubject.getId());
costTypeDomain.setTypeNo(IdWorker.getIdStr());
costTypeDomain.setTypeName(req.getTypeName());
......
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