Commit cb969661 by huluobin

update

parent 34763f35
...@@ -104,7 +104,7 @@ public class Swagger2Config { ...@@ -104,7 +104,7 @@ public class Swagger2Config {
@Bean @Bean
public Docket sysApi() { public Docket sysApi() {
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
.groupName("费用系统设置接口") .groupName("系统设置接口")
.apiInfo(apiInfo()) .apiInfo(apiInfo())
.select() .select()
.apis(RequestHandlerSelectors.basePackage("com.blt.other.module.sys")) .apis(RequestHandlerSelectors.basePackage("com.blt.other.module.sys"))
......
...@@ -7,7 +7,6 @@ import com.blt.other.common.util.PathUtil; ...@@ -7,7 +7,6 @@ import com.blt.other.common.util.PathUtil;
import com.blt.other.module.cost.utils.CostFileUtil; import com.blt.other.module.cost.utils.CostFileUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.java.Log;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
......
...@@ -10,12 +10,17 @@ import org.springframework.core.io.InputStreamResource; ...@@ -10,12 +10,17 @@ import org.springframework.core.io.InputStreamResource;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; 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.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController @RestController
@RequestMapping("/purchasing/list") @RequestMapping("/purchasing/list")
...@@ -25,8 +30,8 @@ public class PurchasingListController { ...@@ -25,8 +30,8 @@ public class PurchasingListController {
private BuyService buyService; private BuyService buyService;
@GetMapping("/getAllBuy") @GetMapping("/getAllBuy")
public Map<String,Object> getAllBuy(HttpServletResponse response, HttpServletRequest request){ public Map<String, Object> getAllBuy(HttpServletResponse response, HttpServletRequest request) {
AxiosUtil.setCors(response,request); AxiosUtil.setCors(response, request);
String pageNum = request.getParameter("pageNum"); String pageNum = request.getParameter("pageNum");
String pageSize = request.getParameter("pageSize"); String pageSize = request.getParameter("pageSize");
...@@ -35,16 +40,6 @@ public class PurchasingListController { ...@@ -35,16 +40,6 @@ public class PurchasingListController {
return allBuyList; 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") @GetMapping("/print")
public Map<String, Object> printList(HttpServletResponse response, HttpServletRequest request, public Map<String, Object> printList(HttpServletResponse response, HttpServletRequest request,
...@@ -52,9 +47,9 @@ public class PurchasingListController { ...@@ -52,9 +47,9 @@ public class PurchasingListController {
AxiosUtil.setCors(response, request); AxiosUtil.setCors(response, request);
if (printBuyIds != null && printBuyIds.length > 0) { if (printBuyIds != null && printBuyIds.length > 0) {
List<BuyListPrintDto> printDtoList = buyService.getBuyPrintList(printBuyIds); List<BuyListPrintDto> printDtoList = buyService.getBuyPrintList(printBuyIds);
Map<String,Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
result.put("success",true); result.put("success", true);
result.put("printList",printDtoList); result.put("printList", printDtoList);
return result; return result;
} }
return null; return null;
...@@ -62,6 +57,7 @@ public class PurchasingListController { ...@@ -62,6 +57,7 @@ public class PurchasingListController {
/** /**
* 采购单导出excel * 采购单导出excel
*
* @param buyIds * @param buyIds
* @return * @return
* @throws IOException * @throws IOException
...@@ -73,7 +69,7 @@ public class PurchasingListController { ...@@ -73,7 +69,7 @@ public class PurchasingListController {
String fileName = PathUtil.getFileName(filePath); String fileName = PathUtil.getFileName(filePath);
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.add("Cache-Control", "no-cache, no-store, must-revalidate"); 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("Pragma", "no-cache");
headers.add("Expires", "0"); 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