|
@ -12,8 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
|
|
|
@ -135,15 +135,15 @@ public class HopsitalServiceItemController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 机构服务项目导数据
|
|
|
* @param request
|
|
|
* @param file
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "importData", produces = "application/json;charset=UTF-8")
|
|
|
@ResponseBody
|
|
|
public String importData(HttpServletRequest request) {
|
|
|
public String importData(@RequestParam(name = "file") MultipartFile file) {
|
|
|
try {
|
|
|
request.setCharacterEncoding("UTF-8");
|
|
|
InputStream inputStream = request.getInputStream();
|
|
|
InputStream inputStream = file.getInputStream();
|
|
|
Workbook workbook = Workbook.getWorkbook(inputStream);
|
|
|
|
|
|
specialistHospitalItemService.importData(workbook);
|