123456789101112131415161718192021222324252627282930313233343536 |
- package com.rongwei.bsserver.controller;
- import com.rongwei.bscommon.sys.service.ZhcxPersistentManageService;
- import com.rongwei.bscommon.sys.service.ZhcxPersistentService;
- import com.rongwei.rwcommon.base.R;
- import com.rongwei.rwcommon.base.exception.CustomException;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import javax.servlet.http.HttpServletResponse;
- import java.util.Map;
- /**
- * @author zhuang
- */
- @RestController
- @RequestMapping("/zhcxPersistent")
- public class ZhcxPersistentController {
- @Autowired
- private ZhcxPersistentManageService zhcxPersistentManageService;
- @PostMapping("wordExport")
- public void wordExport(@RequestBody Map<String,Object> map, HttpServletResponse response){
- int i = zhcxPersistentManageService.wordExport(map,response);
- if(i == 0){
- throw new CustomException("导出失败");
- }else if(i == 1){
- throw new CustomException("当前周期暂无数据");
- }
- }
- }
|