Commit cb969661 by huluobin

update

parent 34763f35
......@@ -104,7 +104,7 @@ public class Swagger2Config {
@Bean
public Docket sysApi() {
return new Docket(DocumentationType.SWAGGER_2)
.groupName("费用系统设置接口")
.groupName("系统设置接口")
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.blt.other.module.sys"))
......
......@@ -7,7 +7,6 @@ import com.blt.other.common.util.PathUtil;
import com.blt.other.module.cost.utils.CostFileUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.java.Log;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
......
......@@ -10,12 +10,17 @@ import org.springframework.core.io.InputStreamResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/purchasing/list")
......@@ -25,8 +30,8 @@ public class PurchasingListController {
private BuyService buyService;
@GetMapping("/getAllBuy")
public Map<String,Object> getAllBuy(HttpServletResponse response, HttpServletRequest request){
AxiosUtil.setCors(response,request);
public Map<String, Object> getAllBuy(HttpServletResponse response, HttpServletRequest request) {
AxiosUtil.setCors(response, request);
String pageNum = request.getParameter("pageNum");
String pageSize = request.getParameter("pageSize");
......@@ -35,16 +40,6 @@ public class PurchasingListController {
return allBuyList;
}
// 批量确认
// @PostMapping("batchAffirm")
// public Map<String,Object> batchAffirm(HttpServletResponse response,HttpServletRequest request){
// AxiosUtil.setCors(response,request);
// Map<String,Object> result = new HashMap<>();
//
// result.put("success",true);
// result.put("msg","采购单已确认");
// return result;
// }
@GetMapping("/print")
public Map<String, Object> printList(HttpServletResponse response, HttpServletRequest request,
......@@ -52,9 +47,9 @@ public class PurchasingListController {
AxiosUtil.setCors(response, request);
if (printBuyIds != null && printBuyIds.length > 0) {
List<BuyListPrintDto> printDtoList = buyService.getBuyPrintList(printBuyIds);
Map<String,Object> result = new HashMap<>();
result.put("success",true);
result.put("printList",printDtoList);
Map<String, Object> result = new HashMap<>();
result.put("success", true);
result.put("printList", printDtoList);
return result;
}
return null;
......@@ -62,6 +57,7 @@ public class PurchasingListController {
/**
* 采购单导出excel
*
* @param buyIds
* @return
* @throws IOException
......@@ -73,7 +69,7 @@ public class PurchasingListController {
String fileName = PathUtil.getFileName(filePath);
HttpHeaders headers = new HttpHeaders();
headers.add("Cache-Control", "no-cache, no-store, must-revalidate");
headers.add("Content-Disposition", String.format("attachment; filename=\"%s\"", new String(fileName.getBytes("UTF-8"),"iso-8859-1")));
headers.add("Content-Disposition", String.format("attachment; filename=\"%s\"", new String(fileName.getBytes("UTF-8"), "iso-8859-1")));
headers.add("Pragma", "no-cache");
headers.add("Expires", "0");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment