工作组导入导出
This commit is contained in:
+79
@@ -1,18 +1,37 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.controller;
|
||||
|
||||
|
||||
import com.adc.da.excel.poi.excel.entity.ExportParams;
|
||||
import com.adc.da.excel.poi.excel.entity.enums.ExcelType;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.msgDynamicInfo.common.ReadExcel;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelExportUtilByWk;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdCgfy;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdCgfyService;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -42,6 +61,66 @@ public class WgdCgfyController extends BaseController<WgdCgfy> {
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@ApiOperation("导出采购费用信息统计")
|
||||
@GetMapping("/exportAllCgfys")
|
||||
public void exportAllAssocInfos(String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(StringUtils.isEmpty(exportName) ||exportName.equals("null")){
|
||||
exportName="采购费用信息统计";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx", request));
|
||||
response.setContentType("application/force-download");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setSheetName(exportName);
|
||||
List<WgdCgfy> datas=new ArrayList<>();
|
||||
if (null!=idList) {
|
||||
List<String> ids = new ArrayList<>(Arrays.asList(idList.split(",")));
|
||||
QueryWrapper<WgdCgfy> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("id",ids);
|
||||
datas = iWgdCgfyService.list(wrapper);
|
||||
} else {
|
||||
datas = iWgdCgfyService.getAllWgdCgfys();
|
||||
}
|
||||
workbook = ExcelExportUtilByWk.exportWithData(exportParams,WgdWbtj.class,datas);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsEO|导入")
|
||||
@PostMapping(value = "/importAllCgfys")
|
||||
public ResponseMessage<List<WgdCgfy>> importSplitItemsZip(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
|
||||
List<WgdCgfy> res= ExcelImportUtilByWk.readExcelpublic(WgdCgfy.class,file);
|
||||
|
||||
QueryWrapper<WgdCgfy> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdCgfy.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdCgfy> wgdAssocInfos=iWgdCgfyService.list(queryWrapper);
|
||||
List<WgdCgfy> remove=new ArrayList<>();
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
if (wgdAssocInfos.contains(wgdAssocInfo)){
|
||||
remove.add(wgdAssocInfo);
|
||||
}
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (iWgdCgfyService.saveOrUpdateBatch(res)) {
|
||||
return Result.success();
|
||||
}else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/getCgfyById")
|
||||
public ResponseMessage<Object> getWgdCgfyById(String id) {//查询详情
|
||||
return Result.success(iWgdCgfyService.getWgdCgfyById(id));
|
||||
|
||||
+80
@@ -1,18 +1,38 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.controller;
|
||||
|
||||
|
||||
import com.adc.da.excel.poi.excel.entity.ExportParams;
|
||||
import com.adc.da.excel.poi.excel.entity.enums.ExcelType;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.msgDynamicInfo.common.ReadExcel;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelExportUtilByWk;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdCgfy;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdFyfy;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdFyfyService;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -42,6 +62,66 @@ public class WgdFyfyController extends BaseController<WgdFyfy> {
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@ApiOperation("导出翻译费用信息统计")
|
||||
@GetMapping("/exportAllFyfys")
|
||||
public void exportAllAssocInfos(String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(StringUtils.isEmpty(exportName) ||exportName.equals("null")){
|
||||
exportName="翻译费用信息统计";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx", request));
|
||||
response.setContentType("application/force-download");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setSheetName(exportName);
|
||||
List<WgdFyfy> datas=new ArrayList<>();
|
||||
if (null!=idList) {
|
||||
List<String> ids = new ArrayList<>(Arrays.asList(idList.split(",")));
|
||||
QueryWrapper<WgdFyfy> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("id",ids);
|
||||
datas = iWgdFyfyService.list(wrapper);
|
||||
} else {
|
||||
datas = iWgdFyfyService.getAllWgdFyfys();
|
||||
}
|
||||
workbook = ExcelExportUtilByWk.exportWithData(exportParams, WgdWbtj.class,datas);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsEO|导入")
|
||||
@PostMapping(value = "/importAllFyfys")
|
||||
public ResponseMessage<List<WgdFyfy>> importSplitItemsZip(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
|
||||
List<WgdFyfy> res= ExcelImportUtilByWk.readExcelpublic(WgdFyfy.class,file);
|
||||
|
||||
QueryWrapper<WgdFyfy> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdFyfy.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdFyfy> wgdAssocInfos=iWgdFyfyService.list(queryWrapper);
|
||||
List<WgdFyfy> remove=new ArrayList<>();
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
if (wgdAssocInfos.contains(wgdAssocInfo)){
|
||||
remove.add(wgdAssocInfo);
|
||||
}
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (iWgdFyfyService.saveOrUpdateBatch(res)) {
|
||||
return Result.success();
|
||||
}else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/getFyfyById")
|
||||
public ResponseMessage<Object> getWgdFyfyById(String id) {//查询详情
|
||||
return Result.success(iWgdFyfyService.getWgdFyfyById(id));
|
||||
|
||||
+80
@@ -1,18 +1,38 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.controller;
|
||||
|
||||
|
||||
import com.adc.da.excel.poi.excel.entity.ExportParams;
|
||||
import com.adc.da.excel.poi.excel.entity.enums.ExcelType;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.msgDynamicInfo.common.ReadExcel;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelExportUtilByWk;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdFyfy;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdSrb;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdSrbService;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -42,6 +62,66 @@ public class WgdSrbController extends BaseController<WgdSrb> {
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@ApiOperation("导出标准制修订补助资金收支统计收入")
|
||||
@GetMapping("/exportAllSrbs")
|
||||
public void exportAllAssocInfos(String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(StringUtils.isEmpty(exportName) ||exportName.equals("null")){
|
||||
exportName="标准制修订补助资金收支统计收入表";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx", request));
|
||||
response.setContentType("application/force-download");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setSheetName(exportName);
|
||||
List<WgdSrb> datas=new ArrayList<>();
|
||||
if (null!=idList) {
|
||||
List<String> ids = new ArrayList<>(Arrays.asList(idList.split(",")));
|
||||
QueryWrapper<WgdSrb> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("id",ids);
|
||||
datas = iWgdSrbService.list(wrapper);
|
||||
} else {
|
||||
datas = iWgdSrbService.getAllWgdSrbs();
|
||||
}
|
||||
workbook = ExcelExportUtilByWk.exportWithData(exportParams, WgdWbtj.class,datas);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsEO|导入")
|
||||
@PostMapping(value = "/importAllSrbs")
|
||||
public ResponseMessage<List<WgdSrb>> importSplitItemsZip(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
|
||||
List<WgdSrb> res= ExcelImportUtilByWk.readExcelpublic(WgdSrb.class,file);
|
||||
|
||||
QueryWrapper<WgdSrb> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdSrb.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdSrb> wgdAssocInfos=iWgdSrbService.list(queryWrapper);
|
||||
List<WgdSrb> remove=new ArrayList<>();
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
if (wgdAssocInfos.contains(wgdAssocInfo)){
|
||||
remove.add(wgdAssocInfo);
|
||||
}
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (iWgdSrbService.saveOrUpdateBatch(res)) {
|
||||
return Result.success();
|
||||
}else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/getSrbById")
|
||||
public ResponseMessage<Object> getWgdSrbById(String id) {//查询详情
|
||||
return Result.success(iWgdSrbService.getWgdSrbById(id));
|
||||
|
||||
+86
@@ -1,18 +1,37 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.controller;
|
||||
|
||||
|
||||
import com.adc.da.excel.poi.excel.entity.ExportParams;
|
||||
import com.adc.da.excel.poi.excel.entity.enums.ExcelType;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.msgDynamicInfo.common.ReadExcel;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelExportUtilByWk;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdWbtjService;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -41,6 +60,73 @@ public class WgdWbtjController extends BaseController<WgdWbtj> {
|
||||
PageInfo pageInfo = getPageInfo(wgdWbtj.getPager(),wgdWbtjs);
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
@ApiOperation("导出参与外部协会会议统计")
|
||||
@GetMapping("/exportAllWbtjs")
|
||||
public void exportAllAssocInfos(String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(StringUtils.isEmpty(exportName) ||exportName.equals("null")){
|
||||
exportName="参与外部协会会议统计";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx", request));
|
||||
response.setContentType("application/force-download");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setSheetName(exportName);
|
||||
List<WgdWbtj> datas=new ArrayList<>();
|
||||
if (null!=idList) {
|
||||
List<String> ids = new ArrayList<>(Arrays.asList(idList.split(",")));
|
||||
QueryWrapper<WgdWbtj> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("id",ids);
|
||||
datas = iWgdWbtjService.list(wrapper);
|
||||
} else {
|
||||
datas = iWgdWbtjService.getAllWgdWbtjs();
|
||||
}
|
||||
workbook = ExcelExportUtilByWk.exportWithData(exportParams,WgdWbtj.class,datas);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsEO|导入")
|
||||
@PostMapping(value = "/importAllAllWbtjs")
|
||||
public ResponseMessage<List<WgdWbtj>> importSplitItemsZip(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
|
||||
List<WgdWbtj> res= ExcelImportUtilByWk.readExcelpublic(WgdWbtj.class,file);
|
||||
// res.forEach( Wbtj ->{
|
||||
// if (Wbtj.getHost().equals("") || StringUtils.isEmpty(Wbtj.getHost())){
|
||||
// return Result.error();
|
||||
// }
|
||||
// });
|
||||
QueryWrapper<WgdWbtj> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.select(WgdWbtj.class, info -> !info.getColumn().equals("id"));
|
||||
queryWrapper.select(WgdWbtj.class,tableFieldInfo -> !tableFieldInfo.getColumn().equals("id"));
|
||||
List<WgdWbtj> WgdWbtjs=iWgdWbtjService.list(queryWrapper);
|
||||
List<WgdWbtj> remove=new ArrayList<>();
|
||||
WgdWbtjs.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (iWgdWbtjService.saveOrUpdateBatch(res)) {
|
||||
return Result.success();
|
||||
}else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getWbtjById")
|
||||
public ResponseMessage<Object> getWgdWbtjById(String id) {//查询详情
|
||||
|
||||
+78
@@ -1,18 +1,37 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.controller;
|
||||
|
||||
|
||||
import com.adc.da.excel.poi.excel.entity.ExportParams;
|
||||
import com.adc.da.excel.poi.excel.entity.enums.ExcelType;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.msgDynamicInfo.common.ReadExcel;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelExportUtilByWk;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdWbxd;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdWbxdService;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -41,6 +60,65 @@ public class WgdWbxdController extends BaseController<WgdWbxd> {
|
||||
PageInfo pageInfo = getPageInfo(wgdWbxd.getPager(),wgdWbxds);
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
@ApiOperation("导出参与外部标准制修订信息统计")
|
||||
@GetMapping("/exportAllWbxds")
|
||||
public void exportAllAssocInfos(String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(StringUtils.isEmpty(exportName) ||exportName.equals("null")){
|
||||
exportName="参与外部标准制修订信息统计";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx", request));
|
||||
response.setContentType("application/force-download");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setSheetName(exportName);
|
||||
List<WgdWbxd> datas=new ArrayList<>();
|
||||
if (null!=idList) {
|
||||
List<String> ids = new ArrayList<>(Arrays.asList(idList.split(",")));
|
||||
QueryWrapper<WgdWbxd> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("id",ids);
|
||||
datas = iWgdWbxdService.list(wrapper);
|
||||
} else {
|
||||
datas = iWgdWbxdService.getAllWgdWbxds();
|
||||
}
|
||||
workbook = ExcelExportUtilByWk.exportWithData(exportParams,WgdWbxd.class,datas);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsEO|导入")
|
||||
@PostMapping(value = "/importAllWbxds")
|
||||
public ResponseMessage<List<WgdWbxd>> importSplitItemsZip(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
|
||||
List<WgdWbxd> res= ExcelImportUtilByWk.readExcelpublic(WgdWbxd.class,file);
|
||||
|
||||
QueryWrapper<WgdWbxd> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdWbxd.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdWbxd> wgdAssocInfos=iWgdWbxdService.list(queryWrapper);
|
||||
List<WgdWbxd> remove=new ArrayList<>();
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
if (wgdAssocInfos.contains(wgdAssocInfo)){
|
||||
remove.add(wgdAssocInfo);
|
||||
}
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (iWgdWbxdService.saveOrUpdateBatch(res)) {
|
||||
return Result.success();
|
||||
}else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/getWbxdById")
|
||||
public ResponseMessage<Object> getWgdWbxdById(String id) {//查询详情
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -30,18 +31,23 @@ public class WgdCgfy extends BasePage {
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准类型")
|
||||
@Excel(name = "标准类型", orderNum = "0",width = 20.0)
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "标准代号")
|
||||
@Excel(name = "标准代号", orderNum = "1",width = 20.0)
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@Excel(name = "标准名称", orderNum = "2",width = 20.0)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "页数")
|
||||
@Excel(name = "页数", orderNum = "3",width = 20.0)
|
||||
private String pages;
|
||||
|
||||
@ApiModelProperty(value = "费用")
|
||||
@Excel(name = "费用", orderNum = "4",width = 20.0)
|
||||
private String cost;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -31,24 +32,31 @@ public class WgdFyfy extends BasePage {
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准类型")
|
||||
@Excel(name = "标准类型", orderNum = "0",width = 20.0)
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "标准代号")
|
||||
@Excel(name = "标准代号", orderNum = "1",width = 20.0)
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@Excel(name = "标准名称", orderNum = "2",width = 20.0)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "翻译类型")
|
||||
@Excel(name = "翻译类型", orderNum = "3",width = 20.0)
|
||||
private String translation;
|
||||
|
||||
@ApiModelProperty(value = "页数")
|
||||
@Excel(name = "页数", orderNum = "4",width = 20.0)
|
||||
private String pages;
|
||||
|
||||
@ApiModelProperty(value = "费用")
|
||||
@Excel(name = "费用", orderNum = "5",width = 20.0)
|
||||
private String cost;
|
||||
|
||||
@ApiModelProperty(value = "翻译完成时间")
|
||||
@Excel(name = "翻译完成时间", orderNum = "6",width = 20.0)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String time;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -30,18 +31,23 @@ public class WgdSrb extends BasePage {
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@Excel(name = "标准名称", orderNum = "0",width = 20.0)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
@Excel(name = "标准编号", orderNum = "1",width = 20.0)
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value = "补助来源")
|
||||
@Excel(name = "补助来源", orderNum = "2",width = 20.0)
|
||||
private String source;
|
||||
|
||||
@ApiModelProperty(value = "补助金额")
|
||||
@Excel(name = "补助金额", orderNum = "3",width = 20.0)
|
||||
private String cost;
|
||||
|
||||
@ApiModelProperty(value = "入账时间")
|
||||
@Excel(name = "入账时间", orderNum = "4",width = 20.0)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String time;
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -29,43 +31,57 @@ public class WgdWbtj extends BasePage {
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "主办单位")
|
||||
@Excel(name = "主办单位", orderNum = "0",width = 20.0)
|
||||
private String host;
|
||||
|
||||
@ApiModelProperty(value = "会议名称")
|
||||
@Excel(name = "会议名称", orderNum = "1",width = 20.0)
|
||||
private String meeting;
|
||||
|
||||
@ApiModelProperty(value = "会议时间")
|
||||
@Excel(name = "会议时间", orderNum = "2",width = 20.0)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String time;
|
||||
|
||||
@ApiModelProperty(value = "会议地点")
|
||||
@Excel(name = "会议地点", orderNum = "3",width = 20.0)
|
||||
private String place;
|
||||
|
||||
@ApiModelProperty(value = "会费标准")
|
||||
@Excel(name = "会费标准", orderNum = "4",width = 20.0)
|
||||
private String contributions;
|
||||
|
||||
@ApiModelProperty(value = "会费实际发生")
|
||||
@Excel(name = "会费实际发生", orderNum = "5",width = 20.0)
|
||||
private String occurs;
|
||||
|
||||
@ApiModelProperty(value = "费用列支")
|
||||
@Excel(name = "费用列支", orderNum = "6",width = 20.0)
|
||||
private String expenses;
|
||||
|
||||
@ApiModelProperty(value = "参会人员")
|
||||
@Excel(name = "参会人员", orderNum = "7",width = 20.0)
|
||||
private String user;
|
||||
|
||||
@ApiModelProperty(value = "主管领导")
|
||||
@Excel(name = "主管领导", orderNum = "8",width = 20.0)
|
||||
private String leadership;
|
||||
|
||||
@ApiModelProperty(value = "参会单位")
|
||||
@Excel(name = "参会单位", orderNum = "9",width = 20.0)
|
||||
private String participants;
|
||||
|
||||
@ApiModelProperty(value = "会议资料")
|
||||
@Excel(name = "会议资料", orderNum = "10",width = 20.0)
|
||||
private String information;
|
||||
|
||||
@ApiModelProperty(value = "会议录音")
|
||||
@Excel(name = "会议录音", orderNum = "11",width = 20.0)
|
||||
private String recording;
|
||||
|
||||
@ApiModelProperty(value = "主要议题")
|
||||
@Excel(name = "主要议题", orderNum = "12",width = 20.0)
|
||||
@TableField("Issues")
|
||||
private String Issues;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -30,69 +31,90 @@ public class WgdWbxd extends BasePage {
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "所处阶段")
|
||||
@Excel(name = "所处阶段", orderNum = "0",width = 20.0)
|
||||
private String stage;
|
||||
|
||||
@ApiModelProperty(value = "标准号")
|
||||
@Excel(name = "标准号", orderNum = "1",width = 20.0)
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@Excel(name = "标准名称", orderNum = "2",width = 20.0)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "项目代号")
|
||||
@Excel(name = "项目代号", orderNum = "3",width = 20.0)
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty(value = "项目名称")
|
||||
@Excel(name = "项目名称", orderNum = "4",width = 20.0)
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "标准类型")
|
||||
@Excel(name = "标准类型", orderNum = "5",width = 20.0)
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "主持或参与")
|
||||
@Excel(name = "主持或参与", orderNum = "6",width = 20.0)
|
||||
private String preside;
|
||||
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
@Excel(name = "发布日期", orderNum = "7",width = 20.0)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String dataStart;
|
||||
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
@Excel(name = "实施日期", orderNum = "8",width = 20.0)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String dataImplement;
|
||||
|
||||
@ApiModelProperty(value = "颁布机构")
|
||||
@Excel(name = "颁布机构", orderNum = "9",width = 20.0)
|
||||
private String body;
|
||||
|
||||
@ApiModelProperty(value = "牵头起草单位")
|
||||
@Excel(name = "牵头起草单位", orderNum = "10",width = 20.0)
|
||||
private String drafting;
|
||||
|
||||
@ApiModelProperty(value = "备案时间")
|
||||
@Excel(name = "备案时间", orderNum = "11",width = 20.0)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String dataRecord;
|
||||
|
||||
@ApiModelProperty(value = "提报单位名称")
|
||||
@Excel(name = "提报单位名称", orderNum = "12",width = 20.0)
|
||||
private String report;
|
||||
|
||||
@ApiModelProperty(value = "参与人")
|
||||
@Excel(name = "参与人", orderNum = "13",width = 20.0)
|
||||
private String participants;
|
||||
|
||||
@ApiModelProperty(value = "署名人")
|
||||
@Excel(name = "署名人", orderNum = "14",width = 20.0)
|
||||
private String celebrity;
|
||||
|
||||
@ApiModelProperty(value = "制标费用")
|
||||
@Excel(name = "制标费用", orderNum = "15",width = 20.0)
|
||||
private String costMarking;
|
||||
|
||||
@ApiModelProperty(value = "其他费用")
|
||||
@Excel(name = "其他费用", orderNum = "16",width = 20.0)
|
||||
private String costOther;
|
||||
|
||||
@ApiModelProperty(value = "标准制/修订")
|
||||
@Excel(name = "标准制/修订", orderNum = "17",width = 20.0)
|
||||
private String revised;
|
||||
|
||||
@ApiModelProperty(value = "获奖情况")
|
||||
@Excel(name = "获奖情况", orderNum = "18",width = 20.0)
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "署名排序")
|
||||
@Excel(name = "署名排序", orderNum = "19",width = 20.0)
|
||||
private String signature;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Excel(name = "备注", orderNum = "20",width = 20.0)
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
+83
@@ -1,21 +1,40 @@
|
||||
package com.adc.da.slrs.wgdCensusZ.controller;
|
||||
|
||||
|
||||
import com.adc.da.excel.poi.excel.entity.ExportParams;
|
||||
import com.adc.da.excel.poi.excel.entity.enums.ExcelType;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.msgDynamicInfo.common.ReadExcel;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelExportUtilByWk;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdAssocCostService;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdAssocCost;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -33,6 +52,11 @@ public class WgdAssocCostController extends BaseController<WgdAssocCost> {
|
||||
@Autowired
|
||||
IWgdAssocCostService iWgdAssocCostService;
|
||||
|
||||
@GetMapping("selectAllAssocCosts")
|
||||
public ResponseMessage<Object> selectAllAssocCosts(){//查询所有
|
||||
return Result.success(iWgdAssocCostService.selectAllAssocCosts());
|
||||
}
|
||||
|
||||
@ApiOperation("查询所有信息")
|
||||
@GetMapping("getAllAssocCosts")
|
||||
public ResponseMessage<Object> getAllWgdAssocCosts(WgdAssocCost page){//查询所有
|
||||
@@ -49,6 +73,65 @@ public class WgdAssocCostController extends BaseController<WgdAssocCost> {
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@ApiOperation("导出协会费用信息统计")
|
||||
@GetMapping("/exportAllAssocCosts")
|
||||
public void exportAllAssocInfos(String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(StringUtils.isEmpty(exportName) ||exportName.equals("null")){
|
||||
exportName="协会费用信息统计";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx", request));
|
||||
response.setContentType("application/force-download");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setSheetName(exportName);
|
||||
List<WgdAssocCost> datas=new ArrayList<>();
|
||||
if (null!=idList) {
|
||||
List<String> ids = new ArrayList<>(Arrays.asList(idList.split(",")));
|
||||
QueryWrapper<WgdAssocCost> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("id",ids);
|
||||
datas = iWgdAssocCostService.list(wrapper);
|
||||
} else {
|
||||
datas = iWgdAssocCostService.selectAllAssocCosts();
|
||||
}
|
||||
workbook = ExcelExportUtilByWk.exportWithData(exportParams,WgdAssocCost.class,datas);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsEO|导入")
|
||||
@PostMapping(value = "/importAssocCosts")
|
||||
public ResponseMessage<List<WgdAssocCost>> importSplitItemsZip(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
|
||||
List<WgdAssocCost> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocCost.class,file);
|
||||
|
||||
QueryWrapper<WgdAssocCost> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdAssocCost.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdAssocCost> wgdAssocInfos=iWgdAssocCostService.list(queryWrapper);
|
||||
List<WgdAssocCost> remove=new ArrayList<>();
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
if (wgdAssocInfos.contains(wgdAssocInfo)){
|
||||
remove.add(wgdAssocInfo);
|
||||
}
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (iWgdAssocCostService.saveOrUpdateBatch(res)) {
|
||||
return Result.success();
|
||||
}else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
@ApiOperation("查询详情")
|
||||
@GetMapping("getAssocCostById")
|
||||
public ResponseMessage<Object> getWgdAssocCostById(String id) {//查询详情
|
||||
|
||||
+2
-2
@@ -52,8 +52,8 @@ public class WgdAssocInfoController extends BaseController<WgdAssocInfo> {
|
||||
return Result.success(iWgdAssocInfoService.getAllWgdAssocInfos());
|
||||
}
|
||||
|
||||
@GetMapping("exportAllAssocInfos")
|
||||
public void exportAllAssocInfos(String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
@GetMapping("/exportAllAssocInfos")
|
||||
public void exportAllAssocInfos( String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
|
||||
+2
-1
@@ -61,13 +61,14 @@ public class WgdCommiInfoController extends BaseController<WgdCommiInfo> {
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "导出委员信息数据统计")
|
||||
@GetMapping("/exportAllCommiInfos")
|
||||
public void exportAllAssocInfos(String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(StringUtils.isEmpty(exportName) ||exportName.equals("null")){
|
||||
exportName="协会信息数据统计";
|
||||
exportName="委员信息数据统计";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx", request));
|
||||
|
||||
+79
@@ -1,18 +1,37 @@
|
||||
package com.adc.da.slrs.wgdCensusZ.controller;
|
||||
|
||||
|
||||
import com.adc.da.excel.poi.excel.entity.ExportParams;
|
||||
import com.adc.da.excel.poi.excel.entity.enums.ExcelType;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.msgDynamicInfo.common.ReadExcel;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelExportUtilByWk;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdExReviseCost;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdMeetCost;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdExReviseCostService;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -42,6 +61,66 @@ public class WgdExReviseCostController extends BaseController<WgdExReviseCost> {
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@ApiOperation("导出参与外部标准制修订费用统计")
|
||||
@GetMapping("/exportAllExReviseCost")
|
||||
public void exportAllAssocInfos(String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(StringUtils.isEmpty(exportName) ||exportName.equals("null")){
|
||||
exportName="参与外部标准制修订费用统计";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx", request));
|
||||
response.setContentType("application/force-download");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setSheetName(exportName);
|
||||
List<WgdExReviseCost> datas=new ArrayList<>();
|
||||
if (null!=idList) {
|
||||
List<String> ids = new ArrayList<>(Arrays.asList(idList.split(",")));
|
||||
QueryWrapper<WgdExReviseCost> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("id",ids);
|
||||
datas = iWgdExReviseCostService.list(wrapper);
|
||||
} else {
|
||||
datas = iWgdExReviseCostService.getAllWgdExReviseCosts();
|
||||
}
|
||||
workbook = ExcelExportUtilByWk.exportWithData(exportParams,WgdExReviseCost.class,datas);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsEO|导入")
|
||||
@PostMapping(value = "/importExReviseCost")
|
||||
public ResponseMessage<List<WgdExReviseCost>> importSplitItemsZip(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
|
||||
List<WgdExReviseCost> res= ExcelImportUtilByWk.readExcelpublic(WgdExReviseCost.class,file);
|
||||
|
||||
QueryWrapper<WgdExReviseCost> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdExReviseCost.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdExReviseCost> wgdAssocInfos=iWgdExReviseCostService.list(queryWrapper);
|
||||
List<WgdExReviseCost> remove=new ArrayList<>();
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
if (wgdAssocInfos.contains(wgdAssocInfo)){
|
||||
remove.add(wgdAssocInfo);
|
||||
}
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (iWgdExReviseCostService.saveOrUpdateBatch(res)) {
|
||||
return Result.success();
|
||||
}else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("getExReviseCostById")
|
||||
public ResponseMessage<Object> getWgdExReviseCostById(String id) {//查询详情
|
||||
return Result.success(iWgdExReviseCostService.getWgdExReviseCostById(id));
|
||||
|
||||
+82
@@ -1,16 +1,37 @@
|
||||
package com.adc.da.slrs.wgdCensusZ.controller;
|
||||
|
||||
|
||||
import com.adc.da.excel.poi.excel.entity.ExportParams;
|
||||
import com.adc.da.excel.poi.excel.entity.enums.ExcelType;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.msgDynamicInfo.common.ReadExcel;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelExportUtilByWk;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdAssocCost;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdMeetCost;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdMeetCostService;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
/**
|
||||
@@ -57,6 +78,67 @@ public class WgdMeetCostController extends BaseController<WgdMeetCost> {
|
||||
public ResponseMessage<Object> getAllWgdMeetCosts(){//查询所有
|
||||
return Result.success(iWgdMeetCostService.getAllWgdMeetCosts());
|
||||
}
|
||||
|
||||
@ApiOperation("导出参会费用信息统计")
|
||||
@GetMapping("/exportAllAssocCosts")
|
||||
public void exportAllAssocInfos(String idList, String exportName, HttpServletResponse response, HttpServletRequest request){//查询所有
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(StringUtils.isEmpty(exportName) ||exportName.equals("null")){
|
||||
exportName="参会费用信息统计";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx", request));
|
||||
response.setContentType("application/force-download");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setSheetName(exportName);
|
||||
List<WgdMeetCost> datas=new ArrayList<>();
|
||||
if (null!=idList) {
|
||||
List<String> ids = new ArrayList<>(Arrays.asList(idList.split(",")));
|
||||
QueryWrapper<WgdMeetCost> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("id",ids);
|
||||
datas = iWgdMeetCostService.list(wrapper);
|
||||
} else {
|
||||
datas = iWgdMeetCostService.getAllWgdMeetCosts();
|
||||
}
|
||||
workbook = ExcelExportUtilByWk.exportWithData(exportParams,WgdMeetCost.class,datas);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsEO|导入")
|
||||
@PostMapping(value = "/importAssocCosts")
|
||||
public ResponseMessage<List<WgdMeetCost>> importSplitItemsZip(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
|
||||
List<WgdMeetCost> res= ExcelImportUtilByWk.readExcelpublic(WgdMeetCost.class,file);
|
||||
|
||||
QueryWrapper<WgdMeetCost> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdMeetCost.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdMeetCost> wgdAssocInfos=iWgdMeetCostService.list(queryWrapper);
|
||||
List<WgdMeetCost> remove=new ArrayList<>();
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
if (wgdAssocInfos.contains(wgdAssocInfo)){
|
||||
remove.add(wgdAssocInfo);
|
||||
}
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (iWgdMeetCostService.saveOrUpdateBatch(res)) {
|
||||
return Result.success();
|
||||
}else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("getMeetCostById")
|
||||
public ResponseMessage<Object> getWgdMeetCostById(String id) {//查询详情
|
||||
return Result.success(iWgdMeetCostService.getWgdMeetCostById(id));
|
||||
|
||||
@@ -20,6 +20,7 @@ public interface WgdAssocCostDao extends BaseMapper<WgdAssocCost> {
|
||||
Integer getTotal();//总数
|
||||
Integer getQueryTotal(WgdAssocCost wgdAssocCost);//总数
|
||||
List<WgdAssocCost> selectAll(WgdAssocCost page);//查询所有
|
||||
List<WgdAssocCost> selectAllAssocCosts();//查询所有selectAllAssocCosts
|
||||
List<WgdAssocCost> queryAll(WgdAssocCost wgdAssocCost);//多条件查询
|
||||
WgdAssocCost selectOne(String id);//查询详情
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.wgdCensusZ.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -25,24 +26,31 @@ public class WgdAssocCost extends BasePage {
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "协会名称-标委会")
|
||||
@Excel(name = "协会名称-标委会", orderNum = "0",width = 20.0)
|
||||
private String scName;
|
||||
|
||||
@ApiModelProperty(value = "协会名称-分标委")
|
||||
@Excel(name = "协会名称-分标委", orderNum = "1",width = 20.0)
|
||||
private String sscName;
|
||||
|
||||
@ApiModelProperty(value = "协会名称-工作组")
|
||||
@Excel(name = "协会名称-工作组", orderNum = "2",width = 20.0)
|
||||
private String wgName;
|
||||
|
||||
@ApiModelProperty(value = "会费标准")
|
||||
@Excel(name = "会费标准", orderNum = "3",width = 20.0)
|
||||
private String payStandard;
|
||||
|
||||
@ApiModelProperty(value = "实际发生")
|
||||
@Excel(name = "实际发生", orderNum = "4",width = 20.0)
|
||||
private String payReality;
|
||||
|
||||
@ApiModelProperty(value = "费用列支")
|
||||
@Excel(name = "费用列支", orderNum = "5",width = 20.0)
|
||||
private String costOutlay;
|
||||
|
||||
@ApiModelProperty(value = "每年缴费情况")
|
||||
@Excel(name = "每年缴费情况", orderNum = "6",width = 20.0)
|
||||
private String annualPayment;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.wgdCensusZ.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -25,18 +26,23 @@ public class WgdExReviseCost extends BasePage {
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@Excel(name = "类型", orderNum = "0",width = 20.0)
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "项目编号")
|
||||
@Excel(name = "项目编号", orderNum = "1",width = 20.0)
|
||||
private String proId;
|
||||
|
||||
@ApiModelProperty(value = "项目名称")
|
||||
@Excel(name = "项目名称", orderNum = "2",width = 20.0)
|
||||
private String proName;
|
||||
|
||||
@ApiModelProperty(value = "费用列支项")
|
||||
@Excel(name = "费用列支项", orderNum = "3",width = 20.0)
|
||||
private String costOutlay;
|
||||
|
||||
@ApiModelProperty(value = "费用支出")
|
||||
@Excel(name = "费用支出", orderNum = "4",width = 20.0)
|
||||
private String cost;
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.adc.da.slrs.wgdCensusZ.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -28,22 +29,28 @@ public class WgdMeetCost extends BasePage {
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "主办单位")
|
||||
@Excel(name = "主办单位", orderNum = "0",width = 20.0)
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "会议名称")
|
||||
@Excel(name = "会议名称", orderNum = "1",width = 20.0)
|
||||
private String meetName;
|
||||
|
||||
@ApiModelProperty(value = "会议时间")
|
||||
@Excel(name = "会议时间", orderNum = "2",width = 20.0)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date meetTime;
|
||||
|
||||
@ApiModelProperty(value = "会费标准")
|
||||
@Excel(name = "会费标准", orderNum = "3",width = 20.0)
|
||||
private String payStandard;
|
||||
|
||||
@ApiModelProperty(value = "实际发生")
|
||||
@Excel(name = "实际发生", orderNum = "4",width = 20.0)
|
||||
private String payReality;
|
||||
|
||||
@ApiModelProperty(value = "费用列支")
|
||||
@Excel(name = "费用列支", orderNum = "5",width = 20.0)
|
||||
private String costOutlay;
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.List;
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
public interface IWgdAssocCostService extends IService<WgdAssocCost> {
|
||||
List<WgdAssocCost> selectAllAssocCosts();//查询所有
|
||||
List<WgdAssocCost> getAllWgdAssocCosts(WgdAssocCost page);//查询所有
|
||||
List<WgdAssocCost> queryAllWgdAssocCosts(WgdAssocCost wgdAssocCost);//多条件查询
|
||||
WgdAssocCost getWgdAssocCostById(String id);//查询详情
|
||||
|
||||
+5
@@ -27,6 +27,11 @@ public class WgdAssocCostServiceImpl extends ServiceImpl<WgdAssocCostDao, WgdAss
|
||||
@Autowired
|
||||
WgdAssocCostDao wgdAssocCostDao;
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> selectAllAssocCosts() {
|
||||
return wgdAssocCostDao.selectAllAssocCosts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> getAllWgdAssocCosts(WgdAssocCost page) {
|
||||
Integer count = wgdAssocCostDao.getTotal();
|
||||
|
||||
Reference in New Issue
Block a user