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.form.rest.apply;
 
import com.changhong.epc.bean.form.apply.ApplyMergeDto;
import com.changhong.epc.bean.form.apply.ApplyMergePageResult;
import com.changhong.epc.bean.report.Report;
import com.changhong.epc.constter.form.apply.ApplyMergeUrl;
import com.changhong.epc.form.service.apply.ApplyMergeService;
import com.iemsoft.framework.cloud.core.constant.BaseConst;
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;
 
@RestController
public class ApplyMergeRest implements ApplyMergeUrl {
 
    @Resource
    private ApplyMergeService applyMergeService;
 
    /**
     * 分页获取可合并的申请单
     * @param applyMergeDto
     * @return
     */
    @PostMapping(APPLY_MERGE_LIST)
    public ApplyMergePageResult getApplyMergeList(@RequestBody ApplyMergeDto applyMergeDto){
        return applyMergeService.getPageApplyMergeList(applyMergeDto);
    }
 
    /**
     * 申请单合并后生成报表
     * @param applyMergeDto
     * @return
     */
    @PostMapping(APPLY_MERGE_CREATE_REPORT)
    public Report createReport(@RequestBody ApplyMergeDto applyMergeDto){
        return applyMergeService.createReport(applyMergeDto);
    }
 
    /**
     * 申请单取消合并
     * @param applyMergeDto
     */
    @PostMapping(APPLY_UN_MERGE)
    public Object unMerge(@RequestBody ApplyMergeDto applyMergeDto){
        applyMergeService.unMerge(applyMergeDto);
        return BaseConst.NULL;
    }
 
}