rxswin导入
This commit is contained in:
+1
-1
@@ -5890,7 +5890,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
if (sheet != null) {
|
if (sheet != null) {
|
||||||
StringBuilder headerSb = new StringBuilder();
|
StringBuilder headerSb = new StringBuilder();
|
||||||
int rowNos = sheet.getLastRowNum();// 得到excel的总记录条数
|
int rowNos = sheet.getLastRowNum();// 得到excel的总记录条数
|
||||||
for (int i = 0; i <= rowNos; i++) {// 遍历行
|
for (int i = 0; i <= rowNos; i++) {
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-9
@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
@@ -168,16 +169,19 @@ public class ProjectRxswinEOController extends JeroController<ProjectRxswinEO, I
|
|||||||
return projectRxswinEOService.exportXls(request,projectRxswinEO);
|
return projectRxswinEOService.exportXls(request,projectRxswinEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过excel导入数据
|
* 通过excel导入数据
|
||||||
*
|
* @param file
|
||||||
* @param request
|
* @param cut
|
||||||
* @param response
|
* @param version
|
||||||
* @return
|
* @param projectId
|
||||||
*/
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="导入", notes="导入")
|
||||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
public Result<?> importExcel(MultipartFile file,String cut,String version,String projectId) {
|
||||||
return super.importExcel(request, response, ProjectRxswinEO.class);
|
projectRxswinEOService.importExcel(file,cut,version,projectId);
|
||||||
|
return Result.OK("");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+38
@@ -0,0 +1,38 @@
|
|||||||
|
package com.jero.modules.project.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前状态枚举类
|
||||||
|
*/
|
||||||
|
public enum RxswinEnum {
|
||||||
|
|
||||||
|
ONE("编号","No."),
|
||||||
|
TWO("主题","Theme"),
|
||||||
|
THREE("RXSWIN","RXSWIN"),
|
||||||
|
FOUR("对应版本","Corresponding version")
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
String nameCn;
|
||||||
|
String nameEn;
|
||||||
|
|
||||||
|
private RxswinEnum(String nameCn,String nameEn) {
|
||||||
|
this.nameCn = nameCn;
|
||||||
|
this.nameEn = nameEn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNameCn() {
|
||||||
|
return nameCn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNameCn(String nameCn) {
|
||||||
|
this.nameCn = nameCn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNameEn() {
|
||||||
|
return nameEn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNameEn(String nameEn) {
|
||||||
|
this.nameEn = nameEn;
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
import com.jero.modules.project.entity.ProjectRxswinEO;
|
import com.jero.modules.project.entity.ProjectRxswinEO;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
@@ -108,4 +109,6 @@ public interface IProjectRxswinEOService extends IService<ProjectRxswinEO> {
|
|||||||
ModelAndView exportXls(HttpServletRequest request, ProjectRxswinEO projectRxswinEO);
|
ModelAndView exportXls(HttpServletRequest request, ProjectRxswinEO projectRxswinEO);
|
||||||
|
|
||||||
void exportTemplate(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request);
|
void exportTemplate(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request);
|
||||||
|
|
||||||
|
void importExcel(MultipartFile file, String cut, String version, String projectId);
|
||||||
}
|
}
|
||||||
|
|||||||
+693
-461
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user