package com.changhong.epc.tenant.controller.cost;
|
|
import com.changhong.epc.bean.tenant.cost.CostFromMapping;
|
import com.changhong.epc.bean.tenant.cost.extend.CostFromMappingExtend;
|
import com.changhong.epc.constter.tenant.TenantUrlConst;
|
import com.changhong.epc.tenant.service.cost.CostFromMappingService;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
import java.util.List;
|
@RestController
|
public class CostFromMappingController implements TenantUrlConst{
|
|
|
@Resource(name="costFromMappingServiceImpl")
|
private CostFromMappingService costFromMappingService;
|
|
|
/**
|
* 按条件查询一条表单
|
* @param cost
|
* @return
|
*/
|
@PostMapping(REST_TENANT_COSTFORM_SELECTONE)
|
public CostFromMappingExtend selectOne(@RequestBody CostFromMapping cost){
|
return cost==null ? null : costFromMappingService.selectOne(cost);
|
}
|
|
/**
|
* 根据表单id,查询费用类型对应表单信息
|
* @param cost
|
* @return
|
*/
|
@PostMapping(REST_TENANT_COSTFORM_BY_FORMID)
|
public List<CostFromMapping> getConstFroms(@RequestBody CostFromMapping cost){
|
return costFromMappingService.getConstFroms(cost);
|
}
|
|
|
/**
|
* 按类型查询表单
|
*/
|
@PostMapping(REST_TENANT_COST_FORMID)
|
public List<CostFromMapping> selectType(@RequestBody CostFromMapping cost){
|
return costFromMappingService.selectType(cost);
|
}
|
|
|
}
|