Merge remote-tracking branch 'origin/develop_master' into develop_1
This commit is contained in:
@@ -0,0 +1,139 @@
|
||||
package com.adc.da.slrs.ImportExcelDatas.comment;
|
||||
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellType;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.time.Year;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
public class Analysis {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(Contrast.class);
|
||||
|
||||
private int sortColumn=0;
|
||||
|
||||
|
||||
public void run(MultipartFile file, MultipartFile sort) throws IOException {
|
||||
|
||||
InputStream inputStream = file.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
HashSet<String> sortSet = getSet(sort);
|
||||
|
||||
for (Row row : sheet) {
|
||||
if (row.getCell(1)!=null){
|
||||
//获取表1的标准号
|
||||
String value = row.getCell(1).toString();
|
||||
Cell sortCell = row.createCell(11);
|
||||
Cell numberCell = row.createCell(12);
|
||||
Cell yearCell = row.createCell(13);
|
||||
|
||||
sortCell.setCellType(CellType.STRING);
|
||||
numberCell.setCellType(CellType.STRING);
|
||||
yearCell.setCellType(CellType.STRING);
|
||||
|
||||
List<String> collect = sortSet.stream()
|
||||
.filter(item ->{
|
||||
int length = item.length();
|
||||
if (value.length()>length){
|
||||
return value.substring(0, length).contains(item);
|
||||
}else return false;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
//对比在表2中是否存在
|
||||
if (collect.size()==1){
|
||||
|
||||
String sortStr = collect.get(0);
|
||||
int length = sortStr.length();
|
||||
logger.info("*");
|
||||
// Pattern pattern = Pattern.compile("^\\S*\\s\\S*[\\u2014\\u002d\\s]\\d{4}$");
|
||||
// pattern.matcher(standId).matches()
|
||||
if (value.length()>=length+5){
|
||||
sortCell.setCellValue(collect.get(0));
|
||||
numberCell.setCellValue(value.substring(length,value.length()-5));
|
||||
yearCell.setCellValue(value.substring(value.length()-4));
|
||||
}
|
||||
}else if (collect.size()>1){
|
||||
String maxLenSort="";
|
||||
for (String s : collect) {
|
||||
if (s.length()>maxLenSort.length()){
|
||||
maxLenSort=s;
|
||||
}
|
||||
}
|
||||
|
||||
int length = maxLenSort.length();
|
||||
|
||||
if (value.length()>=length+5){
|
||||
logger.info("+");
|
||||
|
||||
|
||||
sortCell.setCellValue(maxLenSort);
|
||||
numberCell.setCellValue(value.substring(length,value.length()-5));
|
||||
yearCell.setCellValue(value.substring(value.length()-4));
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.info("-");
|
||||
|
||||
sortCell.setCellValue("-");
|
||||
numberCell.setCellValue("-");
|
||||
yearCell.setCellValue("-");
|
||||
}
|
||||
}
|
||||
}
|
||||
File result = new File("C:\\Users\\22501\\Desktop\\foton标准数据\\拆分标准号-企标.xlsx");
|
||||
FileOutputStream os = new FileOutputStream(result);
|
||||
workbook.write(os);
|
||||
// HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void setSortColumn(int sortColumn){
|
||||
this.sortColumn=sortColumn;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取标准类别set集合
|
||||
* @param file
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
private HashSet<String> getSet(MultipartFile file) throws IOException {
|
||||
InputStream inputStream = file.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
// int lastNum = sheet.getLastRowNum();
|
||||
|
||||
HashSet<String> stringHashSet= new HashSet<>();
|
||||
|
||||
for (Row row : sheet) {
|
||||
if (row.getCell(sortColumn)!=null){
|
||||
stringHashSet.add(row.getCell(sortColumn).toString());
|
||||
}
|
||||
}
|
||||
|
||||
return stringHashSet;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.adc.da.slrs.ImportExcelDatas.comment;
|
||||
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellType;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
@Component
|
||||
public class Contrast {
|
||||
private static final Logger logger = LoggerFactory.getLogger(Contrast.class);
|
||||
|
||||
public void run(MultipartFile file,MultipartFile sort) throws IOException {
|
||||
|
||||
InputStream inputStream = file.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
HashSet<String> set = getSet(sort);
|
||||
for (Row row : sheet) {
|
||||
if (row.getCell(0)!=null){
|
||||
//获取表1的标准号
|
||||
String value = row.getCell(0).toString().trim();
|
||||
Cell cell = row.createCell(11);
|
||||
|
||||
//对比在表2中是否存在
|
||||
if (set.contains(value.trim())){
|
||||
logger.info("*");
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue("1");
|
||||
}else {
|
||||
logger.info("-");
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue("0");
|
||||
}
|
||||
}
|
||||
}
|
||||
File result = new File("C:\\Users\\22501\\Desktop\\foton标准数据\\海外对比全数据.xlsx");
|
||||
FileOutputStream os = new FileOutputStream(result);
|
||||
workbook.write(os);
|
||||
// HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
}
|
||||
|
||||
private HashSet<String> getSet(MultipartFile file) throws IOException {
|
||||
InputStream inputStream = file.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
// int lastNum = sheet.getLastRowNum();
|
||||
|
||||
HashSet<String> stringHashSet= new HashSet<>();
|
||||
|
||||
for (Row row : sheet) {
|
||||
if (row.getCell(1)!=null){
|
||||
stringHashSet.add(row.getCell(1).toString().trim());
|
||||
}
|
||||
}
|
||||
|
||||
return stringHashSet;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
|
||||
@Component
|
||||
public class ExclErrorOut {
|
||||
private static final Logger logger = LoggerFactory.getLogger(BussStandExportUtil.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(ExclErrorOut.class);
|
||||
|
||||
public static Workbook exportDatas (List<ImportDto> datas,String header) {
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
|
||||
@@ -1,17 +1,29 @@
|
||||
package com.adc.da.slrs.ImportExcelDatas.comment;
|
||||
|
||||
import com.adc.da.slrs.ImportExcelDatas.entity.ImportDto;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFRow;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class ExclExport extends ExclErrorOut {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ExclErrorOut.class);
|
||||
|
||||
/**
|
||||
* 导出多个sheet页的excl
|
||||
@@ -23,6 +35,7 @@ public class ExclExport extends ExclErrorOut {
|
||||
for (Map.Entry<String, List<ImportDto>> entry : dataMap.entrySet()) {
|
||||
List<ImportDto> datas = entry.getValue();
|
||||
Sheet sheet = workbook.createSheet(entry.getKey());
|
||||
sheet.setDefaultColumnWidth(25);
|
||||
super.createHeader(workbook,sheet,header);
|
||||
super.createDatas(workbook,sheet,datas);
|
||||
|
||||
@@ -33,4 +46,71 @@ public class ExclExport extends ExclErrorOut {
|
||||
|
||||
return workbook;
|
||||
}
|
||||
|
||||
/**
|
||||
* 比对表格中的数据是否在数据库表中
|
||||
* @param sourceFile
|
||||
* @return
|
||||
*/
|
||||
public void contrast(MultipartFile sourceFile, HashSet<List<String>> set) throws IOException {
|
||||
|
||||
|
||||
InputStream inputStream = sourceFile.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
|
||||
|
||||
// HashMap<String, String> map = new HashMap<>();
|
||||
int lastNum = sheet.getLastRowNum();
|
||||
for (int i = 0; i < lastNum; i++) {
|
||||
|
||||
XSSFRow row = sheet.getRow(i);
|
||||
|
||||
|
||||
if (row.getCell(1)!=null){
|
||||
// String value = row.getCell(1).toString();
|
||||
|
||||
// map.put(value,String.valueOf(i));
|
||||
String value = row.getCell(1).toString();
|
||||
Cell cell = row.createCell(11);
|
||||
Set<List<String>> collect = set.stream()
|
||||
.filter(item ->
|
||||
value.contains(item.get(0).trim())
|
||||
&& value.contains(item.get(1).trim())
|
||||
&& value.contains(item.get(2).trim())
|
||||
)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
|
||||
if (!collect.isEmpty()){
|
||||
logger.info("*");
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue("1");
|
||||
}else {
|
||||
logger.info("-");
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue("0");
|
||||
}
|
||||
}
|
||||
|
||||
// map.strea
|
||||
// List<User> filterList=map.stre()
|
||||
// .filter(user -> serviceCodes.contains(user.getOrgId()))
|
||||
// .collect(Collectors.toList());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
File file = new File("C:\\Users\\22501\\Desktop\\foton标准数据\\ouhuo.xlsx");
|
||||
FileOutputStream os = new FileOutputStream(file);
|
||||
workbook.write(os);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.adc.da.slrs.ImportExcelDatas.comment;
|
||||
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellType;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class PathMatcher {
|
||||
private static final Logger logger = LoggerFactory.getLogger(PathMatcher.class);
|
||||
|
||||
public void run(MultipartFile target,MultipartFile attach) throws IOException {
|
||||
|
||||
InputStream inputStream = target.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
HashMap<String, String> fileMap = getFileMap(attach);
|
||||
|
||||
|
||||
for (Row row : sheet) {
|
||||
|
||||
String latter = row.getCell(1).getStringCellValue().trim();//标准号
|
||||
String fileId="";
|
||||
if (row.getCell(10)!=null){
|
||||
fileId = row.getCell(10).getStringCellValue().trim();//文档id
|
||||
}else {
|
||||
logger.info("+");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append(fileId)
|
||||
.append(latter);
|
||||
if (fileMap.containsKey(builder.toString())){
|
||||
Cell cell = row.createCell(9);
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(fileMap.get(builder.toString()));
|
||||
logger.info("*");
|
||||
}else {
|
||||
logger.info("-");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File file = new File("C:\\Users\\22501\\Desktop\\foton标准数据\\匹配带入文件路径-国内库.xlsx");
|
||||
FileOutputStream os = new FileOutputStream(file);
|
||||
workbook.write(os);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private HashMap<String,String> getFileMap(MultipartFile excel) throws IOException {
|
||||
|
||||
InputStream inputStream = excel.getInputStream();
|
||||
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
HashMap<String, String> resultMap = new HashMap<>();
|
||||
for (Row row : sheet) {
|
||||
|
||||
String value = row.getCell(0).getStringCellValue();
|
||||
|
||||
String[] strArray = value.split(",");
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append(strArray[1].trim()) //文档id
|
||||
.append(strArray[2].trim()); //标准号
|
||||
|
||||
|
||||
String path = strArray[3];
|
||||
|
||||
resultMap.put(builder.toString(),path);
|
||||
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
package com.adc.da.slrs.ImportExcelDatas.comment;
|
||||
|
||||
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellType;
|
||||
import org.apache.poi.ss.usermodel.DateUtil;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.apache.poi.ss.usermodel.CellType.NUMERIC;
|
||||
|
||||
public class StandMatcher {
|
||||
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(StandMatcher.class);
|
||||
|
||||
|
||||
public void run(MultipartFile target,MultipartFile attach) throws IOException {
|
||||
InputStream inputStream = target.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
Map<String, String> matchSet = getMatchSet(attach);
|
||||
|
||||
for (Row row : sheet) {
|
||||
|
||||
String letter =convertCellValueToString(row.getCell(1));//标准号
|
||||
|
||||
String publish = convertCellValueToString(row.getCell(3));//发布日期
|
||||
|
||||
String impl= convertCellValueToString(row.getCell(4));//实施日期
|
||||
|
||||
String state = convertCellValueToString(row.getCell(2));//状态
|
||||
|
||||
String replace= convertCellValueToString(row.getCell(5));//代替标准号
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
StringBuilder strBuilder = new StringBuilder();
|
||||
strBuilder.append(letter)
|
||||
.append(publish)
|
||||
.append(impl)
|
||||
.append(state)
|
||||
.append(replace);
|
||||
String str = strBuilder.toString();
|
||||
|
||||
if (matchSet.containsKey(str)){
|
||||
Cell cell = row.createCell(10); //再第10列存放文件id
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(matchSet.get(str));
|
||||
logger.info("*");
|
||||
}else {
|
||||
logger.info("-");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File result = new File("C:\\Users\\22501\\Desktop\\foton标准数据\\匹配带入文件id-国内库.xlsx");
|
||||
FileOutputStream os = new FileOutputStream(result);
|
||||
workbook.write(os);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private Map<String,String> getMatchSet(MultipartFile excel) throws IOException {
|
||||
InputStream inputStream = excel.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
Map<String,String> resultSet = new HashMap<>();
|
||||
|
||||
|
||||
for (Row row : sheet) {
|
||||
|
||||
String letter =convertCellValueToString(row.getCell(0));//标准号
|
||||
|
||||
String publish = convertCellValueToString(row.getCell(3));//发布日期
|
||||
|
||||
String impl= convertCellValueToString(row.getCell(4));//实施日期
|
||||
|
||||
String state = convertCellValueToString(row.getCell(5));//状态
|
||||
|
||||
String replace= convertCellValueToString(row.getCell(6));//代替标准号
|
||||
|
||||
|
||||
|
||||
StringBuilder strBuilder = new StringBuilder();
|
||||
strBuilder.append(letter)
|
||||
.append(publish)
|
||||
.append(impl)
|
||||
.append(state)
|
||||
.append(replace);
|
||||
|
||||
|
||||
|
||||
if (row.getCell(7).getCellType()== NUMERIC){
|
||||
String s = row.getCell(7).toString();
|
||||
String fileId =s.substring(0,s.length()-2);//文件id
|
||||
resultSet.put(strBuilder.toString(),fileId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return resultSet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 将单元格内容转化为字符串
|
||||
*/
|
||||
private static String convertCellValueToString(Cell cell) {
|
||||
if (null == cell) {
|
||||
return "";
|
||||
}
|
||||
String returnValue = "";
|
||||
switch (cell.getCellType()) {
|
||||
case STRING: //字符串
|
||||
returnValue = cell.getStringCellValue().trim();
|
||||
break;
|
||||
case NUMERIC: //数字
|
||||
|
||||
|
||||
|
||||
if (DateUtil.isCellDateFormatted(cell)) {
|
||||
Date tempValue = cell.getDateCellValue();
|
||||
SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
returnValue = simpleFormat.format(tempValue);
|
||||
}else {
|
||||
returnValue = String.valueOf(cell.getNumericCellValue());
|
||||
}
|
||||
|
||||
|
||||
returnValue=cell.toString().trim();
|
||||
|
||||
|
||||
break;
|
||||
case BOOLEAN: //布尔
|
||||
boolean booleanCellValue = cell.getBooleanCellValue();
|
||||
returnValue = Boolean.toString(booleanCellValue).trim();
|
||||
break;
|
||||
case BLANK: //空值
|
||||
break;
|
||||
case FORMULA: //公式
|
||||
cell.getCellFormula();
|
||||
break;
|
||||
case ERROR: //故障
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
/**
|
||||
* 判断是否为整数,是返回true,否则返回false.
|
||||
*/
|
||||
public static boolean isIntegerForDouble(Double num) {
|
||||
double eqs = 1e-10; //精度范围
|
||||
return num - Math.floor(num) < eqs;
|
||||
}
|
||||
|
||||
}
|
||||
+89
-12
@@ -2,26 +2,16 @@ package com.adc.da.slrs.ImportExcelDatas.controller;
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.common.ReadExcel;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.ImportExcelDatas.comment.ExclErrorOut;
|
||||
import com.adc.da.slrs.ImportExcelDatas.comment.ExclExport;
|
||||
import com.adc.da.slrs.ImportExcelDatas.comment.*;
|
||||
import com.adc.da.slrs.ImportExcelDatas.entity.ImportDto;
|
||||
import com.adc.da.slrs.ImportExcelDatas.service.ImportExcelService;
|
||||
import com.adc.da.slrs.ImportExcelDatas.service.impl.ImportExcelServiceImpl;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarPersonalCenter.entity.SarUserStar;
|
||||
import com.adc.da.slrs.sarPersonalCenter.entity.SarUserStarEO;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.IOUtils;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.adc.da.utils.util.BussStandExportUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -52,13 +42,15 @@ public class ImportExcelController extends BaseController<ImportDto> {
|
||||
/**
|
||||
* 导入系统
|
||||
*/
|
||||
List<ImportDto> errorList = importExcelService.storageExclData(mapMap);
|
||||
// List<ImportDto> errorList = importExcelService.storageExclData(mapMap);
|
||||
// mapMap.put("导入后的信息",errorList);
|
||||
// List<ImportDto> guonei= mapMap.get("GNBZ");
|
||||
// List<ImportDto> haiwai = mapMap.get("HWBZ");
|
||||
// List<ImportDto> qibiao = mapMap.get("QYBZ");
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 生成错误表格
|
||||
*/
|
||||
@@ -94,4 +86,89 @@ public class ImportExcelController extends BaseController<ImportDto> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("从excl分解出标准号")
|
||||
@PostMapping("/analysisExcl")
|
||||
public void analysisExcl(MultipartFile exclFile,MultipartFile standSort, HttpServletResponse response, HttpServletRequest request) throws IOException {
|
||||
/**
|
||||
* 分解数据
|
||||
*/
|
||||
String headStr="标准号,标准类别,内容,标准名称,英文名称,发布时间,实施时间,标准状态,代替标准号,//,//";
|
||||
Map<String, List<ImportDto>> stringListMap = importExcelService.analysisExcl(exclFile,standSort);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 生成错误表格
|
||||
*/
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
|
||||
String exportName="错误表格";
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx",request));
|
||||
response.setContentType("application/force-download");
|
||||
//导出数据
|
||||
// workbook = exclErrorOut.exportDatas(guonei,headStr);
|
||||
|
||||
ExclExport exclExport = new ExclExport();
|
||||
workbook = exclExport.exportData(stringListMap, headStr);
|
||||
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
if (workbook != null) {
|
||||
workbook.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation("excel表中的信息是否在数据库中存在")
|
||||
@PostMapping("/isExist")
|
||||
public String isExist(MultipartFile exclFile){
|
||||
return importExcelService.isExist(exclFile);
|
||||
}
|
||||
|
||||
@ApiOperation("对比两个excel表中的标准名称")
|
||||
@PostMapping("/contrast")
|
||||
public void contrast(MultipartFile targetExcel,MultipartFile excel) throws IOException {
|
||||
Contrast contrast = new Contrast();
|
||||
contrast.run(targetExcel,excel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据标准从excl中分解出标准号,类别,年份")
|
||||
@PostMapping("/analysis")
|
||||
public void analysis(MultipartFile targetExcel,MultipartFile attachExcel) throws IOException {
|
||||
Analysis analysis = new Analysis();
|
||||
analysis.setSortColumn(1);
|
||||
analysis.run(targetExcel,attachExcel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation("匹配文件id")
|
||||
@PostMapping("/matching")
|
||||
public void matching(MultipartFile targetExcel,MultipartFile attachExcel) throws IOException {
|
||||
StandMatcher standMatcher = new StandMatcher();
|
||||
standMatcher.run(targetExcel, attachExcel);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据文件id和标准匹配文件路径")
|
||||
@PostMapping("/matchingPath")
|
||||
public void matchingPath(MultipartFile targetExcel,MultipartFile attachExcel) throws IOException {
|
||||
|
||||
PathMatcher pathMatcher = new PathMatcher();
|
||||
pathMatcher.run(targetExcel,attachExcel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,10 @@ public class ImportDto extends BaseEntity {
|
||||
|
||||
// 标准号
|
||||
private String standId;
|
||||
//标准类别
|
||||
private String standSort;
|
||||
//
|
||||
private String standIdExcludeSort;
|
||||
// 标准名称
|
||||
private String standName;
|
||||
// 英文名称
|
||||
|
||||
+4
@@ -14,4 +14,8 @@ public interface ImportExcelService extends IService<ImportDto> {
|
||||
|
||||
public List<ImportDto> storageExclData(Map<String, List<ImportDto>> importListMap);
|
||||
|
||||
public Map<String,List<ImportDto>> analysisExcl(MultipartFile exclFile,MultipartFile standSort);
|
||||
|
||||
|
||||
public String isExist(MultipartFile exclFile);
|
||||
}
|
||||
|
||||
+112
-14
@@ -2,6 +2,7 @@ package com.adc.da.slrs.ImportExcelDatas.service.impl;
|
||||
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
import com.adc.da.slrs.ImportExcelDatas.comment.ExclExport;
|
||||
import com.adc.da.slrs.ImportExcelDatas.dao.ImportExcelDao;
|
||||
import com.adc.da.slrs.ImportExcelDatas.entity.ImportDto;
|
||||
import com.adc.da.slrs.ImportExcelDatas.service.ImportExcelService;
|
||||
@@ -31,6 +32,7 @@ import java.io.InputStream;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDto> implements ImportExcelService {
|
||||
@@ -51,9 +53,10 @@ public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDt
|
||||
// private SarBussionessStandServiceImpl sarBussionessStandService;
|
||||
|
||||
|
||||
/**
|
||||
* 标准类别
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
private final static String GN = "GB,GB/T,QC/T,GJB,JB,JT,HG,YV,SY,SH,GA,HJ,QB,JG,NB,JC,YS/T,FZ/T,TB/T,JJG,SJ/T,T/TBPS" +
|
||||
",NB/T,CJ/T,YS/T,SJ/T,BB/T,SN/T,SB/T,MH/T,DB11,SZDB/Z,HKG,T/ZSA,CSAE,T/CAS,T/CADA,T/CHTS,T/ITS,T/BJQC";
|
||||
private final static String QB = "Q/QCBFC,Q/FT,Q/FL,Q/QCFLC,Q/BQB,Q/SGT," +
|
||||
@@ -205,23 +208,34 @@ public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDt
|
||||
//赋值方法
|
||||
private ImportDto getImportDto(String[] as) {
|
||||
ImportDto importDto = new ImportDto();
|
||||
if (as.length == 8) {
|
||||
String content = as[0];
|
||||
int length = as.length;
|
||||
if (length>6){
|
||||
|
||||
for (String s : sortList) {
|
||||
int sortLength = s.length();//标准类别长度
|
||||
if (s.equals(content.substring(0,sortLength ))){
|
||||
importDto.setStandSort(s);
|
||||
importDto.setStandIdExcludeSort(content.substring(sortLength));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
importDto.setStandId(null != as[0] ? as[0].trim() : "");
|
||||
importDto.setStandName(null != as[1] ? as[1].trim() : "");
|
||||
importDto.setStandNameEN(null != as[2] ? as[2].trim() : "");
|
||||
importDto.setPublishTime(null != as[3] ? as[3].trim() : "");
|
||||
importDto.setImplementedTime(null != as[4] ? as[4].trim() : "");
|
||||
importDto.setStandStatus(null != as[5] ? as[5].trim() : "");
|
||||
importDto.setReplaceId(null != as[6] ? as[6].trim() : "");
|
||||
} else if (as.length == 7) {
|
||||
importDto.setStandId(null != as[0] ? as[0].trim() : "");
|
||||
importDto.setStandName(null != as[1] ? as[1].trim() : "");
|
||||
importDto.setStandNameEN(null != as[2] ? as[2].trim() : "");
|
||||
importDto.setPublishTime(null != as[3] ? as[3].trim() : "");
|
||||
importDto.setImplementedTime(null != as[4] ? as[4].trim() : "");
|
||||
importDto.setStandStatus(null != as[5] ? as[5].trim() : "");
|
||||
importDto.setReplaceId("");
|
||||
if (length==7){
|
||||
importDto.setReplaceId("");
|
||||
}else if (length==8){
|
||||
importDto.setReplaceId(null != as[6] ? as[6].trim() : "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return importDto;
|
||||
}
|
||||
|
||||
@@ -241,7 +255,6 @@ public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDt
|
||||
for (int j = 0; j <= lastNum; j++) {
|
||||
HSSFRow row = sheet.getRow(j);
|
||||
if (null != row) {
|
||||
System.out.println("正在读取第"+j+"行...");
|
||||
strings.add(row.getCell(0).getStringCellValue());
|
||||
}
|
||||
}
|
||||
@@ -532,6 +545,91 @@ public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDt
|
||||
return error;
|
||||
}
|
||||
|
||||
private List<String> sortList=new LinkedList<>();
|
||||
|
||||
@Override
|
||||
public Map<String,List<ImportDto>> analysisExcl(MultipartFile exclFile,MultipartFile standSort) {
|
||||
//TODO analy
|
||||
|
||||
if (exclFile == null || exclFile.getSize() == 0) {
|
||||
log.error("文件上传错误,重新上传");
|
||||
}
|
||||
String filename = exclFile.getOriginalFilename();
|
||||
String standSortName=standSort.getOriginalFilename();
|
||||
|
||||
List<String> datas = new ArrayList<>();
|
||||
|
||||
|
||||
if (filename.endsWith(".xls")) {
|
||||
datas = isXls(exclFile);
|
||||
} else {
|
||||
datas = isXlsx(exclFile);
|
||||
}
|
||||
|
||||
if (standSortName.endsWith(".xls")){
|
||||
sortList = isXls(standSort);
|
||||
}else {
|
||||
sortList = isXlsx(standSort);
|
||||
}
|
||||
|
||||
HashMap<String, List<ImportDto>> result = new HashMap<>();
|
||||
LinkedList<ImportDto> exportList = new LinkedList<>();
|
||||
HashSet<String> distinct = new HashSet<>();
|
||||
datas.forEach(data->{
|
||||
System.out.print("#");
|
||||
String[] row = data.split("\\,");
|
||||
if (row.length>7){
|
||||
|
||||
if ((!"".equals(row[0].trim()) || !"".equals(row[1].trim()))&&distinct.add(row[0].trim()+row[1].trim())){
|
||||
ImportDto importDto = getImportDto(row);
|
||||
|
||||
if(importDto.getStandId()!=null&&importDto.getStandName()!=null){
|
||||
exportList.add(importDto);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
result.put("标准数据all_new",exportList);
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String isExist(MultipartFile exclFile) {
|
||||
ExclExport exclExport = new ExclExport();
|
||||
QueryWrapper<SarStandardsInfo> standWrapper = new QueryWrapper<>();
|
||||
standWrapper.select("STAND_NUMBER,STAND_SORT,STAND_YEAR");
|
||||
List<Map<String, Object>> maps = sarStandardsInfoService.listMaps(standWrapper);
|
||||
|
||||
QueryWrapper<SarBussionessStand> bussionessWrapper = new QueryWrapper<>();
|
||||
bussionessWrapper.select("STAND_CODE AS STAND_NUMBER,STAND_SORT,STAND_YEAR");
|
||||
List<Map<String, Object>> maps1 = sarBussionessStandService.listMaps(bussionessWrapper);
|
||||
|
||||
HashSet<List<String>> nameSet = new HashSet<>();
|
||||
maps.addAll(maps1);
|
||||
maps.forEach(item->{
|
||||
List<String> strings = new LinkedList<>();
|
||||
strings.add(item.get("STAND_NUMBER").toString().trim());
|
||||
strings.add(item.get("STAND_SORT").toString().trim());
|
||||
strings.add(item.get("STAND_YEAR").toString().trim());
|
||||
|
||||
nameSet.add(strings);
|
||||
});
|
||||
|
||||
try {
|
||||
exclExport.contrast(exclFile,nameSet);
|
||||
return "success";
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
return "failed";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 整理为标准信息实体
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.adc.da.slrs.sapMeetInfo.controller;
|
||||
|
||||
|
||||
import com.adc.da.slrs.sapMeetInfo.service.ISapMeetingService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sapMeetInfo.entity.SapMeeting;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程通过的 标准化活动会议信息表
|
||||
standard_activity_pass
|
||||
前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SapMeeting|")
|
||||
@RequestMapping("/api/sapMeetInfo")
|
||||
public class SapMeetingController extends BaseController<SapMeeting> {
|
||||
|
||||
@Autowired
|
||||
ISapMeetingService sapMeetingService;
|
||||
|
||||
@ApiOperation(value = "id查询会议信息")
|
||||
@GetMapping("/getOneById")
|
||||
public SapMeeting getOneById(String id){
|
||||
return sapMeetingService.getMeetingById(id);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取日历显示会议信息")
|
||||
@GetMapping("/getDateMeeting")
|
||||
public int getDateMeeting(@DateTimeFormat(pattern = "yyyy-MM-dd") Date date, String id,int type){
|
||||
return sapMeetingService.getDateMeeting(date,id,type);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取当月")
|
||||
@GetMapping("/getMeetingsByMonth")
|
||||
public List<SapMeeting> getMeetingsByMonth(@DateTimeFormat(pattern = "yyyy-MM-dd") Date date){
|
||||
return sapMeetingService.getMeetingsByMonth(date);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取当月,根据标志位type区分 1标准活动和2政策课题")
|
||||
@GetMapping("/getMeetingsByMonthType")
|
||||
public List<SapMeeting> getMeetingsByMonthType(@DateTimeFormat(pattern = "yyyy-MM-dd") Date date,int type){
|
||||
return sapMeetingService.getMeetingsByMonth(date, type);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取当天")
|
||||
@GetMapping("/getMeetingsByDate")
|
||||
public List<SapMeeting> getMeetingsByDate(@DateTimeFormat(pattern = "yyyy-MM-dd") Date date,int type){
|
||||
return sapMeetingService.getMeetingsByDate(date,type);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "插入")
|
||||
@PostMapping("/addMeeting")
|
||||
public int addMeeting(@RequestBody SapMeeting sapMeeting){
|
||||
return sapMeetingService.addMeeting(sapMeeting);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.adc.da.slrs.sapMeetInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sapMeetInfo.entity.SapMeeting;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程通过的 标准化活动会议信息表
|
||||
standard_activity_pass
|
||||
Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@Repository
|
||||
public interface SapMeetingDao extends BaseMapper<SapMeeting> {
|
||||
|
||||
int insertMeeting(SapMeeting sapMeeting);//参会流程结束--插入
|
||||
|
||||
List<SapMeeting> selectMeetingsByDate(Map map);//根据日期查找-当日所有会议(时间正序)
|
||||
List<SapMeeting> selectMeetingsByMonth(Date date);//根据年,月查找
|
||||
List<SapMeeting> selectMeetingsByMonthType(Map map);//根据年,月查找,type标志位 1标准化活动 2政策课题组
|
||||
|
||||
|
||||
SapMeeting selectMeetingById(String id);
|
||||
|
||||
|
||||
int deleteById(String id);
|
||||
|
||||
int deleteByDate(Date date);
|
||||
|
||||
int updateMeeting(SapMeeting sapMeeting);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.adc.da.slrs.sapMeetInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程通过的 标准化活动会议信息表
|
||||
standard_activity_pass
|
||||
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ToString
|
||||
@ApiModel(value="SapMeeting对象", description="流程通过的 标准化活动会议信息表 standard_activity_pass")
|
||||
public class SapMeeting{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;//主键-会议id
|
||||
|
||||
private String title;//会议标题
|
||||
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date date;//会议开始时间
|
||||
|
||||
private String content;//会议内容大纲
|
||||
|
||||
private int type;//标志位--1标准化活动会议,0政策组会议
|
||||
|
||||
private String attend;//参与人 {id,name} json
|
||||
|
||||
private String files;//附件 json
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.adc.da.slrs.sapMeetInfo.service;
|
||||
|
||||
import com.adc.da.slrs.sapMeetInfo.entity.SapMeeting;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程通过的 标准化活动会议信息表
|
||||
standard_activity_pass
|
||||
服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
public interface ISapMeetingService extends IService<SapMeeting> {
|
||||
|
||||
int addMeeting(SapMeeting sapMeeting);//参会流程结束--插入
|
||||
|
||||
List<SapMeeting> getMeetingsByDate(Date date,int type);//根据日期查找-当日所有会议(时间正序)
|
||||
List<SapMeeting> getMeetingsByMonth(Date date);//根据年,月查找
|
||||
List<SapMeeting> getMeetingsByMonth(Date date,int type);//根据年,月查找
|
||||
|
||||
int getDateMeeting(Date date,String id,int type);
|
||||
|
||||
|
||||
SapMeeting getMeetingById(String id);
|
||||
|
||||
int delById(String id);
|
||||
|
||||
int delByDate(Date date);
|
||||
|
||||
int modMeeting(SapMeeting sapMeeting);
|
||||
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
package com.adc.da.slrs.sapMeetInfo.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sapMeetInfo.entity.SapMeeting;
|
||||
import com.adc.da.slrs.sapMeetInfo.dao.SapMeetingDao;
|
||||
import com.adc.da.slrs.sapMeetInfo.service.ISapMeetingService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程通过的 标准化活动会议信息表
|
||||
standard_activity_pass
|
||||
服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@Service
|
||||
public class SapMeetingServiceImpl extends ServiceImpl<SapMeetingDao, SapMeeting> implements ISapMeetingService {
|
||||
|
||||
@Autowired
|
||||
SapMeetingDao sapMeetingDao;
|
||||
|
||||
@Override
|
||||
public int addMeeting(SapMeeting sapMeeting) {
|
||||
sapMeeting.setId(UUIDUtils.randomUUID(30));
|
||||
return sapMeetingDao.insertMeeting(sapMeeting);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SapMeeting> getMeetingsByDate(Date date,int type) {
|
||||
Map map = new HashMap();
|
||||
map.put("date",date);
|
||||
map.put("type",type);
|
||||
return sapMeetingDao.selectMeetingsByDate(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SapMeeting> getMeetingsByMonth(Date date) {
|
||||
List<SapMeeting> sapMeetings = sapMeetingDao.selectMeetingsByMonth(date);
|
||||
return sapMeetings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SapMeeting> getMeetingsByMonth(Date date, int type) {
|
||||
Map map = new HashMap();
|
||||
map.put("date",date);
|
||||
map.put("type",type);
|
||||
return sapMeetingDao.selectMeetingsByMonthType(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDateMeeting(Date date,String id,int type) {
|
||||
Map map = new HashMap();
|
||||
map.put("type",type);
|
||||
map.put("date",date);
|
||||
List<SapMeeting> sapMeetings = sapMeetingDao.selectMeetingsByDate(map);
|
||||
int rat = 0;//标志位 0无会议;1有会议;2有会议且有自己参会的会议
|
||||
if(sapMeetings.isEmpty()){
|
||||
rat = 1;
|
||||
}else if(hasOwnMeeting(id,sapMeetings)){
|
||||
rat = 2;
|
||||
}
|
||||
return rat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SapMeeting getMeetingById(String id) {
|
||||
return sapMeetingDao.selectMeetingById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delById(String id) {
|
||||
return sapMeetingDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delByDate(Date date) {
|
||||
return sapMeetingDao.deleteByDate(date);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int modMeeting(SapMeeting sapMeeting) {
|
||||
return sapMeetingDao.updateMeeting(sapMeeting);
|
||||
}
|
||||
|
||||
boolean hasOwnMeeting(String id,List<SapMeeting> sapMeetings){
|
||||
for(SapMeeting sapMeeting : sapMeetings){
|
||||
JSONObject jsonObject = JSONObject.parseObject(sapMeeting.getAttend());
|
||||
String a = jsonObject.getString("id");
|
||||
if(a.contains("[") && a.contains("]")){
|
||||
a.substring(1,a.length()-1);
|
||||
}
|
||||
String[] split = a.trim().split(",");
|
||||
for (String s : split) {
|
||||
if (s.equals(id)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+33
-28
@@ -242,37 +242,42 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
if(page.getUserId() == null || page.getUserId().equals("")){
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
if(StringUtils.isNotBlank(page.getPaixu())){
|
||||
String sql = page.getPaixu()+" "+page.getShunxu();
|
||||
page.setSql(sql);
|
||||
}else{
|
||||
page.setOrderBy("SAR_BUSSIONESS_STAND.MODIFY_TIME DESC");
|
||||
|
||||
if (null != page.getNowOrderBy()) {
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
List<SarBussionessStand> rows = sarBussionessStandEOService.getSarBussionStandPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
// if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
// List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
// String advanceStr = SarAdvanceSearchUtil.createSql(searchList);
|
||||
// if (StringUtils.isNotBlank(advanceStr)) {
|
||||
// page.setAdvanceSearchStr(advanceStr);
|
||||
// } else {
|
||||
// page.setAdvanceSearchStr(null);
|
||||
// }
|
||||
// }
|
||||
// page.setOrderBy("SAR_BUSSIONESS_STAND.issue_time desc nulls last,SAR_BUSSIONESS_STAND.id");
|
||||
// List<String> getMenuIdList = tsUserService.getResourceId(new TsResource());
|
||||
//// List<String> getMenuIdList = iTsResourceService.queryRoleMenuIdList("BUSINESS_STAND",page.getMenuId());
|
||||
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
// page.setMenuRoleList(getMenuIdList);
|
||||
// } else {
|
||||
// page.setMenuRoleList(null);
|
||||
// }
|
||||
// List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
// if (ids != null && !ids.isEmpty()) {
|
||||
// page.setMenuAllChildrenIdList(ids);
|
||||
// }
|
||||
// List<SarBussionessStand> rows = sarBussionessStandEOService.getSarBussionStandPage(page);
|
||||
// return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
private void nowOrderFunc(SarBussionessStandEOPage page) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderByA("tmp_tb.issue_time");//发布日期
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderByA("tmp_tb.put_time");//实施日期
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderByA("tmp_tb.standStatusShow");//文本状态
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
break;
|
||||
}
|
||||
if (null != page.getNowOrder()) {
|
||||
switch (page.getNowOrder()) {
|
||||
case 1:
|
||||
page.setOrder1("desc");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
break;
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+35
@@ -278,11 +278,46 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}else {
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
|
||||
if (null != page.getNowOrderBy()) {
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
|
||||
List<SarBussionessStand> getList = sarBussionessStandEODao.getSarBussionessStand(page);
|
||||
attrInfoShowExport(getList);
|
||||
return getList;
|
||||
}
|
||||
|
||||
private void nowOrderFunc(SarBussionessStandEOPage page) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderByA("tmp_tb.issue_time");//发布日期
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderByA("tmp_tb.put_time");//实施日期
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderByA("tmp_tb.standStatusShow");//文本状态
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
break;
|
||||
}
|
||||
if (null != page.getNowOrder()) {
|
||||
switch (page.getNowOrder()) {
|
||||
case 1:
|
||||
page.setOrder1("desc");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
break;
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShow (List<SarBussionessStand> sarlist) throws Exception {
|
||||
for(SarBussionessStand row : sarlist){
|
||||
attrInfoDetails(row);
|
||||
|
||||
+2
-2
@@ -82,8 +82,8 @@ public class TsInstitutionController extends BaseController<TsInstitution> {
|
||||
|
||||
@ApiOperation("获得下一级的部门和人员")
|
||||
@GetMapping("/getNext")
|
||||
public List<TsInstitution> getNext(String institutionId){
|
||||
return tsInstitutionService.getNext(institutionId);
|
||||
public List<TsInstitution> getNext(String institutionId,String userName){
|
||||
return tsInstitutionService.getNext(institutionId,userName);
|
||||
}
|
||||
|
||||
@ApiOperation("获得第一级部门目录")
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface TsInstitutionDao extends BaseMapper<TsInstitution> {
|
||||
* 根据部门id查询此部门的子一级人员
|
||||
* @return
|
||||
*/
|
||||
List<TsInstitution> selectNextUser(String institutionId);
|
||||
List<TsInstitution> selectNextUser(@Param("institutionId") String institutionId,@Param("userName") String userName);
|
||||
|
||||
|
||||
List<TsInstitution> selectTreeByIds(@Param("rootIds") List<String> rootIds);
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public interface ITsInstitutionService extends IService<TsInstitution> {
|
||||
* @param institutionId
|
||||
* @return
|
||||
*/
|
||||
public List<TsInstitution> getNext(String institutionId);
|
||||
public List<TsInstitution> getNext(String institutionId,String userName);
|
||||
|
||||
/**
|
||||
* 获得第一级的部门
|
||||
|
||||
+2
-2
@@ -204,9 +204,9 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
|
||||
* 通过部门id获得这个部门下的下一级部门
|
||||
* @return
|
||||
*/
|
||||
public List<TsInstitution> getNext(String institutionId){
|
||||
public List<TsInstitution> getNext(String institutionId,String userName){
|
||||
List<TsInstitution> tsInstitutions = tsInstitutionDao.selectNextInstitution(institutionId);
|
||||
List<TsInstitution> tsUsers=tsInstitutionDao.selectNextUser(institutionId);
|
||||
List<TsInstitution> tsUsers=tsInstitutionDao.selectNextUser(institutionId,userName);
|
||||
|
||||
|
||||
for(TsInstitution tsInstitution:tsInstitutions){
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.adc.da.slrs.sarIssueTrack.controller;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarIssueTrack.entity.IssueTrack;
|
||||
import com.adc.da.slrs.sarIssueTrack.entity.IssueTrackVo;
|
||||
import com.adc.da.slrs.sarIssueTrack.service.IIssueTrackService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@RestController
|
||||
@Api(tags = "重点标准跟踪清单")
|
||||
@RequestMapping("/api/sarIssueTrack/issueTrack")
|
||||
public class IssueTrackController {
|
||||
|
||||
@Autowired
|
||||
private IIssueTrackService issueTrackService;
|
||||
|
||||
@PutMapping()
|
||||
@ApiOperation("新增重点标准跟踪清单项目")
|
||||
public ResponseMessage addIssueTrack(@RequestBody IssueTrack issueTrack){
|
||||
boolean b = issueTrackService.addIssueTrack(issueTrack);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除重点标准跟踪清单项目")
|
||||
public ResponseMessage removeIssueTrack(@RequestParam(value="selectedString") String idList){
|
||||
|
||||
List<String> stringList = Arrays.asList(idList.split(","));
|
||||
boolean b = issueTrackService.removeIssueTrack(stringList);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询重点标准跟踪清单")
|
||||
public ResponseMessage<List<IssueTrack>> getIssueTrack(IssueTrackVo wrapper){
|
||||
List<IssueTrack> issueTrack = issueTrackService.getIssueTrack(wrapper);
|
||||
return Result.success(issueTrack);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("更新重点标准跟踪清单项目")
|
||||
public ResponseMessage updateIssueTrack(@RequestBody IssueTrack issueTrack){
|
||||
boolean b = issueTrackService.updateIssueTrack(issueTrack);
|
||||
return Result.success(b);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.adc.da.slrs.sarIssueTrack.dao;
|
||||
|
||||
import com.adc.da.slrs.sarIssueTrack.entity.IssueTrack;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
public interface IssueTrackDao extends BaseMapper<IssueTrack> {
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.adc.da.slrs.sarIssueTrack.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
@TableName("issue_track")
|
||||
public class IssueTrack {
|
||||
|
||||
@TableField("id")
|
||||
private String id;
|
||||
|
||||
@TableField("law_id")
|
||||
private String lawId;
|
||||
|
||||
@TableField("law_name")
|
||||
private String lawName;
|
||||
|
||||
@TableField("product_type")
|
||||
private String productType;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
@TableField("impl_time")
|
||||
private Date implTime;
|
||||
|
||||
@TableField("impl_require")
|
||||
private String implRequire;
|
||||
|
||||
@TableLogic(value = "0",delval = "1")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.adc.da.slrs.sarIssueTrack.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class IssueTrackVo extends IssueTrack {
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.adc.da.slrs.sarIssueTrack.service;
|
||||
|
||||
import com.adc.da.slrs.sarIssueTrack.entity.IssueTrack;
|
||||
import com.adc.da.slrs.sarIssueTrack.entity.IssueTrackVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IIssueTrackService {
|
||||
|
||||
public boolean addIssueTrack(IssueTrack obj);
|
||||
|
||||
public boolean removeIssueTrack(List<String> idList);
|
||||
|
||||
public List<IssueTrack> getIssueTrack(IssueTrackVo objVo);
|
||||
|
||||
public boolean updateIssueTrack(IssueTrack obj);
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.adc.da.slrs.sarIssueTrack.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarIssueTrack.dao.IssueTrackDao;
|
||||
import com.adc.da.slrs.sarIssueTrack.entity.IssueTrack;
|
||||
import com.adc.da.slrs.sarIssueTrack.entity.IssueTrackVo;
|
||||
import com.adc.da.slrs.sarIssueTrack.service.IIssueTrackService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class IssueTrackServiceImpl extends ServiceImpl<IssueTrackDao, IssueTrack> implements IIssueTrackService {
|
||||
@Override
|
||||
public boolean addIssueTrack(IssueTrack obj) {
|
||||
obj.setId(UUIDUtils.randomUUID20());
|
||||
obj.setDelFlag("0");
|
||||
return this.save(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeIssueTrack(List<String> idList) {
|
||||
return removeByIds(idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IssueTrack> getIssueTrack(IssueTrackVo objVo) {
|
||||
List<IssueTrack> result=new ArrayList<>();
|
||||
if (objVo==null){
|
||||
result=this.list();
|
||||
}else {
|
||||
QueryWrapper<IssueTrack> wrapper = new QueryWrapper<>();
|
||||
|
||||
if (objVo.getLawId()!=null){
|
||||
wrapper.like("law_id",objVo.getLawId());
|
||||
}
|
||||
if (objVo.getLawName()!=null){
|
||||
wrapper.like("law_name",objVo.getLawName());
|
||||
}
|
||||
if (objVo.getProductType()!=null){
|
||||
wrapper.like("product_type",objVo.getProductType());
|
||||
}
|
||||
|
||||
result=list(wrapper);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateIssueTrack(IssueTrack obj) {
|
||||
|
||||
return this.updateById(obj);
|
||||
}
|
||||
}
|
||||
+35
-1
@@ -1,12 +1,22 @@
|
||||
package com.adc.da.slrs.sarLawsFile.controller;
|
||||
|
||||
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarLawsFile.service.ISarLawsFileService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarLawsFile.entity.SarLawsFile;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
@@ -17,7 +27,31 @@ import com.adc.da.base.web.BaseController;
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarLawsFile|")
|
||||
@RequestMapping("/sarLawsFile/sar-laws-file")
|
||||
@RequestMapping("/${restPath}/lawss/sarLawsFile")
|
||||
public class SarLawsFileController extends BaseController<SarLawsFile> {
|
||||
@Autowired
|
||||
private IAttFileEOService attFileEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarLawsFileService iSarLawsFileService;
|
||||
|
||||
@ApiOperation(value = "|SarBussStandFileEO|查询转换后的文档详情")
|
||||
@GetMapping("/queryConvertAtt")
|
||||
/*@RequiresPermissions("lawss:sarLawsFile:list")*/
|
||||
public ResponseMessage<SarLawsFile> queryConvertAtt(String attId) throws Exception {
|
||||
List<SarLawsFile> getList = iSarLawsFileService.selectFileByAttId(attId);
|
||||
SarLawsFile sarBussStandFileEO = new SarLawsFile();
|
||||
if(getList != null && !getList.isEmpty()){
|
||||
sarBussStandFileEO = getList.get(0);
|
||||
AttFileEO attFileEO = attFileEOService.getFileInfo(attId);
|
||||
if(attFileEO != null){
|
||||
sarBussStandFileEO.setFileOldName(attFileEO.getOldFileName());
|
||||
}
|
||||
// readStandOrLawsLogService.sendReadSOLLog("BUSS",sarBussStandFileEO);
|
||||
return Result.success(sarBussStandFileEO);
|
||||
} else {
|
||||
return Result.success(null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.adc.da.slrs.sarLawsFile.service;
|
||||
import com.adc.da.slrs.sarLawsFile.entity.SarLawsFile;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
@@ -13,4 +15,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface ISarLawsFileService extends IService<SarLawsFile> {
|
||||
|
||||
List<SarLawsFile> selectFileByAttId(String attId) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
+6
@@ -6,6 +6,8 @@ import com.adc.da.slrs.sarLawsFile.service.ISarLawsFileService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
@@ -17,4 +19,8 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class SarLawsFileServiceImpl extends ServiceImpl<SarLawsFileDao, SarLawsFile> implements ISarLawsFileService {
|
||||
|
||||
@Override
|
||||
public List<SarLawsFile> selectFileByAttId(String attId) throws Exception{
|
||||
return this.baseMapper.selectFileByAttId(attId);
|
||||
}
|
||||
}
|
||||
|
||||
+37
-49
@@ -77,22 +77,13 @@ public class SarLawsStandInfoController extends BaseController<SarLawsStandInfo>
|
||||
if (null != page.getNowOrderBy()) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderByA("a.issueTime");//发布日期
|
||||
page.setOrderByA("SAR_LAWS_STAND_INFO.ISSUE_TIME");//发布日期
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderByA("SAR_LAWS_ATTR_INFO.XCXSSRQLAWS");//新车型实施日期
|
||||
page.setOrderByA("XCXSSRQLAWS");
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderByA("SAR_LAWS_ATTR_INFO.ZCXSSRQLAWS");//在产车实施日期
|
||||
break;
|
||||
case 4:
|
||||
page.setOrderByA("a.LAWS_TEXT_STATE");//文本状态
|
||||
break;
|
||||
case 5:
|
||||
page.setOrderByA("paixu");
|
||||
break;
|
||||
case 6:
|
||||
page.setOrderByA("SAR_LAWS_ATTR_INFO.SSRQ");
|
||||
page.setOrderByA("standStatusShow");//文本状态
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
@@ -105,6 +96,7 @@ public class SarLawsStandInfoController extends BaseController<SarLawsStandInfo>
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
break;
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
@@ -131,44 +123,10 @@ public class SarLawsStandInfoController extends BaseController<SarLawsStandInfo>
|
||||
@GetMapping("/pageLaws")
|
||||
/*@RequiresPermissions("lawss:sarLawsInfo:page")*/
|
||||
public ResponseMessage<PageInfo<SarLawsStandInfo>> pageLaws(SarLawsStandInfoPage page) throws Exception {
|
||||
if (null != page.getNowOrderBy()) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderByA("a.issueTime");//发布日期
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderByA("SAR_LAWS_ATTR_INFO.XCXSSRQLAWS");//新车型实施日期
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderByA("SAR_LAWS_ATTR_INFO.ZCXSSRQLAWS");//在产车实施日期
|
||||
break;
|
||||
case 4:
|
||||
page.setOrderByA("a.LAWS_TEXT_STATE");//文本状态
|
||||
break;
|
||||
case 5:
|
||||
page.setOrderByA("paixu");
|
||||
break;
|
||||
case 6:
|
||||
page.setOrderByA("SAR_LAWS_ATTR_INFO.SSRQ");
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
break;
|
||||
}
|
||||
if (null != page.getNowOrder()) {
|
||||
switch (page.getNowOrder()) {
|
||||
case 1:
|
||||
page.setOrder1("desc");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (null != page.getNowOrderBy()) {
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
|
||||
if (com.adc.da.util.utils.StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
@@ -184,6 +142,36 @@ public class SarLawsStandInfoController extends BaseController<SarLawsStandInfo>
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
private void nowOrderFunc(SarLawsStandInfoPage page) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderByA("SAR_LAWS_STAND_INFO.ISSUE_TIME");//发布日期
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderByA("XCXSSRQLAWS");//实施日期
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderByA("standStatusShow");//文本状态
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
break;
|
||||
}
|
||||
if (null != page.getNowOrder()) {
|
||||
switch (page.getNowOrder()) {
|
||||
case 1:
|
||||
page.setOrder1("desc");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
break;
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarLawsStandInfo|详情")
|
||||
@GetMapping("/getStandInfoById")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:get")
|
||||
|
||||
+2
-2
@@ -268,10 +268,10 @@ public class SarLawsStandInfoPage extends BasePage {
|
||||
@TableField(exist = false)
|
||||
private Integer nowOrderBy;
|
||||
@TableField(exist = false)
|
||||
private String orderByA = "a.issue_time";
|
||||
private String orderByA = "";
|
||||
@TableField(exist = false)
|
||||
private String orderBy1 = "SAR_LAWS_STAND_INFO.issue_time";
|
||||
@TableField(exist = false)
|
||||
private String order1 = "desc";
|
||||
private String order1 = "";
|
||||
|
||||
}
|
||||
|
||||
+35
@@ -436,11 +436,46 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}else {
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
|
||||
if (null != page.getNowOrderBy()) {
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
|
||||
List<SarLawsStandInfo> rows = this.baseMapper.getSarStandardsExportInfo(page);
|
||||
attrInfoShowExport(rows);
|
||||
return rows;
|
||||
}
|
||||
|
||||
private void nowOrderFunc(SarLawsStandInfoPage page) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderByA("SAR_LAWS_STAND_INFO.ISSUE_TIME");//发布日期
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderByA("XCXSSRQLAWS");//实施日期
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderByA("standStatusShow");//文本状态
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
break;
|
||||
}
|
||||
if (null != page.getNowOrder()) {
|
||||
switch (page.getNowOrder()) {
|
||||
case 1:
|
||||
page.setOrder1("desc");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
break;
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShow (List<SarLawsStandInfo> sarlist) throws Exception {
|
||||
for(SarLawsStandInfo row : sarlist){
|
||||
attrInfoDetails(row);
|
||||
|
||||
+7
@@ -61,6 +61,13 @@ public class TsResourceController extends BaseController<TsResource> {
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@ApiOperation("查询有权限资源")
|
||||
@GetMapping("/getListStand")
|
||||
public ResponseMessage<List<TsResource>> getListStand(TsResource tsResource){
|
||||
List<TsResource> tsResources=tsResourceService.getListStand(tsResource);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
// @ApiOperation("查询所有资源")
|
||||
// @GetMapping("/getDefault")
|
||||
// public ResponseMessage<List<TsResource>> getDefault(){
|
||||
|
||||
@@ -36,6 +36,8 @@ public interface ITsResourceService extends IService<TsResource> {
|
||||
|
||||
List<TsResource> getList(TsResource tsResource);
|
||||
|
||||
List<TsResource> getListStand(TsResource tsResource);
|
||||
|
||||
List<String> getDefaultByName();
|
||||
|
||||
ResponseMessage<Object> addResource(TsResource tsResource);
|
||||
|
||||
+46
-20
@@ -17,10 +17,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -184,8 +182,15 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
tsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
TsResources=dao.selectList(tsResourceQueryWrapper);
|
||||
|
||||
for(TsResource TsResource:TsResources){
|
||||
TsResource.setChildren(recursionGetListChildren((tsResource.getSorDivide()),(TsResource),(getMenuIdList)));
|
||||
for(TsResource resource:TsResources){
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.like("PARENT_IDS",resource.getId());
|
||||
if(StringUtils.isNotBlank(tsResource.getSorDivide())){
|
||||
TsResourceQueryWrapper.in("ID",getMenuIdList);
|
||||
}
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
resource.setChildren(recursionGetListChildrenStand((resource),(children)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,6 +198,33 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
return TsResources;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询有权限菜单
|
||||
* @param tsResource
|
||||
*/
|
||||
@Override
|
||||
public List<TsResource> getListStand(TsResource tsResource) {
|
||||
List<TsResource> TsResources = new ArrayList<>();
|
||||
|
||||
QueryWrapper<TsResource> queryWrapper =new QueryWrapper<>();
|
||||
if(tsResource.getSorDivide()!=null){
|
||||
queryWrapper.eq("sor_divide",tsResource.getSorDivide());
|
||||
}
|
||||
queryWrapper.isNull("PARENT_ID");
|
||||
queryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
TsResources=dao.selectList(queryWrapper);
|
||||
|
||||
for(TsResource resource:TsResources){
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.like("PARENT_IDS",resource.getId());
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
resource.setChildren(recursionGetListChildrenStand((resource),(children)));
|
||||
}
|
||||
|
||||
return TsResources;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getDefaultByName() {
|
||||
List<String> menusNames=new ArrayList<>();
|
||||
@@ -288,23 +320,17 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
|
||||
/**
|
||||
* 递归调用获取子节点
|
||||
* @param parent:父节点
|
||||
* @return List<TsResource>
|
||||
*/
|
||||
private List<TsResource> recursionGetListChildren(String sorDivide,TsResource parent,List<String> getMenuIdList){
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.eq("PARENT_ID",parent.getId());
|
||||
if(StringUtils.isNotBlank(sorDivide)){
|
||||
if(!sorDivide.equals("INLAND_STAND") && !sorDivide.equals("FOREIGN_STAND")){
|
||||
TsResourceQueryWrapper.in("ID",getMenuIdList);
|
||||
}
|
||||
private List<TsResource> recursionGetListChildrenStand(TsResource resource,List<TsResource> children){
|
||||
List<TsResource> tsResources = children.stream().filter(resource1 -> resource1.getParentId().equals(resource.getId())).collect(Collectors.toList());
|
||||
if(!tsResources.isEmpty()){
|
||||
tsResources = tsResources.stream().sorted(Comparator.comparing(resource1 -> resource1.getDisplaySeq())).collect(Collectors.toList());
|
||||
tsResources.forEach(resource1 -> {
|
||||
resource1.setChildren(recursionGetListChildrenStand((resource1),(children)));
|
||||
});
|
||||
}
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
for(TsResource TsResource:children){
|
||||
TsResource.setChildren(recursionGetListChildren((sorDivide),(TsResource),(getMenuIdList)));
|
||||
}
|
||||
return children;
|
||||
return tsResources;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
@@ -54,6 +54,12 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
return Result.success("200",map);
|
||||
}
|
||||
|
||||
@GetMapping("/solostar")
|
||||
@ApiOperation("车型/项目库")
|
||||
public ResponseMessage queryMaintenanceProjectsolostar() {
|
||||
return Result.success("200",sarStandProjectLibraryService.solostar());
|
||||
}
|
||||
|
||||
@GetMapping("/queryProjectConfirm")
|
||||
@ApiOperation("车型/项目库-清单标准确认流程用")
|
||||
public ResponseMessage queryMaintenanceProjectConfirm(@RequestParam(defaultValue = "1", value = "Page")int Page, @RequestParam(defaultValue = "10", value = "PageSize") int PageSize,SarStandProjectLibraryDto sarDto) {
|
||||
|
||||
+2
@@ -21,8 +21,10 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
|
||||
void deleteByIds(@Param("ids") List<StandProjectRelationDto> ids);
|
||||
void batchInsert(@Param("list") List<StandProjectRelationDto> list);
|
||||
List<SarStandProjectLibrary> selectPages(@Param("page")Integer page, @Param("size")Integer size,@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
|
||||
List<String> selectPagessolostar(@Param("flag")int flag,@Param("type")String type);
|
||||
Integer selectCount(@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
|
||||
List<SarStandProjectLibrary> selectPagesWorkFlow(@Param("page")Integer page, @Param("size")Integer size,@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
|
||||
List<String> selectPagesWorkFlowsolostar(@Param("flag")int flag,@Param("type")String type);
|
||||
Integer selectCountWorkFlow(@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
|
||||
List<String> getAllStands();
|
||||
List<String> getAllStand();
|
||||
|
||||
+4
@@ -6,12 +6,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface SarStandProjectLibraryService {
|
||||
IPage<SarStandProjectLibrary> queryMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
||||
List<String> queryMaintenanceProjectsolostar(String type);
|
||||
IPage<SarStandProjectLibrary> queryMaintenanceProjectWorkFlow(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
||||
IPage<SarStandProjectLibrary> queryMaintenanceProjectConfirm(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
||||
IPage<SarStandProjectLibrary> queryNotMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
||||
List<String> queryNotMaintenanceProjectsolostar(String type);
|
||||
Map<String, Object> solostar();
|
||||
List<SarStandProjectLibrary> queryById(String id);
|
||||
IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize);
|
||||
List<SarStandProjectLibrary> queryByProductLine(String productLine);
|
||||
|
||||
+48
-4
@@ -152,6 +152,12 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
int flag=2;
|
||||
return getSarStandProjectLibraryIPage(current, pageSize, sar,flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> queryMaintenanceProjectsolostar(String type) {
|
||||
int flag=2;
|
||||
return getSarStandProjectLibraryIPagesolostar(flag,type);
|
||||
}
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryMaintenanceProjectWorkFlow(int current, int pageSize,
|
||||
SarStandProjectLibraryDto sarDto) {
|
||||
@@ -240,6 +246,12 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
int flag=1;
|
||||
return getSarStandProjectLibraryIPage(current, pageSize, sar,flag);
|
||||
}
|
||||
@Override
|
||||
public List<String> queryNotMaintenanceProjectsolostar(String type) {
|
||||
int flag=1;
|
||||
return getSarStandProjectLibraryIPagesolostar(flag,type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandProjectLibrary> queryById(String id) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
@@ -295,8 +307,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
if (ids.isEmpty()) {
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'");
|
||||
}else {
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'" +
|
||||
"and r.STAND_ID in (" + id.substring(0, id.length() - 1) + ")");
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'" );
|
||||
// "and r.STAND_ID in (" + id.substring(0, id.length() - 1) + ")");
|
||||
}
|
||||
Page<SarStandardsInfo> page1 = new Page<>(current, pageSize);
|
||||
IPage<SarStandardsInfo> userIPage1 = SarStandardsInfoDao.selectPage(page1, wrapper1);
|
||||
@@ -308,8 +320,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
if (ids.isEmpty()){
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='"+ standId+"'");
|
||||
}else {
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='" + standId + "' " +
|
||||
"and r.STAND_ID in (" + id.substring(0,id.length()-1) + ")");
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='" + standId + "' " );
|
||||
// "and r.STAND_ID in (" + id.substring(0,id.length()-1) + ")");
|
||||
}
|
||||
Page<SarStandAttrInfo> page2 = new Page<>(current, pageSize);
|
||||
IPage<SarStandAttrInfo> userIPage2 = sarStandAttrInfoDao.selectPage(page2, wrapper2);
|
||||
@@ -457,4 +469,36 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
return userIPage;
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> getSarStandProjectLibraryIPagesolostar(int flag,String type) {
|
||||
if (3!=flag) {
|
||||
List<String> sarStandProjectLibraries = sarStandProjectLibraryDao.selectPagessolostar(flag,type);
|
||||
return sarStandProjectLibraries;
|
||||
}
|
||||
else {
|
||||
flag=2;
|
||||
List<String> sarStandProjectLibraries = sarStandProjectLibraryDao.selectPagesWorkFlowsolostar(flag,type);
|
||||
return sarStandProjectLibraries;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> solostar() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
List<String> MaintenanceProjectClassification;
|
||||
List<String> MaintenanceProjectStatus;
|
||||
List<String> notMaintenanceProjectClassification;
|
||||
List<String> notMaintenanceProjectStatus;
|
||||
MaintenanceProjectClassification = this.queryMaintenanceProjectsolostar("ProjectClassification");
|
||||
MaintenanceProjectStatus = this.queryMaintenanceProjectsolostar("ProjectStatus");
|
||||
notMaintenanceProjectClassification = this.queryNotMaintenanceProjectsolostar("ProjectClassification");
|
||||
notMaintenanceProjectStatus = this.queryMaintenanceProjectsolostar("ProjectStatus");
|
||||
map.put("MaintenanceProjectClassification",MaintenanceProjectClassification);
|
||||
map.put("MaintenanceProjectStatus",MaintenanceProjectStatus);
|
||||
map.put("notMaintenanceProjectClassification",notMaintenanceProjectClassification);
|
||||
map.put("notMaintenanceProjectStatus",notMaintenanceProjectStatus);
|
||||
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.controller;
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssueVo;
|
||||
import com.adc.da.slrs.sarStandUnqualified.service.IBusinessDeptIssueService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("/api/sarStandUnqualified/businessDeptIssue")
|
||||
@Api(tags = "事业部重点问题")
|
||||
public class BusinessDeptIssueController extends BaseController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private IBusinessDeptIssueService iBusinessDeptIssueService;
|
||||
|
||||
@PutMapping()
|
||||
@ApiOperation("新增事业部重点问题")
|
||||
public ResponseMessage addBussDeptIssue(@RequestBody BusinessDeptIssue issue){
|
||||
boolean b = iBusinessDeptIssueService.addBusinessDeptIssue(issue);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除事业部重点问题")
|
||||
public ResponseMessage removeBussDeptIssue(@RequestParam(value="selectedString") String idList){
|
||||
List<String> stringList = Arrays.asList(idList.split(","));
|
||||
boolean b = iBusinessDeptIssueService.removeBusinessDeptIssue(stringList);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询事业部重点问题")
|
||||
public ResponseMessage<IPage<BusinessDeptIssue>> getBussDeptIssue(BusinessDeptIssueVo pageVo){
|
||||
IPage<BusinessDeptIssue> page = iBusinessDeptIssueService.getBusinessDeptIssue(pageVo);
|
||||
|
||||
|
||||
return Result.success(page);
|
||||
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("更新事业部重点问题")
|
||||
public ResponseMessage updateBussDeptIssue(@RequestBody BusinessDeptIssue issue){
|
||||
boolean b = iBusinessDeptIssueService.updateBusinessDeptIssue(issue);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
@PostMapping("/closeIssue")
|
||||
@ApiOperation("批量关闭事业部重点问题")
|
||||
public ResponseMessage closeBusinessIssue(@RequestParam(value="ids")String idList){
|
||||
List<String> stringList = Arrays.asList(idList.split(","));
|
||||
boolean b = iBusinessDeptIssueService.closeBusinessDeptIssue(stringList);
|
||||
return Result.success(b);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/exportIssue")
|
||||
@ApiOperation("导出事业部重点问题")
|
||||
public void exportIssue(HttpServletResponse response,BusinessDeptIssueVo issue) throws IOException {
|
||||
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
|
||||
|
||||
//TODO
|
||||
try {
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
|
||||
|
||||
if(issue.getFileName()==null || issue.getFileName()==""){
|
||||
issue.setFileName("事业部重点问题信息");
|
||||
}
|
||||
String fileName = URLEncoder.encode(issue.getFileName(), "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
|
||||
|
||||
/**
|
||||
* 重写了get方法,无法使用net.sf.json.JSONObject转换对象
|
||||
*/
|
||||
// net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(issue.getExportContent());
|
||||
// BusinessDeptIssueVo businessDeptIssueVo = (BusinessDeptIssueVo) net.sf.json.JSONObject.toBean(jsonObject, BusinessDeptIssueVo.class);
|
||||
|
||||
JSONObject jsonObject = JSONObject.parseObject(issue.getExportContent());
|
||||
BusinessDeptIssueVo businessDeptIssueVo = JSONObject.toJavaObject(jsonObject, BusinessDeptIssueVo.class);
|
||||
IPage<BusinessDeptIssue> page = iBusinessDeptIssueService.getBusinessDeptIssue(businessDeptIssueVo);
|
||||
|
||||
|
||||
// 这里需要设置不关闭流
|
||||
EasyExcel.write(response.getOutputStream(), BusinessDeptIssue.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(page.getRecords());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
// 重置response
|
||||
response.reset();
|
||||
response.setContentType("application/json");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.getWriter().println(JSONObject.toJSONString(Result.error()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
public class KeyIssueManagementController {
|
||||
//TODO zky
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.controller;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssueVo;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssueVo;
|
||||
import com.adc.da.slrs.sarStandUnqualified.service.IBusinessDeptIssueService;
|
||||
import com.adc.da.slrs.sarStandUnqualified.service.IProductDeptIssueService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/api/sarStandUnqualified/productDeptIssue")
|
||||
@Api(tags = "产品规划部重点问题项管控")
|
||||
public class ProductDeptIssueController {
|
||||
|
||||
@Autowired
|
||||
private IProductDeptIssueService iProductDeptIssueService;
|
||||
|
||||
@PutMapping()
|
||||
@ApiOperation("新增产品规划部重点问题")
|
||||
public ResponseMessage addProductDeptIssue(@RequestBody ProductDeptIssue issue){
|
||||
boolean b = iProductDeptIssueService.addProductDeptIssue(issue);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除产品规划部重点问题")
|
||||
public ResponseMessage removeProductDeptIssue(@RequestParam(value="selectedString") String idList){
|
||||
|
||||
List<String> stringList = Arrays.asList(idList.split(","));
|
||||
boolean b = iProductDeptIssueService.removeProductDeptIssue(stringList);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询产品规划部重点问题")
|
||||
public ResponseMessage<IPage<ProductDeptIssue>> getProductDeptIssue(@RequestParam ProductDeptIssueVo wrapper){
|
||||
IPage<ProductDeptIssue> issueList = iProductDeptIssueService.getProductDeptIssue(wrapper);
|
||||
return Result.success(issueList);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("更新产品规划部重点问题")
|
||||
public ResponseMessage updateProductDeptIssue(@RequestBody ProductDeptIssue issue){
|
||||
boolean b = iProductDeptIssueService.updateProductDeptIssue(issue);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/closeProductIssue")
|
||||
@ApiOperation("关闭产品规划部重点问题")
|
||||
public ResponseMessage closeProductDeptIssue(String idList){
|
||||
List<String> stringList = Arrays.asList(idList.split(","));
|
||||
boolean b = iProductDeptIssueService.closeProductDeptIssue(stringList);
|
||||
|
||||
return Result.success(b);
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.dao;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssue;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@Mapper
|
||||
public interface BusinessDeptIssueDao extends BaseMapper<BusinessDeptIssue> {
|
||||
|
||||
IPage<BusinessDeptIssue> findPage(IPage<BusinessDeptIssue> page, @Param(Constants.WRAPPER) QueryWrapper<BusinessDeptIssue> queryWrapper);
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssue;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface ProductDeptIssueDao extends BaseMapper<ProductDeptIssue> {
|
||||
|
||||
public IPage<ProductDeptIssue> findPage(IPage<ProductDeptIssue> page,@Param(Constants.WRAPPER) QueryWrapper<ProductDeptIssue> wrapper);
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.entity;
|
||||
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("business_dept_issue")
|
||||
public class BusinessDeptIssue {
|
||||
|
||||
|
||||
@ExcelIgnore
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField("law_id")
|
||||
private String lawId;
|
||||
|
||||
@ExcelProperty("标准号")
|
||||
@TableField(exist = false)
|
||||
private String lawNumber;
|
||||
|
||||
@ExcelProperty("标准名称")
|
||||
@TableField(exist = false)
|
||||
private String lawName;
|
||||
|
||||
@ExcelProperty("产品类别")
|
||||
@TableField("product_type")
|
||||
private String productType;
|
||||
|
||||
@ExcelProperty("实施实践")
|
||||
@TableField("impl_time")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
private Date implTime;
|
||||
|
||||
@ExcelProperty("实施要求")
|
||||
@TableField("impl_require")
|
||||
private String implRequire;
|
||||
|
||||
@ExcelProperty("资源符合状态")
|
||||
@TableField("conform_situation")
|
||||
private String conformSituation;
|
||||
|
||||
@ExcelProperty("开发情况")
|
||||
@TableField("dev_scheme")
|
||||
private String devScheme;
|
||||
|
||||
@ExcelProperty("sop时间")
|
||||
@TableField("sop_time")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
private Date sopTime;
|
||||
|
||||
@ExcelProperty("完成情况")
|
||||
@TableField("complete_situation")
|
||||
private String completeSituation;
|
||||
|
||||
@ExcelProperty("超出sop时限后计划")
|
||||
@TableField("timeout_situation")
|
||||
private String timeoutSituation;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableLogic(value = "0",delval = "1")
|
||||
private String delFlag;
|
||||
|
||||
@ExcelProperty("责任部门")
|
||||
@TableField("response_dept")
|
||||
private String responseDept;
|
||||
|
||||
@ExcelProperty("责任人")
|
||||
@TableField("response_people")
|
||||
private String responsePeople;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField("is_close")
|
||||
private String isClose;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private Integer page;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private Integer pageSize;
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BusinessDeptIssueVo extends BusinessDeptIssue {
|
||||
|
||||
private String numberOrName;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private String idList;
|
||||
|
||||
private String exportContent;
|
||||
|
||||
public List<String> getIdList(){
|
||||
if (this.idList!=null){
|
||||
return Arrays.asList(this.idList.split(","));
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("product_dept_issue")
|
||||
public class ProductDeptIssue {
|
||||
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
@TableField("law_id")
|
||||
private String lawId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String lawsNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String lawsName;
|
||||
|
||||
@TableField("product_business")
|
||||
private String productBusiness;
|
||||
|
||||
@TableField("platform")
|
||||
private String platform;
|
||||
|
||||
@TableField("poj_name")
|
||||
private String pojName;
|
||||
|
||||
@TableField("poj_description")
|
||||
private String pojDescription;
|
||||
|
||||
@TableField("current_node")
|
||||
private String currentNode;
|
||||
|
||||
@TableField("conceptual_state")
|
||||
private String conceptualState;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
@TableField("scheduled_issuance_time")
|
||||
private Date scheduledIssuanceTime;
|
||||
|
||||
@TableField("revised_plan")
|
||||
private String revisedPlan;
|
||||
|
||||
@TableField("explanation")
|
||||
private String explanation;
|
||||
|
||||
@TableField("response_dept")
|
||||
private String responseDept;
|
||||
|
||||
@TableLogic(value = "0",delval = "1")
|
||||
private String delFlag;
|
||||
|
||||
@TableField("is_close")
|
||||
private String isClose;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer page;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.entity;
|
||||
|
||||
public class ProductDeptIssueVo extends ProductDeptIssue {
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.service;
|
||||
|
||||
import com.adc.da.slrs.sarIssueTrack.entity.IssueTrack;
|
||||
import com.adc.da.slrs.sarIssueTrack.entity.IssueTrackVo;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssueVo;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IBusinessDeptIssueService extends IService<BusinessDeptIssue> {
|
||||
|
||||
|
||||
public boolean addBusinessDeptIssue(BusinessDeptIssue obj);
|
||||
|
||||
public boolean removeBusinessDeptIssue(List<String> idList);
|
||||
|
||||
public IPage<BusinessDeptIssue> getBusinessDeptIssue(BusinessDeptIssueVo objVo);
|
||||
|
||||
public boolean updateBusinessDeptIssue(BusinessDeptIssue obj);
|
||||
|
||||
public boolean closeBusinessDeptIssue(List<String> idList);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssueVo;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IProductDeptIssueService {
|
||||
|
||||
|
||||
public boolean addProductDeptIssue(ProductDeptIssue obj);
|
||||
|
||||
public boolean removeProductDeptIssue(List<String> idList);
|
||||
|
||||
public IPage<ProductDeptIssue> getProductDeptIssue(ProductDeptIssueVo objVo);
|
||||
|
||||
public boolean updateProductDeptIssue(ProductDeptIssue obj);
|
||||
|
||||
public boolean closeProductDeptIssue(List<String> idList);
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandUnqualified.dao.BusinessDeptIssueDao;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssueVo;
|
||||
import com.adc.da.slrs.sarStandUnqualified.service.IBusinessDeptIssueService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class BusinessDeptIssueService extends ServiceImpl<BusinessDeptIssueDao, BusinessDeptIssue> implements IBusinessDeptIssueService {
|
||||
|
||||
@Autowired
|
||||
private BusinessDeptIssueDao businessDeptIssueDao;
|
||||
|
||||
@Override
|
||||
public boolean addBusinessDeptIssue(BusinessDeptIssue obj) {
|
||||
obj.setId(UUIDUtils.randomUUID20());
|
||||
obj.setDelFlag("0");
|
||||
return this.save(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeBusinessDeptIssue(List<String> idList) {
|
||||
return removeByIds(idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<BusinessDeptIssue> getBusinessDeptIssue(BusinessDeptIssueVo pageVo) {
|
||||
|
||||
IPage<BusinessDeptIssue> page = new Page<>();
|
||||
QueryWrapper<BusinessDeptIssue> wrapper = new QueryWrapper<>();
|
||||
//是否分页
|
||||
if (pageVo.getPage()!=null && pageVo.getPageSize()!=null){
|
||||
page=new Page<>(pageVo.getPage(),pageVo.getPageSize());
|
||||
|
||||
}else {
|
||||
Integer count = businessDeptIssueDao.selectCount(wrapper);
|
||||
page=new Page<>(0,count,false);
|
||||
}
|
||||
|
||||
|
||||
//查询条件
|
||||
if (pageVo.getIsClose()!=null){
|
||||
wrapper.like("is_close",pageVo.getIsClose());
|
||||
}
|
||||
|
||||
if (pageVo.getLawNumber()!=null || pageVo.getLawName()!=null){
|
||||
wrapper.like("laws.LAWS_NUMBER",pageVo.getLawNumber())
|
||||
.or()
|
||||
.like("laws.LAWS_NAME",pageVo.getLawName());
|
||||
}
|
||||
|
||||
if (pageVo.getProductType()!=null){
|
||||
wrapper.like("product_type",pageVo.getProductType());
|
||||
}
|
||||
|
||||
if (pageVo.getResponseDept()!=null){
|
||||
wrapper.like("response_dept",pageVo.getResponseDept());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*/
|
||||
if (pageVo.getIdList()!=null){
|
||||
wrapper.in("issue.ID",pageVo.getIdList());
|
||||
}
|
||||
|
||||
page = businessDeptIssueDao.findPage(page, wrapper);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateBusinessDeptIssue(BusinessDeptIssue obj) {
|
||||
return this.updateById(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean closeBusinessDeptIssue(List<String> idList){
|
||||
List<BusinessDeptIssue> collect = idList.stream()
|
||||
.map(item -> {
|
||||
BusinessDeptIssue businessDeptIssue = new BusinessDeptIssue();
|
||||
businessDeptIssue.setId(item);
|
||||
businessDeptIssue.setIsClose("1");
|
||||
return businessDeptIssue;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return this.updateBatchById(collect);
|
||||
}
|
||||
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandUnqualified.dao.ProductDeptIssueDao;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssueVo;
|
||||
import com.adc.da.slrs.sarStandUnqualified.service.IProductDeptIssueService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class ProductDeptIssueService extends ServiceImpl<ProductDeptIssueDao,ProductDeptIssue> implements IProductDeptIssueService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ProductDeptIssueDao productDeptIssueDao;
|
||||
|
||||
@Override
|
||||
public boolean addProductDeptIssue(ProductDeptIssue obj) {
|
||||
obj.setId(UUIDUtils.randomUUID20());
|
||||
obj.setDelFlag("0");
|
||||
return this.save(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeProductDeptIssue(List<String> idList) {
|
||||
return removeByIds(idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ProductDeptIssue> getProductDeptIssue(ProductDeptIssueVo objVo) {
|
||||
|
||||
IPage<ProductDeptIssue> page=new Page<>(objVo.getPage(),objVo.getPage());
|
||||
|
||||
QueryWrapper<ProductDeptIssue> wrapper = new QueryWrapper<>();
|
||||
|
||||
if (objVo.getLawsNumber()!=null){
|
||||
wrapper.like("laws.LAWS_NAME",objVo.getLawsName())
|
||||
.or()
|
||||
.like("laws.LAWS_NUMBER",objVo.getLawsNumber());
|
||||
}
|
||||
|
||||
if (objVo.getPojName()!=null){
|
||||
wrapper.like("poj_name",objVo.getPojName());
|
||||
}
|
||||
|
||||
if (objVo.getResponseDept()!=null){
|
||||
wrapper.like("response_dept",objVo.getResponseDept());
|
||||
}
|
||||
productDeptIssueDao.findPage(page,wrapper);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateProductDeptIssue(ProductDeptIssue obj) {
|
||||
|
||||
return this.updateById(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean closeProductDeptIssue(List<String> idList){
|
||||
|
||||
List<ProductDeptIssue> collect = idList.stream()
|
||||
.map(id -> {
|
||||
ProductDeptIssue productDeptIssue = new ProductDeptIssue();
|
||||
productDeptIssue.setId(id);
|
||||
productDeptIssue.setIsClose("1");
|
||||
return productDeptIssue;
|
||||
}).collect(Collectors.toList());
|
||||
return this.updateBatchById(collect);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+41
-72
@@ -92,46 +92,10 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
@GetMapping("/getSarStandardsInfoPage")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:getSarStandardsInfoPage")
|
||||
public ResponseMessage<PageInfo<SarStandardsInfo>> getSarStandardsInfoPage(SarStandardsInfoEOPage page,@RequestParam(defaultValue = "0") String mark) throws Exception {
|
||||
int isNull = -1;
|
||||
if (null != page.getNowOrderBy()) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderByA("issueTime");//发布日期
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderByA("SAR_STAND_ATTR_INFO.ZCCSSRQ");//新车型实施日期
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderByA("SAR_STAND_ATTR_INFO.XCXSSRQ");//在产车实施日期
|
||||
break;
|
||||
case 4:
|
||||
page.setOrderByA("SAR_STANDARDS_INFO.text_status");//文本状态
|
||||
break;
|
||||
case 5:
|
||||
page.setOrderByA("paixu");
|
||||
break;
|
||||
case 6:
|
||||
page.setOrderByA("SAR_STAND_ATTR_INFO.SSRQ");
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
break;
|
||||
}
|
||||
if (null != page.getNowOrder()) {
|
||||
switch (page.getNowOrder()) {
|
||||
case 1:
|
||||
page.setOrder1("desc");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
|
||||
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList);
|
||||
@@ -142,40 +106,6 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
// List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
// int i = 0;
|
||||
// for (SarAdvanceSearchVO sarAdvanceSearchVO:searchList){
|
||||
// if ("SVPPS".equals(sarAdvanceSearchVO.getField()) && StringUtils.isBlank(sarAdvanceSearchVO.getValue())){
|
||||
// isNull = i;
|
||||
// }
|
||||
// i++;
|
||||
// }
|
||||
// if (-1 != isNull) {
|
||||
// searchList.remove(isNull);
|
||||
// }
|
||||
// if (isNull == 0 && searchList.size() > 0){
|
||||
// searchList.get(0).setConnect("");
|
||||
// }
|
||||
// String advanceStr = SarAdvanceSearchUtil.createSql(searchList);
|
||||
// if (null != advanceStr) {
|
||||
// advanceStr = advanceStr.replace("stand_number", "concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',SAR_STANDARDS_INFO.STAND_YEAR)");
|
||||
// }
|
||||
// if (-1 != isNull && StringUtils.isBlank(advanceStr)){
|
||||
// advanceStr = advanceStr + " SVPPS is null";
|
||||
// }else if (-1 != isNull && StringUtils.isNotBlank(advanceStr)){
|
||||
// advanceStr = advanceStr + " and SVPPS is null";
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(advanceStr)) {
|
||||
// page.setAdvanceSearchStr(advanceStr);
|
||||
// } else {
|
||||
// page.setAdvanceSearchStr(null);
|
||||
// }
|
||||
// }
|
||||
if(page.getUserId() == null || page.getUserId().equals("")){
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
@@ -183,6 +113,45 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
private void nowOrderFunc(SarStandardsInfoEOPage page) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderByA("ISSUE_TIME");//发布日期
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderByA("ZCCSSRQ");//新车型实施日期
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderByA("XCXSSRQ");//在产车实施日期
|
||||
break;
|
||||
case 4:
|
||||
page.setOrderByA("standTextStatusShow");//文本状态
|
||||
break;
|
||||
case 5:
|
||||
page.setOrderByA("paixu");
|
||||
break;
|
||||
case 6:
|
||||
page.setOrderByA("SSRQ");
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
break;
|
||||
}
|
||||
if (null != page.getNowOrder()) {
|
||||
switch (page.getNowOrder()) {
|
||||
case 1:
|
||||
page.setOrder1("desc");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
break;
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|自定义分页查询")
|
||||
@GetMapping("/getSarStandardsInfoPageBak")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:getSarStandardsInfoPage")
|
||||
@@ -240,7 +209,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
// if(page.getUserId() == null || page.getUserId().equals("")){
|
||||
// page.setUserId(LoginUserUtil.getUserId());
|
||||
// }
|
||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPageBak(page);
|
||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPageBak1(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page);
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(@Param("page") SarStandardsInfoEOPage page,@Param("mark")String mark);
|
||||
|
||||
int getSarStandardsInfoCount(SarStandardsInfoEOPage page);
|
||||
|
||||
|
||||
+36
@@ -120,6 +120,10 @@ public class SarBussionessStandEOPage extends BasePage {
|
||||
private String paixu;
|
||||
private String shunxu;
|
||||
private String sql;
|
||||
private Integer nowOrder;
|
||||
private Integer nowOrderBy;
|
||||
private String orderByA = "";
|
||||
private String order1 = "";
|
||||
|
||||
// 新增字段
|
||||
private String FZRQBUSS;
|
||||
@@ -144,6 +148,38 @@ public class SarBussionessStandEOPage extends BasePage {
|
||||
private String GLWJBUSS;
|
||||
private String XCSJBUSS;
|
||||
|
||||
public Integer getNowOrder() {
|
||||
return nowOrder;
|
||||
}
|
||||
|
||||
public void setNowOrder(Integer nowOrder) {
|
||||
this.nowOrder = nowOrder;
|
||||
}
|
||||
|
||||
public Integer getNowOrderBy() {
|
||||
return nowOrderBy;
|
||||
}
|
||||
|
||||
public void setNowOrderBy(Integer nowOrderBy) {
|
||||
this.nowOrderBy = nowOrderBy;
|
||||
}
|
||||
|
||||
public String getOrderByA() {
|
||||
return orderByA;
|
||||
}
|
||||
|
||||
public void setOrderByA(String orderByA) {
|
||||
this.orderByA = orderByA;
|
||||
}
|
||||
|
||||
public String getOrder1() {
|
||||
return order1;
|
||||
}
|
||||
|
||||
public void setOrder1(String order1) {
|
||||
this.order1 = order1;
|
||||
}
|
||||
|
||||
public String getFZRQBUSS() {
|
||||
return FZRQBUSS;
|
||||
}
|
||||
|
||||
+2
-2
@@ -84,9 +84,9 @@ public class SarStandardsInfoEOPage extends BasePage {
|
||||
private String productId;
|
||||
private Integer nowOrder;
|
||||
private Integer nowOrderBy;
|
||||
private String orderByA = "a.issue_time";
|
||||
private String orderByA = "";
|
||||
private String orderBy1 = "SAR_STANDARDS_INFO.issue_time";
|
||||
private String order1 = "desc";
|
||||
private String order1 = "";
|
||||
|
||||
// zhaokaiyao
|
||||
private String textStatus;//文本状态
|
||||
|
||||
+2
@@ -23,6 +23,8 @@ public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPageBak(SarStandardsInfoEOPage page) throws Exception;
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPageBak1(SarStandardsInfoEOPage page) throws Exception;
|
||||
|
||||
void createSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
|
||||
|
||||
int updateSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
|
||||
|
||||
+86
-16
@@ -293,12 +293,12 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
// List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
// page.setMenuRoleList(getMenuIdList);
|
||||
// } else {
|
||||
// page.setMenuRoleList(null);
|
||||
// }
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
@@ -307,7 +307,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
Integer rowCount = dao.getSarStandardsInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page);
|
||||
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page,"0");
|
||||
attrInfoCollect(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
@@ -335,7 +335,35 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
Integer rowCount = dao.getSarStandardsInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page);
|
||||
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page,"999");
|
||||
attrInfo(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandardsInfo> getSarStandardsInfoPageBak1(SarStandardsInfoEOPage page) throws Exception {
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
qw.eq("ID",page.getMenuId());
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
Integer rowCount = dao.getSarStandardsInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page,"0");
|
||||
attrInfo(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
@@ -1508,7 +1536,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
standNum = getDelStandInfo.getStandSort() + " " + getDelStandInfo.getStandNumber();
|
||||
}
|
||||
sarStandardsInfoEOPage.setReplacedStandNum(standNum);
|
||||
List<SarStandardsInfo> getReplacedStands = dao.getSarStandardsInfoPage(sarStandardsInfoEOPage);
|
||||
List<SarStandardsInfo> getReplacedStands = dao.getSarStandardsInfoPage(sarStandardsInfoEOPage,"0");
|
||||
if (getReplacedStands != null && !getReplacedStands.isEmpty()) {
|
||||
for (SarStandardsInfo stand : getReplacedStands) {
|
||||
SarStandardsInfo newStand = new SarStandardsInfo();
|
||||
@@ -1558,12 +1586,12 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
// List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
// page.setMenuRoleList(getMenuIdList);
|
||||
// } else {
|
||||
// page.setMenuRoleList(null);
|
||||
// }
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
@@ -1585,11 +1613,53 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}else {
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
if (null != page.getNowOrderBy()) {
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
List<SarStandardsInfo> getList = dao.getSarStandardsExportInfo(page);
|
||||
attrInfoShowExport(getList);
|
||||
return getList;
|
||||
}
|
||||
|
||||
private void nowOrderFunc(SarStandardsInfoEOPage page) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderByA("ISSUE_TIME");//发布日期
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderByA("ZCCSSRQ");//新车型实施日期
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderByA("XCXSSRQ");//在产车实施日期
|
||||
break;
|
||||
case 4:
|
||||
page.setOrderByA("text_status");//文本状态
|
||||
break;
|
||||
case 5:
|
||||
page.setOrderByA("paixu");
|
||||
break;
|
||||
case 6:
|
||||
page.setOrderByA("SSRQ");
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
break;
|
||||
}
|
||||
if (null != page.getNowOrder()) {
|
||||
switch (page.getNowOrder()) {
|
||||
case 1:
|
||||
page.setOrder1("desc");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
break;
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ResponseMessage<SarStandardsInfo> importSarStandardsInfoData(List<Map<String, String>> dataList, String standType, String menuId, String filepath) {
|
||||
//此处需要做各种验证,数据库操作
|
||||
try {
|
||||
@@ -2739,7 +2809,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
// }
|
||||
Integer rowCount = dao.getSarStandardsInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page);
|
||||
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page,"0");
|
||||
attrInfo(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.wgDept.dao;
|
||||
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDeptShow;
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -16,5 +17,7 @@ import java.util.List;
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface WgDeptDao extends BaseMapper<WgDept> {
|
||||
List<WgDept> researchDatas(@Param(value = "data") String data);
|
||||
List<WgDeptShow> researchDatas(@Param(value = "data") String data);
|
||||
|
||||
List<WgDeptShow> researchAllDatas(@Param(value = "type") String type);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 集团参与情况
|
||||
@@ -49,8 +51,12 @@ public class WgDept extends BaseEntity {
|
||||
private String identity;
|
||||
|
||||
@ApiModelProperty(value = "资料")
|
||||
@TableField("datum")
|
||||
private String datum;
|
||||
@TableField("joinfile")
|
||||
private String joinfile;
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.adc.da.slrs.wgDept.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 集团参与情况
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgDept对象", description="集团参与情况")
|
||||
public class WgDeptShow extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
@TableId(value = "id",type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
@TableField("wg_id")
|
||||
private String wgId;
|
||||
|
||||
@ApiModelProperty(value = "我司在工作组排名顺序")
|
||||
@TableField("dept_order")
|
||||
private String deptOrder;
|
||||
|
||||
@ApiModelProperty(value = "我司人员")
|
||||
@TableField("dept_people_id")
|
||||
private String deptPeopleId;
|
||||
|
||||
@ApiModelProperty(value = "身份")
|
||||
@TableField("identity")
|
||||
private String identity;
|
||||
|
||||
@ApiModelProperty(value = "资料")
|
||||
@TableField("joinfile")
|
||||
private String joinfile;
|
||||
|
||||
@ApiModelProperty(value = "中文名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "部门Id")
|
||||
private String deptId;
|
||||
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.adc.da.slrs.wgDept.service;
|
||||
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDeptShow;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 集团参与情况 服务类
|
||||
@@ -12,5 +15,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface IWgDeptService extends IService<WgDept> {
|
||||
|
||||
List<WgDeptShow> getAllDatas(String type);
|
||||
}
|
||||
|
||||
@@ -2,10 +2,14 @@ package com.adc.da.slrs.wgDept.service.impl;
|
||||
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
import com.adc.da.slrs.wgDept.dao.WgDeptDao;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDeptShow;
|
||||
import com.adc.da.slrs.wgDept.service.IWgDeptService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 集团参与情况 服务实现类
|
||||
@@ -17,4 +21,11 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class WgDeptServiceImpl extends ServiceImpl<WgDeptDao, WgDept> implements IWgDeptService {
|
||||
|
||||
@Autowired
|
||||
private WgDeptDao wgDeptDao;
|
||||
|
||||
@Override
|
||||
public List<WgDeptShow> getAllDatas(String type) {
|
||||
return wgDeptDao.researchAllDatas(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,4 +19,6 @@ public interface WgMeetingInfoDao extends BaseMapper<WgMeetingInfo> {
|
||||
|
||||
List<WgMeetingInfo> researchDatas(@Param(value = "data") String data);
|
||||
|
||||
List<WgMeetingInfo> researchAllDatas(@Param(value = "type") String type);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,16 +2,21 @@ package com.adc.da.slrs.wgMeetingInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -40,27 +45,33 @@ public class WgMeetingInfo extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "参会时间")
|
||||
@TableField("meeting_time")
|
||||
private LocalDateTime meetingTime;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date meetingTime;
|
||||
|
||||
@ApiModelProperty(value = "会议名称")
|
||||
@TableField("meet_name")
|
||||
@TableField("meeting_name")
|
||||
private String meetingName;
|
||||
|
||||
@ApiModelProperty(value = "会议人员")
|
||||
@TableField("meeting_people")
|
||||
private String meetingPeople;
|
||||
|
||||
@ApiModelProperty(value = "会议人员名称")
|
||||
@TableField("meeting_people_name")
|
||||
private String meetingPeopleName;
|
||||
|
||||
@ApiModelProperty(value = "会议报告")
|
||||
@TableField("meeting_report")
|
||||
private String meetingReport;
|
||||
|
||||
@ApiModelProperty(value = "会议资料")
|
||||
@TableField("meeting_datum")
|
||||
private String meetingDatum;
|
||||
@TableField("joinfile")
|
||||
private String joinfile;
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
@ApiModelProperty(value = "人员信息")
|
||||
@TableField(exist = false)
|
||||
private List<String> meetingPeople;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<WgMeetingUserRelationShow> joinMeetingPeopleInfo;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+3
-1
@@ -3,6 +3,8 @@ package com.adc.da.slrs.wgMeetingInfo.service;
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 参会记录及资料 服务类
|
||||
@@ -12,5 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface IWgMeetingInfoService extends IService<WgMeetingInfo> {
|
||||
|
||||
List<WgMeetingInfo> getAllDatas(String type);
|
||||
}
|
||||
|
||||
+9
-1
@@ -4,8 +4,11 @@ import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.adc.da.slrs.wgMeetingInfo.dao.WgMeetingInfoDao;
|
||||
import com.adc.da.slrs.wgMeetingInfo.service.IWgMeetingInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 参会记录及资料 服务实现类
|
||||
@@ -16,5 +19,10 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
public class WgMeetingInfoServiceImpl extends ServiceImpl<WgMeetingInfoDao, WgMeetingInfo> implements IWgMeetingInfoService {
|
||||
|
||||
@Autowired
|
||||
WgMeetingInfoDao wgMeetingInfoDao;
|
||||
@Override
|
||||
public List<WgMeetingInfo> getAllDatas(String type) {
|
||||
return wgMeetingInfoDao.researchAllDatas(type);
|
||||
}
|
||||
}
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgMeetingUserRelation|")
|
||||
@RequestMapping("/wgMeetingUserRelation")
|
||||
public class WgMeetingUserRelationController extends BaseController<WgMeetingUserRelation> {
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.dao;
|
||||
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
public interface WgMeetingUserRelationDao extends BaseMapper<WgMeetingUserRelation> {
|
||||
List<WgMeetingUserRelationShow> getMeetingPeoples(@Param("meetId") String meetingId);
|
||||
|
||||
List<WgMeetingUserRelationShow> getMeetingAllPeoples(@Param(value = "type") String type);
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgMeetingUserRelation对象", description="")
|
||||
@TableName("wg_meeting_user_relation")
|
||||
public class WgMeetingUserRelation extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "会议id")
|
||||
@TableId("meeting_id")
|
||||
private String meetingId;
|
||||
|
||||
@ApiModelProperty(value = "人员id")
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.slrs.sarInstitution.entity.TsUserVO;
|
||||
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||
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;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgMeetingUserRelation对象", description="")
|
||||
public class WgMeetingUserRelationShow extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "会议id")
|
||||
private String meetingId;
|
||||
|
||||
@ApiModelProperty(value = "人员id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "人员名称")
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.service;
|
||||
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
public interface IWgMeetingUserRelationService extends IService<WgMeetingUserRelation> {
|
||||
List<WgMeetingUserRelationShow> getMeetingAllPeoples(String type);
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.service.impl;
|
||||
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.dao.WgMeetingUserRelationDao;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.service.IWgMeetingUserRelationService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@Service
|
||||
public class WgMeetingUserRelationServiceImpl extends ServiceImpl<WgMeetingUserRelationDao, WgMeetingUserRelation> implements IWgMeetingUserRelationService {
|
||||
|
||||
@Autowired
|
||||
private WgMeetingUserRelationDao wgMeetingUserRelationDao;
|
||||
|
||||
@Override
|
||||
public List<WgMeetingUserRelationShow> getMeetingAllPeoples(String type) {
|
||||
return wgMeetingUserRelationDao.getMeetingAllPeoples(type);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.wgNetInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -17,6 +18,8 @@ import java.util.List;
|
||||
*/
|
||||
public interface WgNetInfoDao extends BaseMapper<WgNetInfo> {
|
||||
|
||||
List<WgNetInfo> researchDatas(@Param(value = "data") String data);
|
||||
List<WgNetInfoDTO> researchDatas(@Param(value = "data") String data);
|
||||
|
||||
List<WgNetInfoDTO> researchAllDatas(@Param(value = "type") String type);
|
||||
|
||||
}
|
||||
|
||||
@@ -40,5 +40,9 @@ public class WgNetInfo extends BaseEntity {
|
||||
@TableField("net_id")
|
||||
private String netId;
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.adc.da.slrs.wgNetInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组秘书联系方式
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgNetInfo对象", description="工作组秘书联系方式")
|
||||
@TableName("wg_net_info")
|
||||
public class WgNetInfoDTO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
@TableId(value = "id",type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
@TableField("wg_id")
|
||||
private String wgId;
|
||||
|
||||
@ApiModelProperty(value = "人员id")
|
||||
@TableField("net_id")
|
||||
private String netId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
@ApiModelProperty(value = "中文名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.adc.da.slrs.wgNetInfo.service;
|
||||
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组秘书联系方式 服务类
|
||||
@@ -12,5 +15,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface IWgNetInfoService extends IService<WgNetInfo> {
|
||||
|
||||
List<WgNetInfoDTO> getAllDatas(String type);
|
||||
}
|
||||
|
||||
+10
@@ -2,10 +2,14 @@ package com.adc.da.slrs.wgNetInfo.service.impl;
|
||||
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.dao.WgNetInfoDao;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO;
|
||||
import com.adc.da.slrs.wgNetInfo.service.IWgNetInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组秘书联系方式 服务实现类
|
||||
@@ -16,5 +20,11 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
public class WgNetInfoServiceImpl extends ServiceImpl<WgNetInfoDao, WgNetInfo> implements IWgNetInfoService {
|
||||
@Autowired
|
||||
private WgNetInfoDao wgNetInfoDao;
|
||||
|
||||
@Override
|
||||
public List<WgNetInfoDTO> getAllDatas(String type) {
|
||||
return wgNetInfoDao.researchAllDatas(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,6 @@ import java.util.List;
|
||||
*/
|
||||
public interface WgPayInfoDao extends BaseMapper<WgPayInfo> {
|
||||
List<WgPayInfo> researchDatas(@Param(value = "data") String data);
|
||||
|
||||
List<WgPayInfo> researchAllDatas(@Param(value = "type") String type);
|
||||
}
|
||||
|
||||
@@ -59,12 +59,15 @@ public class WgPayInfo extends BaseEntity {
|
||||
private String payWay;
|
||||
|
||||
@ApiModelProperty(value = "支付资料")
|
||||
@TableField("pay_datum")
|
||||
private String payDatum;
|
||||
@TableField("joinfile")
|
||||
private String joinfile;
|
||||
|
||||
@ApiModelProperty(value = "费用列支")
|
||||
@TableField("pay_info")
|
||||
private String payInfo;
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.adc.da.slrs.wgPayInfo.service;
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 支付信息 服务类
|
||||
@@ -13,4 +15,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface IWgPayInfoService extends IService<WgPayInfo> {
|
||||
|
||||
List<WgPayInfo> getAllDatas(String type);
|
||||
|
||||
}
|
||||
|
||||
+10
@@ -4,8 +4,11 @@ import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.adc.da.slrs.wgPayInfo.dao.WgPayInfoDao;
|
||||
import com.adc.da.slrs.wgPayInfo.service.IWgPayInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 支付信息 服务实现类
|
||||
@@ -17,4 +20,11 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class WgPayInfoServiceImpl extends ServiceImpl<WgPayInfoDao, WgPayInfo> implements IWgPayInfoService {
|
||||
|
||||
@Autowired
|
||||
private WgPayInfoDao wgPayInfoDao;
|
||||
|
||||
@Override
|
||||
public List<WgPayInfo> getAllDatas(String type) {
|
||||
return wgPayInfoDao.researchAllDatas(type);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-1
@@ -17,6 +17,11 @@ import java.util.List;
|
||||
*/
|
||||
public interface WgStandorpolicyInfoDao extends BaseMapper<WgStandorpolicyInfo> {
|
||||
|
||||
List<WgStandorpolicyInfo> researchDatas(@Param(value = "data") String data);
|
||||
//仅用来政策或者标准新增验重不是查全部的接口
|
||||
List<WgStandorpolicyInfo> researchDatas();
|
||||
|
||||
List<WgStandorpolicyInfo> researchAllDatas(@Param(value = "type")String type);
|
||||
|
||||
List<WgStandorpolicyInfo> researchAllDatasPartTwo(@Param(value = "type")String type);
|
||||
|
||||
}
|
||||
|
||||
+20
@@ -2,6 +2,7 @@ package com.adc.da.slrs.wgStandorpolicyInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@@ -32,31 +33,50 @@ public class WgStandorpolicyInfo extends BaseEntity {
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
@TableField("wg_id")
|
||||
private String wgId;
|
||||
|
||||
@ApiModelProperty(value = "关联标准政策id")
|
||||
@TableField("stand_id")
|
||||
private String standId;
|
||||
|
||||
@ApiModelProperty(value = "政策/标准 类别")
|
||||
@TableField(exist = false)
|
||||
private String categary;
|
||||
|
||||
@ApiModelProperty(value = "政策/标准 编号")
|
||||
@TableField(exist = false)
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value = "政策/标准 年份")
|
||||
@TableField(exist = false)
|
||||
private String year;
|
||||
|
||||
@ApiModelProperty(value = "政策标准 名称")
|
||||
@TableField(exist = false)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "政策/标准 英文名称")
|
||||
@TableField(exist = false)
|
||||
private String usname;
|
||||
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
@TableField(exist = false)
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "参与制定情况")
|
||||
@TableField(exist = false)
|
||||
private String joinDevelop;
|
||||
|
||||
@ApiModelProperty(value = "相关材料")
|
||||
@TableField(exist = false)
|
||||
private String netDatum;
|
||||
|
||||
@ApiModelProperty(value = "相关材料")
|
||||
@TableField(exist = false)
|
||||
private String dataType;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -3,6 +3,8 @@ package com.adc.da.slrs.wgStandorpolicyInfo.service;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准/政策 -信息 服务类
|
||||
@@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface IWgStandorpolicyInfoService extends IService<WgStandorpolicyInfo> {
|
||||
|
||||
List<WgStandorpolicyInfo> getAllDatas(String type);
|
||||
}
|
||||
|
||||
+17
@@ -4,8 +4,11 @@ import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.dao.WgStandorpolicyInfoDao;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.service.IWgStandorpolicyInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准/政策 -信息 服务实现类
|
||||
@@ -17,4 +20,18 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class WgStandorpolicyInfoServiceImpl extends ServiceImpl<WgStandorpolicyInfoDao, WgStandorpolicyInfo> implements IWgStandorpolicyInfoService {
|
||||
|
||||
@Autowired
|
||||
private WgStandorpolicyInfoDao wgStandorpolicyInfoDao;
|
||||
|
||||
@Override
|
||||
public List<WgStandorpolicyInfo> getAllDatas(String type) {
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos=wgStandorpolicyInfoDao.researchAllDatas(type);
|
||||
if ("0".equals(type)) {
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos1 = wgStandorpolicyInfoDao.researchAllDatasPartTwo(type);
|
||||
wgStandorpolicyInfos1.forEach(wgStandorpolicyInfo -> wgStandorpolicyInfo.setDataType("3"));
|
||||
wgStandorpolicyInfos.addAll(wgStandorpolicyInfos1);
|
||||
}
|
||||
wgStandorpolicyInfos.removeIf(wgStandorpolicyInfo -> null==wgStandorpolicyInfo.getName());
|
||||
return wgStandorpolicyInfos;
|
||||
}
|
||||
}
|
||||
|
||||
+11
-5
@@ -38,21 +38,27 @@ public class WgWorkGroupController extends BaseController<WgWorkGroup> {
|
||||
return Result.success(wgWorkGroupService.saveDatas(wgWorkGroup));
|
||||
}
|
||||
|
||||
@ApiOperation("添加标准/政策节点数据")
|
||||
@PostMapping("/addStand")
|
||||
public ResponseMessage<Object> addResourceData(@RequestBody WgWorkGroupDTO wgWorkGroup){
|
||||
return Result.success(wgWorkGroupService.saveStandDatas(wgWorkGroup));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("搜索工作组节点数据")
|
||||
@GetMapping("/researchData")
|
||||
public ResponseMessage<WgWorkGroupShowDTO> researchData(@RequestParam(value = "type") String type){
|
||||
return Result.success(wgWorkGroupService.researchData(type));
|
||||
return Result.success(wgWorkGroupService.researchDataUp(type));
|
||||
}
|
||||
|
||||
@ApiOperation("删除工作组节点数据")
|
||||
@DeleteMapping("/deleteData")
|
||||
public ResponseMessage<Object> deleteData(@Param(value = "id") String id){
|
||||
return wgWorkGroupService.deleteData(id);
|
||||
@PostMapping("/deleteData")
|
||||
public ResponseMessage<Object> deleteData(@RequestParam(value = "id") String id, @RequestParam(value = "meetingId",required=false)List<String> meetingId){
|
||||
return wgWorkGroupService.deleteData(id,meetingId);
|
||||
}
|
||||
|
||||
@ApiOperation("修改工作组节点数据")
|
||||
@DeleteMapping("/updateData")
|
||||
@PostMapping("/updateData")
|
||||
public ResponseMessage<Object> updateData(@RequestBody WgWorkGroupShowDTO wgWorkGroupShowDTO){
|
||||
return wgWorkGroupService.updateData(wgWorkGroupShowDTO);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ public interface WgWorkGroupDao extends BaseMapper<WgWorkGroup> {
|
||||
|
||||
List<WgWorkGroupShowDTO> researchDownLevel(@Param(value = "data") String data);
|
||||
|
||||
List<WgWorkGroupShowDTO> researchAllData(@Param(value = "type")String type);
|
||||
|
||||
List<WgWorkGroup> researchDownCheck(@Param(value = "data") String data,@Param(value = "status")String status);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,16 +2,19 @@ package com.adc.da.slrs.wgWorkGroup.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -25,38 +28,40 @@ import lombok.experimental.Accessors;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgWorkGroup对象", description="工作组主表")
|
||||
@TableName("wgWorkGroup")
|
||||
@TableName("wg_work_group")
|
||||
public class WgWorkGroup extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
@ApiModelProperty(value = "id")
|
||||
@TableId(value = "id",type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "父级id")
|
||||
@TableId("pid")
|
||||
@TableField("pid")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty(value = "编号")
|
||||
@TableId("number")
|
||||
@TableField("number")
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
@TableId("name")
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "性质(0:标委会,1:分标委,2:工作组,3:政策)")
|
||||
@TableId("nature")
|
||||
@TableField("nature")
|
||||
private String nature;
|
||||
|
||||
@ApiModelProperty(value = "状态(0:流程中,1:流程已通过)")
|
||||
@TableId("status")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "换届时间")
|
||||
@TableField("change_time")
|
||||
private LocalDateTime changeTime;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date changeTime;
|
||||
|
||||
@ApiModelProperty(value = "标准化工作领域")
|
||||
@TableField("stander_area")
|
||||
@@ -74,5 +79,5 @@ public class WgWorkGroup extends BaseEntity {
|
||||
@TableField("level")
|
||||
private String level;
|
||||
|
||||
|
||||
//可能缺少性质,状态两个字段
|
||||
}
|
||||
|
||||
@@ -10,13 +10,16 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -54,7 +57,9 @@ public class WgWorkGroupDTO extends BaseEntity {
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "换届时间")
|
||||
private LocalDateTime changeTime;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date changeTime;
|
||||
|
||||
@ApiModelProperty(value = "标准化工作领域")
|
||||
private String standerArea;
|
||||
|
||||
+9
-2
@@ -2,15 +2,20 @@ package com.adc.da.slrs.wgWorkGroup.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDeptShow;
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO;
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jdk.nashorn.internal.objects.annotations.Constructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
@@ -51,6 +56,8 @@ public class WgWorkGroupShowDTO extends BaseEntity {
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "换届时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date changeTime;
|
||||
|
||||
@ApiModelProperty(value = "标准化工作领域")
|
||||
@@ -71,10 +78,10 @@ public class WgWorkGroupShowDTO extends BaseEntity {
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos;
|
||||
|
||||
//集团参与情况
|
||||
List<WgDept> wgDepts;
|
||||
List<WgDeptShow> wgDepts;
|
||||
|
||||
//秘书联系方式
|
||||
List<WgNetInfo> wgNetInfos;
|
||||
List<WgNetInfoDTO> wgNetInfos;
|
||||
|
||||
//参会记录及资料
|
||||
List<WgMeetingInfo> wgMeetingInfos;
|
||||
|
||||
+6
-1
@@ -20,9 +20,14 @@ public interface IWgWorkGroupService extends IService<WgWorkGroup> {
|
||||
|
||||
String saveDatas(WgWorkGroupDTO wgWorkGroupDTO);
|
||||
|
||||
String saveStandDatas(WgWorkGroupDTO wgWorkGroupDTO);
|
||||
|
||||
WgWorkGroupShowDTO researchData(String type);
|
||||
|
||||
ResponseMessage<Object> deleteData(String id);
|
||||
//优化查询接口 速度
|
||||
WgWorkGroupShowDTO researchDataUp(String type);
|
||||
|
||||
ResponseMessage<Object> deleteData(String id,List<String> meetingId);
|
||||
|
||||
ResponseMessage<Object> updateData(WgWorkGroupShowDTO wgWorkGroupShowDTO);
|
||||
|
||||
|
||||
+289
-40
@@ -2,10 +2,21 @@ package com.adc.da.slrs.wgWorkGroup.service.impl;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDeptShow;
|
||||
import com.adc.da.slrs.wgDept.service.IWgDeptService;
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.adc.da.slrs.wgMeetingInfo.service.IWgMeetingInfoService;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.service.IWgMeetingUserRelationService;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO;
|
||||
import com.adc.da.slrs.wgNetInfo.service.IWgNetInfoService;
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.adc.da.slrs.wgPayInfo.service.IWgPayInfoService;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.dao.WgStandorpolicyInfoDao;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.service.IWgStandorpolicyInfoService;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroup;
|
||||
import com.adc.da.slrs.wgWorkGroup.dao.WgWorkGroupDao;
|
||||
@@ -18,10 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -48,54 +56,253 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
||||
private IWgStandorpolicyInfoService wgStandorpolicyInfoService;
|
||||
@Autowired
|
||||
private WgWorkGroupDao wgWorkGroupDao;
|
||||
@Autowired
|
||||
private WgStandorpolicyInfoDao wgStandorpolicyInfoDao;
|
||||
@Autowired
|
||||
private IWgMeetingUserRelationService wgMeetingUserRelationService;
|
||||
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public String saveDatas(WgWorkGroupDTO wgWorkGroupDTO) {
|
||||
WgWorkGroup wgWorkGroup=new WgWorkGroup();
|
||||
BeanUtils.copyProperties(wgWorkGroupDTO,wgWorkGroup);
|
||||
WgWorkGroup wgWorkGroup = new WgWorkGroup();
|
||||
BeanUtils.copyProperties(wgWorkGroupDTO, wgWorkGroup);
|
||||
//存储集团参与情况
|
||||
boolean flag1=wgDeptService.saveBatch(wgWorkGroupDTO.getWgDepts());
|
||||
boolean flag = true;
|
||||
wgWorkGroup.setId(String.valueOf(UUID.randomUUID()));
|
||||
flag = wgWorkGroupService.save(wgWorkGroup);
|
||||
if (null != wgWorkGroupDTO.getWgDepts()) {
|
||||
wgWorkGroupDTO.getWgDepts().forEach(wgDept -> {
|
||||
wgDept.setWgId(wgWorkGroup.getId());
|
||||
});
|
||||
flag = wgDeptService.saveBatch(wgWorkGroupDTO.getWgDepts());
|
||||
}
|
||||
//存储会议信息
|
||||
boolean flag2=wgMeetingInfoService.saveBatch(wgWorkGroupDTO.getWgMeetingInfos());
|
||||
if (null != wgWorkGroupDTO.getWgMeetingInfos()) {
|
||||
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
|
||||
wgWorkGroupDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
|
||||
wgMeetingInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
wgMeetingInfo.setWgId(wgWorkGroup.getId());
|
||||
wgMeetingInfo.getMeetingPeople().forEach(s -> {
|
||||
WgMeetingUserRelation wgMeetingUserRelation = new WgMeetingUserRelation();
|
||||
wgMeetingUserRelation.setMeetingId(wgMeetingInfo.getId());
|
||||
wgMeetingUserRelation.setUserId(s);
|
||||
wgMeetingUserRelations.add(wgMeetingUserRelation);
|
||||
});
|
||||
});
|
||||
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
|
||||
flag = wgMeetingInfoService.saveBatch(wgWorkGroupDTO.getWgMeetingInfos());
|
||||
}
|
||||
//存储秘书联系方式信息
|
||||
boolean flag3=wgNetInfoService.saveBatch(wgWorkGroupDTO.getWgNetInfos());
|
||||
if (null != wgWorkGroupDTO.getWgNetInfos()) {
|
||||
wgWorkGroupDTO.getWgNetInfos().forEach(wgNetInfo -> {
|
||||
wgNetInfo.setWgId(wgWorkGroup.getId());
|
||||
});
|
||||
flag = wgNetInfoService.saveBatch(wgWorkGroupDTO.getWgNetInfos());
|
||||
}
|
||||
//支付信息
|
||||
boolean flag4=wgPayInfoService.saveBatch(wgWorkGroupDTO.getWgPayInfos());
|
||||
if (null != wgWorkGroupDTO.getWgPayInfos()) {
|
||||
wgWorkGroupDTO.getWgPayInfos().forEach(wgPayInfo -> {
|
||||
wgPayInfo.setWgId(wgWorkGroup.getId());
|
||||
});
|
||||
flag = wgPayInfoService.saveBatch(wgWorkGroupDTO.getWgPayInfos());
|
||||
}
|
||||
//标准政策信息
|
||||
boolean flag5=wgStandorpolicyInfoService.saveBatch(wgWorkGroupDTO.getWgStandorpolicyInfos());
|
||||
if (null != wgWorkGroupDTO.getWgStandorpolicyInfos()) {
|
||||
wgWorkGroupDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {
|
||||
wgStandorpolicyInfo.setWgId(wgWorkGroup.getId());
|
||||
});
|
||||
flag = wgStandorpolicyInfoService.saveBatch(wgWorkGroupDTO.getWgStandorpolicyInfos());
|
||||
}
|
||||
//先存储主数据
|
||||
boolean flag6=wgWorkGroupService.save(wgWorkGroup);
|
||||
if (flag1 && flag2 && flag3 && flag4 && flag5 && flag6 ) {
|
||||
if (flag) {
|
||||
return "添加成功";
|
||||
}else {
|
||||
} else {
|
||||
return "数据错误,添加失败";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveStandDatas(WgWorkGroupDTO wgWorkGroupDTO) {
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos= wgStandorpolicyInfoDao.researchDatas();
|
||||
Map<String,WgStandorpolicyInfo> map=new HashMap<>();
|
||||
wgStandorpolicyInfos.forEach(wgStandorpolicyInfo -> {
|
||||
map.put(wgStandorpolicyInfo.getStandId()+"-"+wgStandorpolicyInfo.getWgId(),wgStandorpolicyInfo);
|
||||
});
|
||||
if (null!=wgWorkGroupDTO.getWgStandorpolicyInfos() && wgWorkGroupDTO.getWgStandorpolicyInfos().size()>0){
|
||||
List<WgWorkGroup> wgWorkGroups=new ArrayList<>();
|
||||
wgWorkGroupDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {
|
||||
WgWorkGroup wgWorkGroup=new WgWorkGroup();
|
||||
BeanUtils.copyProperties(wgWorkGroupDTO,wgWorkGroup);
|
||||
wgWorkGroup.setId(String.valueOf(UUID.randomUUID()));
|
||||
wgStandorpolicyInfo.setWgId(wgWorkGroup.getId());
|
||||
if (null==map.get(wgStandorpolicyInfo.getStandId()+"-"+wgWorkGroup.getPid())) {
|
||||
wgWorkGroups.add(wgWorkGroup);
|
||||
}
|
||||
});
|
||||
if (wgWorkGroups.size()==0){
|
||||
return "政策已存在,请勿重复添加";
|
||||
}
|
||||
boolean flag=wgWorkGroupService.saveOrUpdateBatch(wgWorkGroups);
|
||||
boolean flag1=wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupDTO.getWgStandorpolicyInfos());
|
||||
if (flag && flag1){
|
||||
return "添加成功";
|
||||
}else {
|
||||
return "添加失败";
|
||||
}
|
||||
}else {
|
||||
return "数据有误,请检查数据";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgWorkGroupShowDTO researchData(String type) {
|
||||
//构建最初的节点 用来向下搜索
|
||||
WgWorkGroupShowDTO wgWorkGroupShowDTO=new WgWorkGroupShowDTO();
|
||||
WgWorkGroupShowDTO wgWorkGroupShowDTO = new WgWorkGroupShowDTO();
|
||||
wgWorkGroupShowDTO.setId("root");
|
||||
wgWorkGroupShowDTO.setTypes(type);
|
||||
List<WgWorkGroupShowDTO> wgWorkGroupShowDTOS=new ArrayList<>();
|
||||
List<WgWorkGroupShowDTO> wgWorkGroupShowDTOS = new ArrayList<>();
|
||||
wgWorkGroupShowDTOS.add(wgWorkGroupShowDTO);
|
||||
return wgWorkGroupDao.researchDatas(wgWorkGroupShowDTOS,type);
|
||||
return wgWorkGroupDao.researchDatas(wgWorkGroupShowDTOS, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseMessage<Object> deleteData(String id) {
|
||||
List<WgWorkGroup> wgWorkGroupShowDTOS=wgWorkGroupDao.researchDownCheck(id,"1");
|
||||
List<WgWorkGroupShowDTO> wgWorkGroups=wgWorkGroupDao.researchDownLevel(id);
|
||||
if (null!=wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size()>0 && null!= wgWorkGroups && wgWorkGroups.size()>0){
|
||||
public WgWorkGroupShowDTO researchDataUp(String type) {
|
||||
List<WgWorkGroupShowDTO> wgWorkGroupShowDTOS = wgWorkGroupDao.researchAllData(type);
|
||||
List<WgPayInfo> wgPayInfos = wgPayInfoService.getAllDatas(type);
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos = wgStandorpolicyInfoService.getAllDatas(type);
|
||||
List<WgDeptShow> wgDeptShows = wgDeptService.getAllDatas(type);
|
||||
List<WgNetInfoDTO> wgNetInfoDTOS = wgNetInfoService.getAllDatas(type);
|
||||
List<WgMeetingInfo> wgMeetingInfos = wgMeetingInfoService.getAllDatas(type);
|
||||
List<WgMeetingUserRelationShow> wgMeetingUserRelations = wgMeetingUserRelationService.getMeetingAllPeoples(type);
|
||||
//处理数据
|
||||
//part1 会议数据组装 提速第一步建造数据的map集合
|
||||
Map<String,WgWorkGroupShowDTO> wgWorkGroupMap=new HashMap<>();
|
||||
wgWorkGroupShowDTOS.forEach(wgWorkGroupShowDTO -> {
|
||||
wgWorkGroupMap.put(wgWorkGroupShowDTO.getId(),wgWorkGroupShowDTO);
|
||||
});
|
||||
|
||||
Map<String, WgMeetingInfo> meetMap = new HashMap<>();
|
||||
if (null!=wgMeetingInfos && wgMeetingInfos.size()>0) {
|
||||
wgMeetingInfos.forEach(wgMeetingInfo -> {
|
||||
meetMap.put(wgMeetingInfo.getId(), wgMeetingInfo);
|
||||
});
|
||||
}
|
||||
//组装会议数据
|
||||
if (null!=wgMeetingUserRelations && wgMeetingUserRelations.size()>0) {
|
||||
wgMeetingUserRelations.forEach(wgMeetingUserRelationShow -> {
|
||||
if (null!=meetMap.get(wgMeetingUserRelationShow.getMeetingId()).getJoinMeetingPeopleInfo()) {
|
||||
meetMap.get(wgMeetingUserRelationShow.getMeetingId()).getJoinMeetingPeopleInfo().add(wgMeetingUserRelationShow);
|
||||
}else {
|
||||
List<WgMeetingUserRelationShow> wgMeetingUserRelationShows=new ArrayList<>();
|
||||
wgMeetingUserRelationShows.add(wgMeetingUserRelationShow);
|
||||
meetMap.get(wgMeetingUserRelationShow.getMeetingId()).setJoinMeetingPeopleInfo(wgMeetingUserRelationShows);
|
||||
}
|
||||
});
|
||||
}
|
||||
//组装总数据
|
||||
if (null!=wgDeptShows && wgDeptShows.size()>0) {
|
||||
wgDeptShows.forEach(wgDeptShow -> {
|
||||
if (null!=wgWorkGroupMap.get(wgDeptShow.getWgId()).getWgDepts()) {
|
||||
wgWorkGroupMap.get(wgDeptShow.getWgId()).getWgDepts().add(wgDeptShow);
|
||||
}else {
|
||||
List<WgDeptShow> wgDepts = new ArrayList<>();
|
||||
wgDepts.add(wgDeptShow);
|
||||
wgWorkGroupMap.get(wgDeptShow.getWgId()).setWgDepts(wgDepts);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (null!=wgMeetingInfos && wgMeetingInfos.size()>0) {
|
||||
wgMeetingInfos.forEach(wgMeetingInfo -> {
|
||||
if (null!=wgWorkGroupMap.get(wgMeetingInfo.getWgId()).getWgMeetingInfos()) {
|
||||
wgWorkGroupMap.get(wgMeetingInfo.getWgId()).getWgMeetingInfos().add(meetMap.get(wgMeetingInfo.getId()));
|
||||
}else {
|
||||
List<WgMeetingInfo> wgMeetingInfos1 = new ArrayList<>();
|
||||
wgMeetingInfos1.add(wgMeetingInfo);
|
||||
wgWorkGroupMap.get(wgMeetingInfo.getWgId()).setWgMeetingInfos(wgMeetingInfos1);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (null!=wgNetInfoDTOS && wgNetInfoDTOS.size()>0) {
|
||||
wgNetInfoDTOS.forEach(wgNetInfoDTO -> {
|
||||
if (null!=wgWorkGroupMap.get(wgNetInfoDTO.getWgId()).getWgNetInfos()) {
|
||||
wgWorkGroupMap.get(wgNetInfoDTO.getWgId()).getWgNetInfos().add(wgNetInfoDTO);
|
||||
}else {
|
||||
List<WgNetInfoDTO> wgNetInfos=new ArrayList<>();
|
||||
wgNetInfos.add(wgNetInfoDTO);
|
||||
wgWorkGroupMap.get(wgNetInfoDTO.getWgId()).setWgNetInfos(wgNetInfos);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (null!=wgPayInfos && wgPayInfos.size()>0) {
|
||||
wgPayInfos.forEach(wgPayInfo -> {
|
||||
if (null!=wgWorkGroupMap.get(wgPayInfo.getWgId()).getWgPayInfos()) {
|
||||
wgWorkGroupMap.get(wgPayInfo.getWgId()).getWgPayInfos().add(wgPayInfo);
|
||||
}else {
|
||||
List<WgPayInfo> wgPayInfos1=new ArrayList<>();
|
||||
wgPayInfos1.add(wgPayInfo);
|
||||
wgWorkGroupMap.get(wgPayInfo.getWgId()).setWgPayInfos(wgPayInfos1);
|
||||
}
|
||||
});
|
||||
}
|
||||
//处理标准政策数据
|
||||
if (null!=wgStandorpolicyInfos && wgStandorpolicyInfos.size()>0) {
|
||||
wgStandorpolicyInfos.forEach(wgStandorpolicyInfo -> {
|
||||
if (null!=wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos()) {
|
||||
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setName(wgStandorpolicyInfo.getName());
|
||||
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos().add(wgStandorpolicyInfo);
|
||||
}else {
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos1=new ArrayList<>();
|
||||
wgStandorpolicyInfos1.add(wgStandorpolicyInfo);
|
||||
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setName(wgStandorpolicyInfo.getName());
|
||||
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setWgStandorpolicyInfos(wgStandorpolicyInfos1);
|
||||
}
|
||||
});
|
||||
}
|
||||
//数据初步组装完成 开始进行树结构排序
|
||||
List<Integer> nums=new ArrayList<>();
|
||||
Map<Integer,List<WgWorkGroupShowDTO>> map=new HashMap<>();
|
||||
wgWorkGroupShowDTOS.forEach(wgWorkGroupShowDTO -> {
|
||||
if (null!=map.get(Integer.valueOf(wgWorkGroupShowDTO.getLevel()))){
|
||||
map.get(Integer.valueOf(wgWorkGroupShowDTO.getLevel())).add(wgWorkGroupShowDTO);
|
||||
}else {
|
||||
List<WgWorkGroupShowDTO> middle = new ArrayList<>();
|
||||
middle.add(wgWorkGroupShowDTO);
|
||||
nums.add(Integer.valueOf(wgWorkGroupShowDTO.getLevel()));
|
||||
map.put(Integer.valueOf(wgWorkGroupShowDTO.getLevel()),middle);
|
||||
}
|
||||
});
|
||||
//组装数据
|
||||
for (int i=nums.size()-1;i>0;i--){
|
||||
int finalI = i;
|
||||
map.get(i-1).forEach(wgWorkGroupShowDTO -> {
|
||||
map.get(finalI).forEach(wgWorkGroupShowDTO1 -> {
|
||||
if (wgWorkGroupShowDTO.getId().equals(wgWorkGroupShowDTO1.getPid())){
|
||||
if (null!=wgWorkGroupShowDTO.getChildren()) {
|
||||
wgWorkGroupShowDTO.getChildren().add(wgWorkGroupShowDTO1);
|
||||
}else {
|
||||
List<WgWorkGroupShowDTO> children = new ArrayList<>();
|
||||
children.add(wgWorkGroupShowDTO1);
|
||||
wgWorkGroupShowDTO.setChildren(children);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
return map.get(0).get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseMessage<Object> deleteData(String id, List<String> ids) {
|
||||
List<WgWorkGroup> wgWorkGroupShowDTOS = wgWorkGroupDao.researchDownCheck(id, "1");
|
||||
List<WgWorkGroupShowDTO> wgWorkGroups = wgWorkGroupDao.researchDownLevel(id);
|
||||
if (null != wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size() > 0 && null != wgWorkGroups && wgWorkGroups.size() > 0) {
|
||||
return Result.error("该工作组下存在工作组且处在流程中,无法删除");
|
||||
} else if (null!=wgWorkGroups && wgWorkGroups.size()>0) {
|
||||
} else if (null != wgWorkGroups && wgWorkGroups.size() > 0) {
|
||||
return Result.error("该工作组下存在工作组,无法删除");
|
||||
} else if (null!=wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size()>0){
|
||||
} else if (null != wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size() > 0) {
|
||||
return Result.error("该工作组处在流程中,无法删除");
|
||||
}else {
|
||||
} else {
|
||||
wgWorkGroupService.removeById(id);
|
||||
Map<String, Object> columnMap = new HashMap<>();
|
||||
columnMap.put("wg_id", id);
|
||||
@@ -104,34 +311,76 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
||||
wgNetInfoService.removeByMap(columnMap);
|
||||
wgMeetingInfoService.removeByMap(columnMap);
|
||||
wgDeptService.removeByMap(columnMap);
|
||||
if (null != ids && ids.size() > 0) {
|
||||
wgMeetingUserRelationService.removeByIds(ids);
|
||||
}
|
||||
return Result.success("删除成功");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseMessage<Object> updateData(WgWorkGroupShowDTO wgWorkGroupShowDTO) {
|
||||
List<WgWorkGroup> wgWorkGroupShowDTOS=wgWorkGroupDao.researchDownCheck(wgWorkGroupShowDTO.getId(),"1");
|
||||
if (null!=wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size()>0){
|
||||
List<WgWorkGroup> wgWorkGroupShowDTOS = wgWorkGroupDao.researchDownCheck(wgWorkGroupShowDTO.getId(), "1");
|
||||
if (null != wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size() > 0) {
|
||||
return Result.error("工作组处在流程中,无法修改");
|
||||
}else {
|
||||
WgWorkGroup wgWorkGroup=new WgWorkGroup();
|
||||
BeanUtils.copyProperties(wgWorkGroupShowDTO,wgWorkGroup);
|
||||
boolean flag1=wgWorkGroupService.updateById(wgWorkGroup);
|
||||
boolean flag2=wgDeptService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgDepts());
|
||||
boolean flag3=wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
|
||||
boolean flag4=wgNetInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgNetInfos());
|
||||
boolean flag5=wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
|
||||
boolean flag6=wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
|
||||
if (flag1 && flag2 && flag3 && flag4 && flag5 && flag6){
|
||||
} else {
|
||||
WgWorkGroup wgWorkGroup = new WgWorkGroup();
|
||||
BeanUtils.copyProperties(wgWorkGroupShowDTO, wgWorkGroup);
|
||||
boolean flag = false;
|
||||
flag = wgWorkGroupService.saveOrUpdate(wgWorkGroup);
|
||||
if (null != wgWorkGroupShowDTO.getWgDepts() && wgWorkGroupShowDTO.getWgDepts().size() > 0) {
|
||||
List<WgDept> wgDepts=new ArrayList<>();
|
||||
wgWorkGroupShowDTO.getWgDepts().forEach(wgDeptShow -> {
|
||||
WgDept wgDept=new WgDept();
|
||||
BeanUtils.copyProperties(wgDeptShow,wgDept);
|
||||
wgDepts.add(wgDept);
|
||||
});
|
||||
|
||||
flag = wgDeptService.saveOrUpdateBatch(wgDepts);
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgMeetingInfos() && wgWorkGroupShowDTO.getWgMeetingInfos().size() > 0) {
|
||||
List<String> removeMeet = new ArrayList<>();
|
||||
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
|
||||
wgWorkGroupShowDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
|
||||
wgMeetingInfo.getMeetingPeople().forEach(s -> {
|
||||
WgMeetingUserRelation wgMeetingUserRelation = new WgMeetingUserRelation();
|
||||
wgMeetingUserRelation.setUserId(s);
|
||||
wgMeetingUserRelation.setMeetingId(wgMeetingInfo.getId());
|
||||
wgMeetingUserRelations.add(wgMeetingUserRelation);
|
||||
});
|
||||
removeMeet.add(wgMeetingInfo.getId());
|
||||
});
|
||||
if (!removeMeet.isEmpty()) {
|
||||
wgMeetingUserRelationService.removeByIds(removeMeet);
|
||||
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
|
||||
}
|
||||
|
||||
|
||||
flag = wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgNetInfos() && wgWorkGroupShowDTO.getWgNetInfos().size() > 0) {
|
||||
List<WgNetInfo> wgNetInfos = new ArrayList<>();
|
||||
wgWorkGroupShowDTO.getWgNetInfos().forEach(wgNetInfoDTO -> {
|
||||
WgNetInfo wgNetInfo = new WgNetInfo();
|
||||
BeanUtils.copyProperties(wgNetInfoDTO, wgNetInfo);
|
||||
wgNetInfos.add(wgNetInfo);
|
||||
});
|
||||
flag = wgNetInfoService.saveOrUpdateBatch(wgNetInfos);
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgPayInfos() && wgWorkGroupShowDTO.getWgPayInfos().size() > 0) {
|
||||
flag = wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgStandorpolicyInfos() && wgWorkGroupShowDTO.getWgStandorpolicyInfos().size() > 0) {
|
||||
flag = wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
return Result.success("更新成功");
|
||||
}else {
|
||||
} else {
|
||||
return Result.error("无法更新");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -91,19 +91,19 @@ public class BussStandExportUtil {
|
||||
Map<String,Object> attrValueMap = sarStandardsInfoEO.getAttrInfoMap();
|
||||
switch (name) {
|
||||
case "企标类别":
|
||||
value = sarStandardsInfoEO.getStandSortShow();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandSortShow());
|
||||
break;
|
||||
case "企标编号":
|
||||
value = sarStandardsInfoEO.getStandCode();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandCode());
|
||||
break;
|
||||
case "中文名称":
|
||||
value = sarStandardsInfoEO.getStandName();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandName());
|
||||
break;
|
||||
case "英文名称":
|
||||
value = sarStandardsInfoEO.getStandEnName();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandEnName());
|
||||
break;
|
||||
case "文本状态":
|
||||
value = sarStandardsInfoEO.getStandStatusShow();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandStatusShow());
|
||||
break;
|
||||
case "标准实施日期":
|
||||
String putTime="";
|
||||
@@ -116,10 +116,10 @@ public class BussStandExportUtil {
|
||||
value = putTime;
|
||||
break;
|
||||
case "代替企标编号":
|
||||
value = sarStandardsInfoEO.getReplaceStandNum();
|
||||
value = verifyBean(sarStandardsInfoEO.getReplaceStandNum());
|
||||
break;
|
||||
case "被代替企标编号":
|
||||
value = sarStandardsInfoEO.getReplacedStandNum();
|
||||
value = verifyBean(sarStandardsInfoEO.getReplacedStandNum());
|
||||
break;
|
||||
case "发布日期":
|
||||
String issueTime="";
|
||||
@@ -149,4 +149,14 @@ public class BussStandExportUtil {
|
||||
return value;
|
||||
}
|
||||
|
||||
private static String verifyBean(String value){
|
||||
String val = "";
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
val =value;
|
||||
}else {
|
||||
val = "";
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -91,19 +91,19 @@ public class LawsStandExportUtil {
|
||||
Map<String,Object> attrValueMap = sarStandardsInfoEO.getAttrInfoMap();
|
||||
switch (name) {
|
||||
case "政策分类":
|
||||
value = sarStandardsInfoEO.getLawsType();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsType());
|
||||
break;
|
||||
case "政策编号":
|
||||
value = sarStandardsInfoEO.getLawsNumber();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsNumber());
|
||||
break;
|
||||
case "中文名称":
|
||||
value = sarStandardsInfoEO.getLawsName();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsName());
|
||||
break;
|
||||
case "英文名称":
|
||||
value = sarStandardsInfoEO.getLawsEnName();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsEnName());
|
||||
break;
|
||||
case "政策文号":
|
||||
value = sarStandardsInfoEO.getLawsNo();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsNo());
|
||||
break;
|
||||
case "发文日期":
|
||||
String issueTime="";
|
||||
@@ -116,7 +116,7 @@ public class LawsStandExportUtil {
|
||||
value = issueTime;
|
||||
break;
|
||||
case "发文单位":
|
||||
value = sarStandardsInfoEO.getIssueCompany();
|
||||
value = verifyBean(sarStandardsInfoEO.getIssueCompany());
|
||||
break;
|
||||
case "征集意见周期-起始时间":
|
||||
String commentCycleStart="";
|
||||
@@ -137,31 +137,31 @@ public class LawsStandExportUtil {
|
||||
value = commentCycleEnd;
|
||||
break;
|
||||
case "文本状态":
|
||||
value = sarStandardsInfoEO.getStandStatusShow();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandStatusShow());
|
||||
break;
|
||||
case "适用区域":
|
||||
value = sarStandardsInfoEO.getLawsSyqy();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsSyqy());
|
||||
break;
|
||||
case "适用车型":
|
||||
value = sarStandardsInfoEO.getLawsSycx();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsSycx());
|
||||
break;
|
||||
case "是否纳入认证清单":
|
||||
value = sarStandardsInfoEO.getIsRelateAccess() != null ? (sarStandardsInfoEO.getIsRelateAccess().equals("1")?"是":"否"): "";
|
||||
break;
|
||||
case "年度":
|
||||
value = sarStandardsInfoEO.getLawsYear();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsYear());
|
||||
break;
|
||||
case "福田转发通知文号":
|
||||
value = sarStandardsInfoEO.getLawsNotisyncNum();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsNotisyncNum());
|
||||
break;
|
||||
case "信息简报":
|
||||
value = sarStandardsInfoEO.getLawsBulletin();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsBulletin());
|
||||
break;
|
||||
case "标签":
|
||||
value = sarStandardsInfoEO.getLawsLabel();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsLabel());
|
||||
break;
|
||||
case "备注":
|
||||
value = sarStandardsInfoEO.getLawsRemark();
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsRemark());
|
||||
break;
|
||||
default:
|
||||
String field = attrInfoMap.get(name);
|
||||
@@ -173,4 +173,14 @@ public class LawsStandExportUtil {
|
||||
return value;
|
||||
}
|
||||
|
||||
private static String verifyBean(String value){
|
||||
String val = "";
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
val =value;
|
||||
}else {
|
||||
val = "";
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -101,23 +101,28 @@ public class StandExportUtil {
|
||||
Map<String,Object> attrValueMap = sarStandardsInfoEO.getAttrInfoMap();
|
||||
switch (name) {
|
||||
case "标准性质":
|
||||
value = sarStandardsInfoEO.getStandNatureShow();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandNatureShow());
|
||||
break;
|
||||
case "是否纳入认证清单":
|
||||
switch (sarStandardsInfoEO.getIsRelateAccess()){
|
||||
case "0": value="否"; break;
|
||||
case "1": value="是"; break;
|
||||
default:value="";
|
||||
boolean notBlank = StringUtils.isNotBlank(sarStandardsInfoEO.getIsRelateAccess());
|
||||
if (notBlank) {
|
||||
switch (sarStandardsInfoEO.getIsRelateAccess()){
|
||||
case "0": value="否"; break;
|
||||
case "1": value="是"; break;
|
||||
default:value="";
|
||||
}
|
||||
}else {
|
||||
value = "";
|
||||
}
|
||||
break;
|
||||
case "标准体系":
|
||||
value = sarStandardsInfoEO.getStandSystem();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandSystem());
|
||||
break;
|
||||
case "适用区域":
|
||||
value = sarStandardsInfoEO.getCountryShow();
|
||||
value = verifyBean(sarStandardsInfoEO.getCountryShow());
|
||||
break;
|
||||
case "标准类别":
|
||||
value = sarStandardsInfoEO.getStandSortShow();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandSortShow());
|
||||
break;
|
||||
case "重要度":
|
||||
if (StringUtils.isNotBlank(sarStandardsInfoEO.getIsRelateAccess())) {
|
||||
@@ -130,19 +135,19 @@ public class StandExportUtil {
|
||||
value = sarStandardsInfoEO.getIsRelateAccess();
|
||||
break;
|
||||
case "标准编号":
|
||||
value = sarStandardsInfoEO.getStandNumber();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandNumber());
|
||||
break;
|
||||
case "标准年份":
|
||||
value = sarStandardsInfoEO.getStandYear();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandYear());
|
||||
break;
|
||||
case "中文名称":
|
||||
value = sarStandardsInfoEO.getStandName();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandName());
|
||||
break;
|
||||
case "英文名称":
|
||||
value = sarStandardsInfoEO.getStandEnName();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandEnName());
|
||||
break;
|
||||
case "文本状态":
|
||||
value = sarStandardsInfoEO.getStandTextStatusShow();
|
||||
value = verifyBean(sarStandardsInfoEO.getStandTextStatusShow());
|
||||
break;
|
||||
case "发布日期":
|
||||
if (sarStandardsInfoEO.getIssueTime() != null) {
|
||||
@@ -154,7 +159,7 @@ public class StandExportUtil {
|
||||
}
|
||||
break;
|
||||
case "文本说明":
|
||||
value = sarStandardsInfoEO.getSynopsis();
|
||||
value = verifyBean(sarStandardsInfoEO.getSynopsis());
|
||||
break;
|
||||
default:
|
||||
String field = attrInfoMap.get(name);
|
||||
@@ -166,4 +171,14 @@ public class StandExportUtil {
|
||||
return value;
|
||||
}
|
||||
|
||||
private static String verifyBean(String value){
|
||||
String val = "";
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
val =value;
|
||||
}else {
|
||||
val = "";
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.sapMeetInfo.dao.SapMeetingDao">
|
||||
|
||||
<sql id="BaseSelect">
|
||||
id,title,date,content,type,attend,files
|
||||
</sql>
|
||||
<sql id="Search">
|
||||
type = #{type}
|
||||
</sql>
|
||||
|
||||
<insert id="insertMeeting" parameterType="com.adc.da.slrs.sapMeetInfo.entity.SapMeeting">
|
||||
insert into sap_meeting
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="date != null">date,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="attend != null">attend,</if>
|
||||
<if test="files != null">files,</if>
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="date != null">#{date},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="attend != null">#{attend},</if>
|
||||
<if test="files != null">#{files},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
<select id="selectMeetingsByDate" resultType="com.adc.da.slrs.sapMeetInfo.entity.SapMeeting" parameterType="java.util.Map">
|
||||
select <include refid="BaseSelect"></include>
|
||||
from sap_meeting
|
||||
where date_format(date,'%Y%m%d') = date_format(#{date},'%Y%m%d')
|
||||
and <include refid="Search"></include>
|
||||
order by date
|
||||
</select>
|
||||
|
||||
<select id="selectMeetingsByMonth" resultType="com.adc.da.slrs.sapMeetInfo.entity.SapMeeting" parameterType="java.util.Date">
|
||||
select <include refid="BaseSelect"></include>
|
||||
from sap_meeting
|
||||
where DATE_FORMAT(date,'%Y-%m')=DATE_FORMAT(#{date},'%Y-%m')
|
||||
and type = 1
|
||||
</select>
|
||||
|
||||
<select id="selectMeetingsByMonthType" resultType="com.adc.da.slrs.sapMeetInfo.entity.SapMeeting" parameterType="java.util.Map">
|
||||
select <include refid="BaseSelect"></include>
|
||||
from sap_meeting
|
||||
where DATE_FORMAT(date,'%Y-%m')=DATE_FORMAT(#{date},'%Y-%m')
|
||||
and <include refid="Search"></include>
|
||||
</select>
|
||||
|
||||
<select id="selectMeetingById" resultType="com.adc.da.slrs.sapMeetInfo.entity.SapMeeting" parameterType="java.lang.String">
|
||||
select <include refid="BaseSelect"></include>
|
||||
from sap_meeting
|
||||
where id = #{id}
|
||||
and <include refid="Search"></include>
|
||||
</select>
|
||||
|
||||
<delete id="deleteById">
|
||||
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByDate">
|
||||
|
||||
</delete>
|
||||
|
||||
<update id="updateMeeting">
|
||||
|
||||
</update>
|
||||
</mapper>
|
||||
+49
-45
@@ -54,7 +54,7 @@
|
||||
|
||||
<sql id="Group_Column_List_show" >
|
||||
stand_status, replaced_stand_num, replace_stand_num,put_time,
|
||||
issue_time, stand_en_name, stand_name, stand_code,
|
||||
issue_time, stand_en_name, stand_name, stand_code,standStatusShow,
|
||||
SAR_BUSSIONESS_STAND.id
|
||||
</sql>
|
||||
|
||||
@@ -350,48 +350,51 @@
|
||||
<!-- 分页查询条件 -->
|
||||
<sql id="standSort_in">
|
||||
ORDER BY
|
||||
CASE tmp_tb.stand_sort
|
||||
when 'Q/FT A' THEN 0
|
||||
when 'Q/FT B' THEN 1
|
||||
when 'Q/FT E' THEN 2
|
||||
when 'Q/FT F' THEN 3
|
||||
when 'Q/FT G' THEN 4
|
||||
when 'Q/FT M' THEN 5
|
||||
when 'Q/FT Q' THEN 6
|
||||
when 'Q/FT R' THEN 7
|
||||
when 'Q/FT S' THEN 8
|
||||
when 'Q/FT T' THEN 9
|
||||
when 'Q/FT V' THEN 10
|
||||
when 'Q/FT X' THEN 11
|
||||
when 'Q/FT Y' THEN 12
|
||||
when 'Q/FT Z' THEN 13
|
||||
when 'Q/QCBFC' THEN 14
|
||||
when '雷萨企标Q/FL' THEN 15
|
||||
when 'Q/QCFLC' THEN 16
|
||||
<if test='orderByA != null and orderByA != "" and order1 != null and order1 != ""'>
|
||||
${orderByA} ${order1},
|
||||
</if>
|
||||
CASE
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT A', '%') THEN 0
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT B', '%') THEN 1
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT E', '%') THEN 2
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT F', '%') THEN 3
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT G', '%') THEN 4
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT M', '%') THEN 5
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT Q', '%') THEN 6
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT R', '%') THEN 7
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT S', '%') THEN 8
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT T', '%') THEN 9
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT V', '%') THEN 10
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT X', '%') THEN 11
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT Y', '%') THEN 12
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT Z', '%') THEN 13
|
||||
when tmp_tb.stand_code like concat('%', 'Q/QCBFC', '%') THEN 14
|
||||
when tmp_tb.stand_code like concat('%', '雷萨企标Q/FL', '%') THEN 15
|
||||
when tmp_tb.stand_code like concat('%', 'Q/QCFLC', '%') THEN 16
|
||||
ELSE 17
|
||||
END,
|
||||
tmp_tb.stand_sort ASC
|
||||
</sql>
|
||||
<sql id="standSort_out">
|
||||
ORDER BY
|
||||
CASE tmp_tb.stand_sort
|
||||
when 'Q/FT A' THEN 0
|
||||
when 'Q/FT B' THEN 1
|
||||
when 'Q/FT E' THEN 2
|
||||
when 'Q/FT F' THEN 3
|
||||
when 'Q/FT G' THEN 4
|
||||
when 'Q/FT M' THEN 5
|
||||
when 'Q/FT Q' THEN 6
|
||||
when 'Q/FT R' THEN 7
|
||||
when 'Q/FT S' THEN 8
|
||||
when 'Q/FT T' THEN 9
|
||||
when 'Q/FT V' THEN 10
|
||||
when 'Q/FT X' THEN 11
|
||||
when 'Q/FT Y' THEN 12
|
||||
when 'Q/FT Z' THEN 13
|
||||
when 'Q/QCBFC' THEN 14
|
||||
when '雷萨企标Q/FL' THEN 15
|
||||
when 'Q/QCFLC' THEN 16
|
||||
CASE
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT A', '%') THEN 0
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT B', '%') THEN 1
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT E', '%') THEN 2
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT F', '%') THEN 3
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT G', '%') THEN 4
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT M', '%') THEN 5
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT Q', '%') THEN 6
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT R', '%') THEN 7
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT S', '%') THEN 8
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT T', '%') THEN 9
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT V', '%') THEN 10
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT X', '%') THEN 11
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT Y', '%') THEN 12
|
||||
when tmp_tb.stand_code like concat('%', 'Q/FT Z', '%') THEN 13
|
||||
when tmp_tb.stand_code like concat('%', 'Q/QCBFC', '%') THEN 14
|
||||
when tmp_tb.stand_code like concat('%', '雷萨企标Q/FL', '%') THEN 15
|
||||
when tmp_tb.stand_code like concat('%', 'Q/QCFLC', '%') THEN 16
|
||||
ELSE 17
|
||||
END,
|
||||
tmp_tb.stand_sort ASC,
|
||||
@@ -401,6 +404,11 @@
|
||||
left join SAR_BUSS_STAND_MENU ON SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
left join TS_RESOURCE on SAR_BUSS_STAND_MENU.menu_id = TS_RESOURCE.id
|
||||
left join SAR_BUSS_STAND_ATTR_INFO on (SAR_BUSS_STAND_ATTR_INFO.STAND_ID = SAR_BUSSIONESS_STAND.id and SAR_BUSS_STAND_ATTR_INFO.valid_flag=0)
|
||||
LEFT JOIN TS_DICTYPE dicstandTextStatus ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_BUSSIONESS_STAND.text_status_buss
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
|
||||
@@ -624,16 +632,12 @@
|
||||
<select id="getBussionessStandInfoPage" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select * from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List_show" />
|
||||
(select
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow,
|
||||
<include refid="Base_Column_List_show" />
|
||||
from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfo_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_show"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
<if test="sql != null and sql != ''" >
|
||||
ORDER BY ${sql}
|
||||
</if>
|
||||
GROUP BY standStatusShow,<include refid="Group_Column_List_show"/>
|
||||
) tmp_tb
|
||||
<include refid="standSort_in"/>
|
||||
limit ${pager.startIndex-1},${pageSize}) a
|
||||
|
||||
+8
-1
@@ -37,8 +37,15 @@
|
||||
|
||||
<!-- 只查询这个部门下的子一级人员-->
|
||||
<select id="selectNextUser" resultMap="TsUser">
|
||||
select * from ts_user
|
||||
select ts_user.EMAIL,ts_user.ACCOUNT,ts_user.CREATION_TIME,ts_user.DISABLE_FLAG,ts_user.EXT_INFO,ts_user.USID,
|
||||
ts_user.INSTITUTION_ID,ts_user.INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
|
||||
ts_user.POSITION_ID,ts_user.POSITION_NAME,ts_user.SEX,ts_user.SSO_ID,ts_user.STATE,ts_user.UNLOCK_FLAG,ts_user.USER_SOURCE,
|
||||
ts_user.USER_TYPE,ts_user.VALID_FLAG,ts_user.WORK_NUM,concat(ts_user.UNAME,concat(concat("(",ts_user.ACCOUNT),")")) as uname
|
||||
from ts_user
|
||||
WHERE institution_id=#{institutionId}
|
||||
<if test="userName != null and userName != '' ">
|
||||
and ( ts_user.ACCOUNT like concat(concat('%',#{userName}),'%') or ts_user.UNAME like concat(concat('%',#{userName}),'%') )
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectTreeByIds" resultMap="TsInstitution">
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user