2025-05-13 15:26:39 +08:00
|
|
|
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;
|
2025-05-19 09:00:43 +08:00
|
|
|
import java.util.Map;
|
2025-05-13 15:26:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/CostCenter")
|
|
|
|
@Slf4j
|
|
|
|
@Api(tags = "成本中心")
|
|
|
|
public class CostCenterController {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private CostCenterService costCenterService;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取成本中心
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping(value = "/getCostCenter", method = RequestMethod.GET)
|
2025-05-28 08:40:35 +08:00
|
|
|
public BaseResponse<Object> getCostCenter(String erpFactory) {
|
|
|
|
List<CostCenter> costCenters = costCenterService.getCostCenter(erpFactory);
|
2025-05-13 15:26:39 +08:00
|
|
|
return RespGenerator.returnOK(costCenters);
|
|
|
|
}
|
2025-05-19 09:00:43 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取用户信息
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping(value = "/getUserInfo", method = RequestMethod.GET)
|
|
|
|
public BaseResponse<Object> getUserInfo() {
|
|
|
|
List<Map<String, Object>> userInfos = costCenterService.getUserInfo();
|
|
|
|
return RespGenerator.returnOK(userInfos);
|
|
|
|
}
|
2025-05-13 15:26:39 +08:00
|
|
|
}
|