zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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);
    }
 
 
}