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;
|
}
|
|
}
|