36 lines
1.0 KiB
Java
36 lines
1.0 KiB
Java
![]() |
package com.cim.idm.controller;
|
||
|
|
||
|
import com.cim.idm.model.CostCenter;
|
||
|
import com.cim.idm.response.BaseResponse;
|
||
|
import com.cim.idm.response.RespGenerator;
|
||
|
import com.cim.idm.service.CostCenterService;
|
||
|
import io.swagger.annotations.Api;
|
||
|
import lombok.extern.slf4j.Slf4j;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
import java.util.List;
|
||
|
|
||
|
|
||
|
@RestController
|
||
|
@RequestMapping("/CostCenter")
|
||
|
@Slf4j
|
||
|
@Api(tags = "成本中心")
|
||
|
public class CostCenterController {
|
||
|
|
||
|
@Autowired
|
||
|
private CostCenterService costCenterService;
|
||
|
|
||
|
/**
|
||
|
* 获取成本中心
|
||
|
* @return
|
||
|
*/
|
||
|
@RequestMapping(value = "/getCostCenter", method = RequestMethod.GET)
|
||
|
public BaseResponse<Object> getCostCenter() {
|
||
|
List<CostCenter> costCenters = costCenterService.getCostCenter();
|
||
|
return RespGenerator.returnOK(costCenters);
|
||
|
}
|
||
|
}
|