Merge remote-tracking branch 'origin/develop_master' into develop_1
This commit is contained in:
@@ -402,4 +402,7 @@ public interface workFlowFeignClient {
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/datas/bus-process-new/everyDayTenOlock",method = RequestMethod.GET)
|
||||
List<BusProcessNew> everyDayTenOlock();
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/datas/bus-process-new/everyDayTenOlockSAM",method = RequestMethod.GET)
|
||||
List<BusProcessNew> everyDayTenOlockSAM();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.service.IUserEOService;
|
||||
import com.adc.da.workFlow.controller.WorkFlowController;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -185,10 +186,39 @@ public class ProcessTimer {
|
||||
}
|
||||
}
|
||||
|
||||
@Scheduled(cron = "0 0 10 * * ? ")//每天十点执行
|
||||
// @Scheduled(cron = "*/40 * * * * ? ")//20s
|
||||
public void everyDayTenOlockScanSAM() {
|
||||
List<BusProcessNew> busProcessNews=new ArrayList<>();
|
||||
busProcessNews=workFlowFeignClient.everyDayTenOlockSAM();
|
||||
if (!busProcessNews.isEmpty()){
|
||||
for (BusProcessNew bus:busProcessNews) {
|
||||
JSONObject jsonObject= JSON.parseObject(bus.getMesg());
|
||||
String taskInfo = bus.getTaskInfo();
|
||||
String result = jsonObject.getJSONObject("roleList").getString("dockUser");
|
||||
result = result.split(",")[0];
|
||||
jsonObject.put("member",result);
|
||||
if(taskInfo.equals("标准化活动参会流程-流程结束")){
|
||||
jsonObject.put("auto","1");
|
||||
ResponseMessage responseMessage = workFlowController.startProcessNew("22",result,null);
|
||||
BusMes busMes=new BusMes();
|
||||
busMes.setTaskIds(String.valueOf(responseMessage.getData()));
|
||||
busMes.setJson(jsonObject.toJSONString());
|
||||
busMes.setUserId(result);
|
||||
|
||||
Wrapper<String> wrapper=workFlowFeignClient.completeTaskByUserId(busMes);
|
||||
System.out.println("标准化活动会后流程自动发起");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[]args){
|
||||
ProcessTimer processTimer = new ProcessTimer();
|
||||
processTimer.everyDayTenOlockScan();
|
||||
processTimer.everyDayTenOlockScanSAM();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,9 @@ public class ActDefineStartMap {
|
||||
|
||||
// 政策入库
|
||||
map.put("laws1","lawsLibraryWkflow");
|
||||
//政策征求意见, 认证重点法规/政策 流程
|
||||
map.put("laws2","PolicyCommentProcessWorkFlow");
|
||||
map.put("laws3","KCSTPReviewProcessWorkFlow");
|
||||
|
||||
//张超然
|
||||
map.put("20","StandardApplyMeetProcess");
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.adc.da.workFlow.common;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import sun.awt.SunHints;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ExportExcel<T> {
|
||||
|
||||
private String header;
|
||||
|
||||
private static String[] property;
|
||||
Workbook workbook=new XSSFWorkbook();
|
||||
|
||||
public void setProperty(String property){
|
||||
this.property=property.split(",");
|
||||
}
|
||||
|
||||
public void setHeader(String header){
|
||||
this.header=header;
|
||||
}
|
||||
|
||||
public Workbook getWorkBook(T dataJson) throws Exception {
|
||||
JSONArray dataArray = JSONObject.parseArray(dataJson.toString());
|
||||
|
||||
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
|
||||
|
||||
Sheet sheet = workbook.createSheet();
|
||||
sheet.setDefaultColumnWidth(25);
|
||||
|
||||
createHeader(sheet,header);
|
||||
|
||||
createData(sheet,dataArray);
|
||||
|
||||
return workbook;
|
||||
}
|
||||
|
||||
|
||||
public static void createHeader(Sheet sheet, String header){
|
||||
|
||||
Row rowHeader = sheet.createRow(0);//开始创建标题行
|
||||
if (StringUtils.isNotBlank(header)) {
|
||||
String[] headerArr = header.split(",");
|
||||
for (int i=0;i < headerArr.length; i++) {
|
||||
|
||||
rowHeader.createCell(i).setCellValue(headerArr[i]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void createData(Sheet sheet, List<?> data) throws Exception{
|
||||
|
||||
if (data != null && !data.isEmpty()) {
|
||||
for (int i=0;i < data.size(); i++) {
|
||||
|
||||
Row row = sheet.createRow(i+1);
|
||||
|
||||
int sheetNum = 0;
|
||||
|
||||
JSONObject datumJson =(JSONObject)data.get(i);
|
||||
/**
|
||||
* 遍历jsonObject值填入一行的单元格中
|
||||
*/
|
||||
for (String s : property) {
|
||||
String value = datumJson.getString(s);
|
||||
row.createCell(sheetNum).setCellValue(value);
|
||||
sheetNum++;
|
||||
}
|
||||
// Class cls = importDto.getClass();
|
||||
// Field[] fields = cls.getDeclaredFields();
|
||||
// for (Field field : fields) {
|
||||
// field.setAccessible(true);
|
||||
// if (field.get(importDto)!=null){
|
||||
// String value = field.get(importDto).toString();
|
||||
// row.createCell(sheetNum).setCellValue(value);
|
||||
// }else {
|
||||
// row.createCell(sheetNum).setCellValue("");
|
||||
// }
|
||||
// sheetNum++;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.adc.da.workFlow.controller;
|
||||
|
||||
import com.adc.da.common.ReadExcel;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.workFlow.common.ExportExcel;
|
||||
import com.adc.da.workFlow.service.PolicyWorkFlowService;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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.*;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/policy/activiti")
|
||||
@Api(tags = "政策征求意见和重点法规或政策认证流程")
|
||||
public class PolicyWorkFlowController {
|
||||
|
||||
|
||||
/**
|
||||
* 政策征求意见导出
|
||||
*/
|
||||
@PostMapping("/exportExcel")
|
||||
@ApiOperation("导出政策征求意见为excel")
|
||||
public void exportExcel(@RequestBody String dataJson, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
JSONObject data = JSONObject.parseObject(dataJson);
|
||||
JSONArray info = data.getJSONArray("dataList");
|
||||
|
||||
|
||||
ExportExcel exportExcel = new ExportExcel();
|
||||
exportExcel.setHeader("章节编号,章节名称,修改前,修改后,修改理由,原因,提出部门,提出人");
|
||||
exportExcel.setProperty("chapterNumber,chapterName,oldText,newText,changeReason,reason,department,responUserName");
|
||||
Workbook workbook=exportExcel.getWorkBook(info);
|
||||
|
||||
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName("政策征求意见"+".xlsx",request));
|
||||
// response.setContentType("application/force-download");
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
workbook.write(outputStream);
|
||||
outputStream.flush();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private PolicyWorkFlowService policyWorkFlowService;
|
||||
|
||||
/**
|
||||
* 政策征求意见导出
|
||||
*/
|
||||
@PostMapping("/enterIssue")
|
||||
@ApiOperation("纳入重点问题管控")
|
||||
public ResponseMessage enterIssue(@RequestBody String json){
|
||||
boolean result = policyWorkFlowService.enterIssue(json);
|
||||
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
}
|
||||
+15
-6
@@ -524,13 +524,22 @@ public class WorkFlowController {
|
||||
map.put("flag","未完成");
|
||||
}
|
||||
if(map.get("comment")!=null && !map.get("comment").toString().equals("")){
|
||||
if(map.get("comment").toString().equals("0")){
|
||||
map.put("comment","同意");
|
||||
}else if(map.get("comment").toString().equals("1")){
|
||||
map.put("comment","不同意");
|
||||
}else{
|
||||
map.put("comment",map.get("commentText").toString());
|
||||
String comment = map.get("comment").toString();
|
||||
switch (comment){
|
||||
case "0":
|
||||
map.put("comment","同意");
|
||||
break;
|
||||
case "1":
|
||||
map.put("comment","不同意");
|
||||
break;
|
||||
default:
|
||||
String commentText="";
|
||||
map.put("comment",comment+map.get("commentText"));
|
||||
}
|
||||
|
||||
}else if (map.get("commentText")!=null && !"".equals(map.get("commentText"))){
|
||||
map.put("comment",map.get("commentText").toString());
|
||||
|
||||
}
|
||||
ProcessDetailExport user = JSON.parseObject(JSON.toJSONString(map), ProcessDetailExport.class);
|
||||
exportDatas.add(user);
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.adc.da.workFlow.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.service.IBusinessDeptIssueService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class PolicyWorkFlowService {
|
||||
|
||||
@Autowired
|
||||
private IBusinessDeptIssueService businessDeptIssueService;
|
||||
|
||||
|
||||
public boolean enterIssue(String json){
|
||||
boolean count=false; //是否成功
|
||||
JSONObject dataJsonObj = JSONObject.parseObject(json);
|
||||
|
||||
if ("1".equals(dataJsonObj.getString("department"))) {
|
||||
JSONArray dataList = dataJsonObj.getJSONArray("dataList");
|
||||
|
||||
/**
|
||||
* 把json对象转换未实体对象
|
||||
*/
|
||||
List<BusinessDeptIssue> data = dataList
|
||||
.stream()
|
||||
.map(jsonObj -> {
|
||||
|
||||
BusinessDeptIssue businessDeptIssue = JSONObject.parseObject(jsonObj.toString(), BusinessDeptIssue.class);
|
||||
businessDeptIssue.setId(UUIDUtils.randomUUID20());
|
||||
return businessDeptIssue;
|
||||
}).collect(Collectors.toList());
|
||||
count=businessDeptIssueService.saveBatch(data);
|
||||
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
@@ -49,18 +49,19 @@ public class WaterMarkUtil {
|
||||
// set Transparency
|
||||
PdfGState gs = new PdfGState();
|
||||
// 设置透明度为0.2
|
||||
gs.setFillOpacity(0.5f);
|
||||
gs.setFillOpacity(0.4f);
|
||||
under.setGState(gs);
|
||||
under.restoreState();
|
||||
under.beginText();
|
||||
under.setFontAndSize(base, 25);
|
||||
under.setFontAndSize(base, 56);
|
||||
under.setTextMatrix(30, 30);
|
||||
under.setColorFill(BaseColor.LIGHT_GRAY);
|
||||
for (int y = 0; y < 10; y++) {
|
||||
for (int x = 0; x < 8; x++) {
|
||||
// 水印文字成45度角倾斜
|
||||
under.showTextAligned(Element.ALIGN_LEFT
|
||||
, waterMarkName, 100 + 300 * x, 300 * y, 45); }
|
||||
, waterMarkName, 100 + 300 * x, 300 * y, 40);
|
||||
}
|
||||
}
|
||||
|
||||
// 添加水印文字
|
||||
|
||||
+37
-1
@@ -22,6 +22,42 @@
|
||||
<artifactId>adc-da-sys</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
<!-- 导入本地jar -->
|
||||
<!-- 操作ppt -->
|
||||
<dependency>
|
||||
<groupId>com.artofsolving</groupId>
|
||||
<artifactId>jodconverter</artifactId>
|
||||
<scope>system</scope>
|
||||
<version>2.2.2</version>
|
||||
<systemPath>${basedir}/src/main/lib/jodconverter-2.2.2.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aspose</groupId>
|
||||
<artifactId>aspose-words</artifactId>
|
||||
<version>15.8.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/lib/aspose-words-15.8.0-jdk16.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aspose</groupId>
|
||||
<artifactId>aspose-cells</artifactId>
|
||||
<version>8.5.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/lib/aspose-cells-8.5.2.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aspose</groupId>
|
||||
<artifactId>aspose-slides</artifactId>
|
||||
<version>16.7.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/lib/aspose.slides-16.7.0.jar</systemPath>
|
||||
</dependency>
|
||||
<!-- 操作文本文件-->
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itextpdf</artifactId>
|
||||
<version>5.5.13</version>
|
||||
</dependency>
|
||||
<!-- openOffice 和 jobconverter-->
|
||||
|
||||
<dependency>
|
||||
@@ -46,7 +82,7 @@
|
||||
<artifactId>jodconverter-local</artifactId>
|
||||
<version>4.3.0</version>
|
||||
</dependency>
|
||||
<!-- openOffice end-->
|
||||
<!-- openOffice end-->
|
||||
<dependency>
|
||||
<groupId>org.openoffice</groupId>
|
||||
<artifactId>juh</artifactId>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.adc.da.convert.common;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
public class AsposeOfficeConvertUtils {
|
||||
|
||||
public static void convertOfficeFileToPDF(String fileType,String attFilePath,String savePdfPath) throws Exception {
|
||||
if(StringUtils.isNotBlank(fileType)){
|
||||
//去掉文件类型中的点
|
||||
fileType = fileType.replace(".","");
|
||||
fileType = fileType.toUpperCase();
|
||||
switch (fileType){
|
||||
case "DOC":
|
||||
WordTPdfUtils.doc2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
case "DOCX":
|
||||
WordTPdfUtils.doc2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
case "PPT":
|
||||
SlidesTPdfUtils.ppt2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
case "PPTX":
|
||||
SlidesTPdfUtils.ppt2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
case "XLS":
|
||||
ExcelTPdfUtils.excel2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
case "XLSX":
|
||||
ExcelTPdfUtils.excel2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.adc.da.convert.common;
|
||||
|
||||
import com.aspose.cells.PdfSaveOptions;
|
||||
import com.aspose.cells.Workbook;
|
||||
import com.aspose.cells.License;
|
||||
import com.aspose.slides.Presentation;
|
||||
import com.aspose.slides.SaveFormat;
|
||||
import org.aspectj.weaver.ast.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
public class ExcelTPdfUtils {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(WordTPdfUtils.class);
|
||||
private static final String myLicense = "<License><Data><Products><Product>Aspose.Total for Java</Product><Product>Aspose.Words for Java</Product></Products><EditionType>Enterprise</EditionType><SubscriptionExpiry>20991231</SubscriptionExpiry><LicenseExpiry>20991231</LicenseExpiry><SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber></Data><Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature></License>";
|
||||
|
||||
/**
|
||||
* 获取license 去除水印
|
||||
* @return
|
||||
*/
|
||||
public static boolean getLicense() {
|
||||
boolean result = false;
|
||||
try {
|
||||
ByteArrayInputStream is = new ByteArrayInputStream(myLicense.getBytes());
|
||||
License aposeLic = new License();
|
||||
aposeLic.setLicense(is);
|
||||
result = true;
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* excel 转为pdf 输出。
|
||||
*
|
||||
* @param sourceFilePath excel文件
|
||||
* @param desFilePathd pad 输出文件目录
|
||||
*/
|
||||
public static void excel2pdf(String sourceFilePath, String desFilePathd ) throws Exception {
|
||||
if (!getLicense()) { // 验证License 若不验证则转化出的pdf文档会有水印产生
|
||||
return;
|
||||
}
|
||||
File file = new File(desFilePathd); // 新建一个空白pdf文档
|
||||
FileOutputStream fileOS = null;
|
||||
try {
|
||||
fileOS = new FileOutputStream(desFilePathd);
|
||||
long old = System.currentTimeMillis();
|
||||
Workbook wb = new Workbook(sourceFilePath);// 原始excel路径
|
||||
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
|
||||
pdfSaveOptions.setOnePagePerSheet(true);
|
||||
int[] autoDrawSheets={3};
|
||||
//当excel中对应的sheet页宽度太大时,在PDF中会拆断并分页。此处等比缩放。
|
||||
// autoDraw(wb,autoDrawSheets);
|
||||
int[] showSheets={0};
|
||||
//隐藏workbook中不需要的sheet页。
|
||||
printSheetPage(wb,showSheets);
|
||||
wb.save(fileOS, pdfSaveOptions);
|
||||
fileOS.flush();
|
||||
fileOS.close();
|
||||
long now = System.currentTimeMillis();
|
||||
logger.info("转换文档:"+sourceFilePath+" "+"共耗时:" + ((now - old) / 1000.0) + "秒");
|
||||
} catch (Exception e) {
|
||||
if(fileOS!=null){
|
||||
fileOS.flush();
|
||||
fileOS.close();
|
||||
}
|
||||
file.delete();
|
||||
logger.error("Document Convert Error:"+sourceFilePath);
|
||||
logger.error(e.getMessage(),e);
|
||||
throw new Exception("Document Convert Error:"+sourceFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置打印的sheet 自动拉伸比例
|
||||
* @param wb
|
||||
* @param page 自动拉伸的页的sheet数组
|
||||
*/
|
||||
public static void autoDraw(Workbook wb,int[] page){
|
||||
if(null!=page&&page.length>0){
|
||||
for (int i = 0; i < page.length; i++) {
|
||||
wb.getWorksheets().get(i).getHorizontalPageBreaks().clear();
|
||||
wb.getWorksheets().get(i).getVerticalPageBreaks().clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 隐藏workbook中不需要的sheet页。
|
||||
* @param wb
|
||||
* @param page 显示页的sheet数组
|
||||
*/
|
||||
public static void printSheetPage(Workbook wb,int[] page){
|
||||
for (int i= 1; i < wb.getWorksheets().getCount(); i++) {
|
||||
wb.getWorksheets().get(i).setVisible(false);
|
||||
}
|
||||
if(null==page||page.length==0){
|
||||
wb.getWorksheets().get(0).setVisible(true);
|
||||
}else{
|
||||
for (int i = 0; i < page.length; i++) {
|
||||
wb.getWorksheets().get(i).setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String sourceFilePath="E:\\EXCELTEXT\\一阶段问题清单426.xlsx";
|
||||
String desFilePath="E:\\EXCELTEXT\\一阶段问题清单426.pdf";
|
||||
try {
|
||||
excel2pdf(sourceFilePath, desFilePath);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.adc.da.convert.common;
|
||||
|
||||
import com.aspose.slides.Presentation;
|
||||
import com.aspose.slides.License;
|
||||
import com.aspose.slides.SaveFormat;
|
||||
import org.aspectj.weaver.ast.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* 采用破解版的Aspire插件转换文件
|
||||
*/
|
||||
public class SlidesTPdfUtils {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SlidesTPdfUtils.class);
|
||||
private static final String myLicense = "<License><Data><Products><Product>Aspose.Total for Java</Product><Product>Aspose.Words for Java</Product></Products><EditionType>Enterprise</EditionType><SubscriptionExpiry>20991231</SubscriptionExpiry><LicenseExpiry>20991231</LicenseExpiry><SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber></Data><Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature></License>";
|
||||
|
||||
public static boolean getLicense() {
|
||||
boolean result = false;
|
||||
try {
|
||||
ByteArrayInputStream is = new ByteArrayInputStream(myLicense.getBytes());
|
||||
License aposeLic = new License();
|
||||
aposeLic.setLicense(is);
|
||||
result = true;
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static void ppt2pdf(String inPath, String outPath) throws Exception{
|
||||
if (!getLicense()) { // 验证License 若不验证则转化出的pdf文档会有水印产生
|
||||
return;
|
||||
}
|
||||
File file = new File(outPath); // 新建一个空白pdf文档
|
||||
FileOutputStream os =null;
|
||||
try {
|
||||
long old = System.currentTimeMillis();
|
||||
os = new FileOutputStream(file);
|
||||
Presentation pres = new Presentation(inPath);
|
||||
pres.save(os, SaveFormat.Pdf);
|
||||
os.flush();
|
||||
os.close();
|
||||
// EPUB, XPS, SWF 相互转换
|
||||
long now = System.currentTimeMillis();
|
||||
logger.info("转换文档:"+inPath+" "+"共耗时:" + ((now - old) / 1000.0) + "秒");
|
||||
} catch (Exception e) {
|
||||
if(os!=null){
|
||||
os.flush();
|
||||
os.close();
|
||||
}
|
||||
file.delete();
|
||||
logger.error("Document Convert Error:"+inPath);
|
||||
logger.error(e.getMessage(),e);
|
||||
throw new Exception("Document Convert Error:"+inPath);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String sourceFilePath="E:\\PPTTEXT\\2.pptx";
|
||||
String desFilePath="E:\\PPTTEXT\\2.pdf";
|
||||
ppt2pdf(sourceFilePath, desFilePath);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.adc.da.convert.common;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.aspose.words.Document;
|
||||
import org.aspectj.weaver.ast.Test;
|
||||
import com.aspose.words.License;
|
||||
import com.aspose.words.SaveFormat;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* 采用破解版的Aspire插件转换文件
|
||||
*/
|
||||
public class WordTPdfUtils {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(WordTPdfUtils.class);
|
||||
|
||||
private static final String myLicense = "<License><Data><Products><Product>Aspose.Total for Java</Product><Product>Aspose.Words for Java</Product></Products><EditionType>Enterprise</EditionType><SubscriptionExpiry>20991231</SubscriptionExpiry><LicenseExpiry>20991231</LicenseExpiry><SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber></Data><Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature></License>";
|
||||
|
||||
public static boolean getLicense() {
|
||||
boolean result = false;
|
||||
try {
|
||||
ByteArrayInputStream is = new ByteArrayInputStream(myLicense.getBytes());
|
||||
License aposeLic = new License();
|
||||
aposeLic.setLicense(is);
|
||||
result = true;
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static void doc2pdf(String inPath, String outPath) throws Exception{
|
||||
if (!getLicense()) { // 验证License 若不验证则转化出的pdf文档会有水印产生
|
||||
return;
|
||||
}
|
||||
File file = new File(outPath); // 新建一个空白pdf文档
|
||||
FileOutputStream os = new FileOutputStream(file);
|
||||
try {
|
||||
long old = System.currentTimeMillis();
|
||||
Document doc = new Document(inPath); // Address是将要被转化的word文档
|
||||
doc.save(os, SaveFormat.PDF);// 全面支持DOC, DOCX, OOXML, RTF HTML, OpenDocument, PDF,
|
||||
os.flush();
|
||||
os.close();
|
||||
// EPUB, XPS, SWF 相互转换
|
||||
long now = System.currentTimeMillis();
|
||||
logger.info("转换文档:"+inPath+" "+"共耗时:" + ((now - old) / 1000.0) + "秒");
|
||||
} catch (Exception e) {
|
||||
if(os!=null){
|
||||
os.flush();
|
||||
os.close();
|
||||
}
|
||||
file.delete();
|
||||
logger.error("Document Convert Error:"+inPath);
|
||||
logger.error(e.getMessage(),e);
|
||||
throw new Exception("Document Convert Error:"+inPath);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,12 +4,15 @@ import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.common.SarTypeEnum;
|
||||
import com.adc.da.common.UseModuleEnum;
|
||||
import com.adc.da.convert.common.AsposeOfficeConvertUtils;
|
||||
import com.adc.da.convert.common.DocConverterPdf;
|
||||
import com.adc.da.mq.CreateMQService;
|
||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||
import com.adc.da.slrs.otConvertMq.service.IOtConvertMqService;
|
||||
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
||||
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
||||
import com.adc.da.slrs.sarLawsFile.dao.SarLawsFileDao;
|
||||
import com.adc.da.slrs.sarLawsFile.entity.SarLawsFile;
|
||||
import com.adc.da.slrs.sarStandFile.dao.SarStandFileDao;
|
||||
import com.adc.da.slrs.sarStandFile.entity.SarStandFile;
|
||||
import com.adc.da.sys.util.LoginUserUtil;
|
||||
@@ -62,6 +65,9 @@ public class SendConvertMQService {
|
||||
@Autowired
|
||||
private SarBussStandFileDao sarBussStandFileEODao;
|
||||
|
||||
@Autowired
|
||||
private SarLawsFileDao sarLawsFileDao;
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SendConvertMQService.class);
|
||||
|
||||
@RabbitListener(bindings = @QueueBinding(
|
||||
@@ -152,6 +158,7 @@ public class SendConvertMQService {
|
||||
public ResponseMessage docUploadConvert(OtConvertMq convertMqEO) throws Exception{
|
||||
//保存在数据库中的ID
|
||||
String path = localFilePath + convertMqEO.getFilePath();
|
||||
path = path.replace("//","/");
|
||||
String convertId = convertMqEO.getId();
|
||||
try {
|
||||
//进入转换方法中,修改OT_CONVERT表中状态为转换中
|
||||
@@ -164,24 +171,28 @@ public class SendConvertMQService {
|
||||
String converfilename = path.replaceAll("\\\\", "/");
|
||||
logger.info("*****上传路径:*******"+localFilePath);
|
||||
logger.info("************文件路径:**********" + convertMqEO.getFilePath());
|
||||
logger.info("************接口:**********" + port);
|
||||
// logger.info("************接口:**********" + port);
|
||||
logger.info("*****上传路径替换,加入文件名*******"+converfilename);
|
||||
//截取文件类型
|
||||
int index = converfilename.lastIndexOf(".");
|
||||
String fileType = converfilename.substring(index,converfilename.length());
|
||||
String fileOriName = converfilename.substring(0,index);
|
||||
//调用转换类DocConverter,并将需要转换的文件传递给该类的构造方法
|
||||
DocConverterPdf d = new DocConverterPdf(converfilename,fileType);
|
||||
d.setConvertHost(convertHost);
|
||||
//调用conver方法开始转换,先执行doc2pdf()将office文件转换为pdf;再执行pdf2swf()将pdf转换为swf;
|
||||
File getPdf = d.conver(fileType);
|
||||
//调用getswfPath()方法,打印转换后的swf文件路径
|
||||
String dPath = d.getpdfPath();
|
||||
logger.info("*****转换后的pdf文件路径*******"+dPath);
|
||||
// //调用转换类DocConverter,并将需要转换的文件传递给该类的构造方法
|
||||
// DocConverterPdf d = new DocConverterPdf(converfilename,fileType);
|
||||
// d.setConvertHost(convertHost);
|
||||
// //调用conver方法开始转换,先执行doc2pdf()将office文件转换为pdf;再执行pdf2swf()将pdf转换为swf;
|
||||
// File getPdf = d.conver(fileType);
|
||||
// //调用getswfPath()方法,打印转换后的swf文件路径
|
||||
// String dPath = d.getpdfPath();
|
||||
String savePdfFileName = converfilename.substring(0, converfilename.lastIndexOf("."));
|
||||
String savePdfPath = savePdfFileName+".pdf";
|
||||
AsposeOfficeConvertUtils.convertOfficeFileToPDF(fileType,converfilename,savePdfPath);
|
||||
File pdfFile = new File(savePdfPath);
|
||||
logger.info("*****转换后的pdf文件路径*******"+savePdfPath);
|
||||
//判断是否转换成功,修改数据状态
|
||||
if(!dPath.isEmpty() && getPdf.length()>0){
|
||||
if(!savePdfPath.isEmpty() && pdfFile.length()>0){
|
||||
// 上传转换后文件
|
||||
String pdfId = attFileEOService.saveFileAttId(getPdf);
|
||||
String pdfId = attFileEOService.saveFileAttId(pdfFile);
|
||||
logger.info("////////转换后文件id"+pdfId);
|
||||
int count = 0;
|
||||
if("0".equals(convertMqEO.getAddOrUp())){
|
||||
@@ -212,11 +223,11 @@ public class SendConvertMQService {
|
||||
convertMqEO.setModifyTime(new Date());
|
||||
convertMqEO.setMqState(2);
|
||||
convertMqEOService.updateById(convertMqEO);
|
||||
if(convertMqEO.getAgainNum()<=5){
|
||||
throw new Exception("转换失败");
|
||||
}
|
||||
// if(convertMqEO.getAgainNum()<=5){
|
||||
// throw new Exception("转换失败");
|
||||
// }
|
||||
}
|
||||
return Result.success(dPath);
|
||||
return Result.success(savePdfPath);
|
||||
} else {
|
||||
logger.error("转换时未获取到文件路径!");
|
||||
return Result.error("文件存储失败,请重试");
|
||||
@@ -228,7 +239,7 @@ public class SendConvertMQService {
|
||||
convertMqEO.setId(convertId);
|
||||
convertMqEO.setMqState(2);
|
||||
convertMqEOService.updateById(convertMqEO);
|
||||
this.restartUploadConvert(convertMqEO);
|
||||
// this.restartUploadConvert(convertMqEO);
|
||||
return Result.error("r0072", "文件转换失败,请重试");
|
||||
}
|
||||
}
|
||||
@@ -270,14 +281,14 @@ public class SendConvertMQService {
|
||||
lawsFile.setModifyTime(new Date());
|
||||
lawsFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
countSuccess = sarStandFileEODao.updateByPrimaryKeySelective(lawsFile);
|
||||
} else if (SarTypeEnum.LAWS.getValue().equals(convertMq.getConvertType())) {
|
||||
// SarLawsFile lawsFile = new SarLawsFile();
|
||||
// lawsFile.setId(convertMq.getPdfId());
|
||||
// lawsFile.setAttId(pdfId);
|
||||
// lawsFile.setOriAttId(convertMq.getOriAttId());
|
||||
// lawsFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
// lawsFile.setModifyTime(new Date());
|
||||
// countSuccess = sarLawsFileEODao.updateByPrimaryKeySelective(lawsFile);
|
||||
} else if (SarTypeEnum.LAWS_STAND.getValue().equals(convertMq.getConvertType())) {
|
||||
SarLawsFile lawsFile = new SarLawsFile();
|
||||
lawsFile.setId(convertMq.getPdfId());
|
||||
lawsFile.setAttId(pdfId);
|
||||
lawsFile.setOriAttId(convertMq.getOriAttId());
|
||||
lawsFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
lawsFile.setModifyTime(new Date());
|
||||
countSuccess = sarLawsFileDao.updateByPrimaryKeySelective(lawsFile);
|
||||
} else if (SarTypeEnum.BUSINESS.getValue().equals(convertMq.getConvertType())) {
|
||||
SarBussStandFile lawsFile = new SarBussStandFile();
|
||||
lawsFile.setId(convertMq.getPdfId());
|
||||
@@ -336,21 +347,21 @@ public class SendConvertMQService {
|
||||
lawsFile.setFileName(fileOriName+".pdf");
|
||||
lawsFile.setFileSuffix("pdf");
|
||||
countSuccess = sarStandFileEODao.insertSelective(lawsFile);
|
||||
} else if (SarTypeEnum.LAWS.getValue().equals(convertMq.getConvertType())) {
|
||||
// SarLawsFile lawsFile = new SarLawsFile();
|
||||
// lawsFile.setId(UUID.randomUUID(20));
|
||||
// lawsFile.setLawsId(convertMq.getLawsId());
|
||||
// lawsFile.setResId(convertMq.getResId());
|
||||
// lawsFile.setAttId(pdfId);
|
||||
// lawsFile.setOriAttId(convertMq.getOriAttId());
|
||||
// lawsFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
// lawsFile.setValidFlag("0");
|
||||
// lawsFile.setCreationTime(new Date());
|
||||
// lawsFile.setModifyTime(new Date());
|
||||
// lawsFile.setLawsFileClassify(convertMq.getLawsFileClassify());
|
||||
// lawsFile.setFileName(fileOriName+".pdf");
|
||||
// lawsFile.setFileSuffix("pdf");
|
||||
// countSuccess = sarLawsFileEODao.insertSelective(lawsFile);
|
||||
} else if (SarTypeEnum.LAWS_STAND.getValue().equals(convertMq.getConvertType())) {
|
||||
SarLawsFile lawsFile = new SarLawsFile();
|
||||
lawsFile.setId(UUID.randomUUID(20));
|
||||
lawsFile.setLawsId(convertMq.getLawsId());
|
||||
lawsFile.setResId(convertMq.getResId());
|
||||
lawsFile.setAttId(pdfId);
|
||||
lawsFile.setOriAttId(convertMq.getOriAttId());
|
||||
lawsFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
lawsFile.setValidFlag(0);
|
||||
lawsFile.setCreationTime(new Date());
|
||||
lawsFile.setModifyTime(new Date());
|
||||
lawsFile.setLawsFileClassify(convertMq.getLawsFileClassify());
|
||||
lawsFile.setFileName(fileOriName+".pdf");
|
||||
lawsFile.setFileSuffix("pdf");
|
||||
countSuccess = sarLawsFileDao.insertSelective(lawsFile);
|
||||
} else if (SarTypeEnum.BUSINESS.getValue().equals(convertMq.getConvertType())) {
|
||||
SarBussStandFile lawsFile = new SarBussStandFile();
|
||||
lawsFile.setId(UUID.randomUUID(20));
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
<License>
|
||||
<Data>
|
||||
<Products>
|
||||
<Product>Aspose.Total for Java</Product>
|
||||
<Product>Aspose.Words for Java</Product>
|
||||
</Products>
|
||||
<EditionType>Enterprise</EditionType>
|
||||
<SubscriptionExpiry>20991231</SubscriptionExpiry>
|
||||
<LicenseExpiry>20991231</LicenseExpiry>
|
||||
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
|
||||
</Data>
|
||||
<Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=
|
||||
</Signature>
|
||||
</License>
|
||||
@@ -40,6 +40,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
addInterceptor.excludePathPatterns("/api/person/userInfo/getByUserInfoCode");
|
||||
addInterceptor.excludePathPatterns("/api/att/attFile/upload");
|
||||
addInterceptor.excludePathPatterns("/api/sarStandardsInfo/sar-standards-info/exportStandardsInfoExcel");
|
||||
addInterceptor.excludePathPatterns("/api/lawss/sarLawsInfo/exportStandardsInfoExcel");
|
||||
//pcms项目数据下发开放接口
|
||||
addInterceptor.excludePathPatterns("/api/sarStandProjectLibrary/save");
|
||||
addInterceptor.excludePathPatterns("/api/sar-stand-project-team/save");
|
||||
@@ -72,6 +73,11 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
//OCR回调存储文件
|
||||
addInterceptor.excludePathPatterns("/api/ocr/OCRRestful/OcrHandleResult");
|
||||
|
||||
addInterceptor.excludePathPatterns("/api/sarStandProjectLibrary/exportStandAttrInfoExcel");
|
||||
|
||||
// 拆分查看页,导出程序异常
|
||||
addInterceptor.excludePathPatterns("/api/lawss/sarFileSplitItems/exportSplitInfoZip");
|
||||
|
||||
|
||||
// //测试接口使用
|
||||
// addInterceptor.excludePathPatterns("/api/**");
|
||||
|
||||
@@ -21,7 +21,7 @@ public class IDMUtil {
|
||||
private final String app_secret = "Fxi5LHbI5yGbQQDpVp86GcCdXeC5Bjfe";
|
||||
private final String access_url = "http://sso.foton.com.cn/oauth2.0/accessTokenByJson";
|
||||
private final String profile_ur = "http://sso.foton.com.cn/oauth2.0/profileByJson";
|
||||
private final String redirect_url = "https://slrs.foton.com.cn";
|
||||
private final String redirect_url = "https://srms.foton.com.cn";
|
||||
|
||||
public String idmLogin(String code){
|
||||
try{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# 数据库配置
|
||||
#=============================================
|
||||
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.url = jdbc:mysql://39.100.23.127:3306/foton_slrs_test2?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false
|
||||
spring.datasource.url = jdbc:mysql://39.100.23.127:3306/foton_slrs_test2?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
||||
#spring.datasource.url = jdbc:mysql://10.96.10.54/foton_slrs_test?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false
|
||||
spring.datasource.username = root
|
||||
spring.datasource.password = root
|
||||
|
||||
+80
-46
@@ -285,8 +285,12 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getType())) {
|
||||
boolQueryShould.must(QueryBuilders.wildcardQuery("type.keyword", "*"+searchInfoEO.getType()+"*"));
|
||||
}
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandType())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standType.keyword", "*"+searchInfoEO.getStandType()+"*"));
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandType()) && StringUtils.isNotBlank(searchInfoEO.getSelectIndex())) {
|
||||
if(searchInfoEO.getSelectIndex().equals("bussstand")){
|
||||
boolQueryShould.must(QueryBuilders.wildcardQuery("type.keyword", "*"+searchInfoEO.getStandType()+"*"));
|
||||
}else {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standType.keyword", "*"+searchInfoEO.getStandType()+"*"));
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandSort())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("numbershow.keyword", "*"+searchInfoEO.getStandSort()+" "+"*"));
|
||||
@@ -403,6 +407,9 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
// 关键字查询属性字段
|
||||
String keyWordField = field + ".keyword";
|
||||
String keyWordField2 = field + "Name.keyword";
|
||||
if(field.equals("NYLX")){
|
||||
field = field+"CLASS";
|
||||
}
|
||||
if(collectAttrMap.containsKey(field)){
|
||||
List<String> fields = new ArrayList<>();
|
||||
Object json= new JSONTokener(collectAttrMap.get(field).toString()).nextValue();
|
||||
@@ -480,19 +487,32 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
|
||||
private List<String> getStringField(SeniorSearchInfoEO searchInfoEO) {
|
||||
String fieldInfo = InitStandAttrSearchUtil.queryField;
|
||||
List<String> fieldTimeInfo = InitStandAttrSearchUtil.timeFieldList;
|
||||
String fieldLawsInfo = InitStandAttrSearchUtil.queryFieldLaws;
|
||||
List<String> fieldLawsTimeInfo = InitStandAttrSearchUtil.timeFieldListLaws;
|
||||
String fieldBussInfo = InitStandAttrSearchUtil.queryFieldBuss;
|
||||
List<String> fieldBussTimeInfo = InitStandAttrSearchUtil.timeFieldListBuss;
|
||||
if(!fieldBussTimeInfo.isEmpty()){
|
||||
fieldBussTimeInfo.add("FSRQBUSS");
|
||||
}
|
||||
List<String> fieldInfoList = Arrays.asList(fieldInfo .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||
List<String> fieldLawsInfoList = Arrays.asList(fieldLawsInfo .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||
List<String> fieldBussInfoList = Arrays.asList(fieldBussInfo .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectIndex())){
|
||||
fieldInfoList = fieldInfoList.stream().filter(s -> !fieldTimeInfo.contains(s)).collect(Collectors.toList());
|
||||
fieldLawsInfoList = fieldLawsInfoList.stream().filter(s -> !fieldLawsTimeInfo.contains(s)).collect(Collectors.toList());
|
||||
fieldBussInfoList = fieldBussInfoList.stream().filter(s -> !fieldBussTimeInfo.contains(s)).collect(Collectors.toList());
|
||||
if(searchInfoEO.getSelectIndex().equals("stand")){
|
||||
fieldList.addAll(fieldInfoList);
|
||||
}else if(searchInfoEO.getSelectIndex().equals("bussstand")){
|
||||
fieldList.addAll(fieldBussInfoList);
|
||||
}else if(searchInfoEO.getSelectIndex().equals("laws")){
|
||||
fieldList.addAll(fieldLawsInfoList);
|
||||
}else if(searchInfoEO.getSelectIndex().equals("fulltextserch")){
|
||||
fieldList.addAll(fieldInfoList);
|
||||
fieldList.addAll(fieldBussInfoList);
|
||||
fieldList.addAll(fieldLawsInfoList);
|
||||
}
|
||||
}
|
||||
return fieldList;
|
||||
@@ -679,7 +699,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
|
||||
// 高级搜索项,只针对标准
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandSort())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standSort.keyword", "*"+searchInfoEO.getStandSort()+"*"));
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("numbershow.keyword", "*"+searchInfoEO.getStandSort()+"*"));
|
||||
}
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandCode())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standNumber.keyword", "*"+searchInfoEO.getStandCode()+"*"));
|
||||
@@ -732,9 +752,9 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
List<String> fieldList = getStringField(searchInfoEO);
|
||||
List<String> fieldNameList = new ArrayList<>();
|
||||
String[] standStr = {"content","standSort","standNumber","standYear","stand_name","standEnName","standNatureName",
|
||||
"textStatusName","isRelateAccessName","numbershow","standSystem"};
|
||||
"textStatusName","isRelateAccessName","numbershow","standSystem","NYLXCLASS","CLLX"};
|
||||
String[] lawsStr = {"content","lawsType","lawsNumber","lawsName","lawsEnName","lawsNo","issueCompany","lawsTextState","lawsSyqy","lawsSycx","isRelateAccess","lawsYear","lawsNotisyncNum","lawsBulletin","lawsLabel","lawsRemark"};
|
||||
String[] bussstandStr = {"content","standSort","stand_code","standYear","stand_name","standEnName","nameshow","standstateshow","numbershow","textStatusBuss"};
|
||||
String[] bussstandStr = {"content","standSort","stand_code","standYear","stand_name","standEnName","nameshow","standstateshow","numbershow","textStatusBuss","NYLXCLASS","CLLX"};
|
||||
for (String field : fieldList) {
|
||||
// 关键字查询属性字段
|
||||
String keyWordField2 = field + "Name";
|
||||
@@ -791,7 +811,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
String[] seniortypeLaws = {"lawsSyqy","lawsSycx","CYSDLAWS"};
|
||||
seniortype = seniortypeLaws.clone();
|
||||
} else if ("bussstand".equals(searchInfoEO.getSelectIndex())) {
|
||||
String[] seniortypeBuss = {"standSort", "numbershow", "statecode","CYSD","ZRLX","CLLX","CBCD","textStatus","textStatusName","NYLXCLASS"};
|
||||
String[] seniortypeBuss = {"standSort", "numbershow", "statecode","CLLX","textStatus","textStatusName","NYLXCLASS"};
|
||||
seniortype = seniortypeBuss.clone();
|
||||
} else {
|
||||
String[] seniortypeMsg = {"module"};
|
||||
@@ -803,13 +823,6 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
"JASO","JIS","GSO","GOST","ΓOCT","TP","SASO","UAE","CONTRAN","DENATRAN","ABNT NBR","NBR","INMETRO","CONAMA","Normative Instruction","ADR"};
|
||||
String[] bussStandVerify = {"Q/FT A","Q/FT B","Q/FT E","Q/FT F","Q/FT G","Q/FT M","Q/FT Q","Q/FT R","Q/FT S","Q/FT T","Q/FT V","Q/FT X","Q/FT Y","Q/FT Z","Q/QCBFC"};
|
||||
List<String> list = new ArrayList<>();
|
||||
if(standType.equals("INLAND")){
|
||||
list = Stream.of(standVerify).collect(Collectors.toList());
|
||||
}else if(standType.equals("bussstand")){
|
||||
list = Stream.of(bussStandVerify).collect(Collectors.toList());
|
||||
}else if(standType.equals("FOREIGN")){
|
||||
list = Stream.of(standEnVerify).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
for (int i = 0; i < seniortype.length; i++) {
|
||||
@@ -822,44 +835,54 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
result = SearchResponseToList(response);
|
||||
searchInfoEO.getPager().setRowCount((int) response.getHits().getTotalHits().value);
|
||||
Map<String, Aggregation> aggmap = response.getAggregations().asMap();
|
||||
if (!result.isEmpty()) {
|
||||
for (int i = 0; i < seniortype.length; i++) {
|
||||
//分组后得到的数据整合
|
||||
Object results = aggmap.get("by_" + seniortype[i]);
|
||||
if(results instanceof StringTerms){
|
||||
StringTerms stResult = (StringTerms) results;
|
||||
Map<String, Object> submap = new HashMap<>();
|
||||
for (StringTerms.Bucket bucket : stResult.getBuckets()) {
|
||||
// 多选处理,当前全部允许多选
|
||||
String keyName = bucket.getKeyAsString();
|
||||
String[] keyNameList = keyName.split(",");
|
||||
// 对于属性允许多选,此处做出处理
|
||||
if(keyNameList.length>0){
|
||||
for (String itemKeyName: keyNameList){
|
||||
// put 之前判断是否已存在该key ,如果不存在,直接放入值,如果存在,需要进行一个累加
|
||||
keyNameFilter(standType, list, submap, bucket, itemKeyName);
|
||||
|
||||
if(StringUtils.isNotBlank(standType)){
|
||||
if(standType.equals("INLAND")){
|
||||
list = Stream.of(standVerify).collect(Collectors.toList());
|
||||
}else if(standType.equals("bussstand")){
|
||||
list = Stream.of(bussStandVerify).collect(Collectors.toList());
|
||||
}else if(standType.equals("FOREIGN")){
|
||||
list = Stream.of(standEnVerify).collect(Collectors.toList());
|
||||
}
|
||||
if (!result.isEmpty()) {
|
||||
for (int i = 0; i < seniortype.length; i++) {
|
||||
//分组后得到的数据整合
|
||||
Object results = aggmap.get("by_" + seniortype[i]);
|
||||
if(results instanceof StringTerms){
|
||||
StringTerms stResult = (StringTerms) results;
|
||||
Map<String, Object> submap = new HashMap<>();
|
||||
for (StringTerms.Bucket bucket : stResult.getBuckets()) {
|
||||
// 多选处理,当前全部允许多选
|
||||
String keyName = bucket.getKeyAsString();
|
||||
String[] keyNameList = keyName.split(",");
|
||||
// 对于属性允许多选,此处做出处理
|
||||
if(keyNameList.length>0){
|
||||
for (String itemKeyName: keyNameList){
|
||||
// put 之前判断是否已存在该key ,如果不存在,直接放入值,如果存在,需要进行一个累加
|
||||
keyNameFilter(standType, list, submap, bucket, itemKeyName);
|
||||
}
|
||||
}
|
||||
else {
|
||||
keyNameFilter(standType, list, submap, bucket, keyName);
|
||||
}
|
||||
}
|
||||
else {
|
||||
keyNameFilter(standType, list, submap, bucket, keyName);
|
||||
}
|
||||
map.put(seniortype[i], submap);
|
||||
}
|
||||
else{
|
||||
Map<String, Object> submap = new HashMap<>();
|
||||
map.put(seniortype[i], submap);
|
||||
}
|
||||
map.put(seniortype[i], submap);
|
||||
}
|
||||
else{
|
||||
Map<String, Object> submap = new HashMap<>();
|
||||
map.put(seniortype[i], submap);
|
||||
}
|
||||
|
||||
}
|
||||
if(standType.equals("bussstand")){
|
||||
map.forEach((s, o) -> {
|
||||
if(s.equals("numbershow")){
|
||||
map.put("standSort",o);
|
||||
}
|
||||
});
|
||||
}
|
||||
result.get(0).put("groupdata", map);
|
||||
}
|
||||
if(standType.equals("bussstand")){
|
||||
map.forEach((s, o) -> {
|
||||
if(s.equals("numbershow")){
|
||||
map.put("standSort",o);
|
||||
}
|
||||
});
|
||||
}
|
||||
result.get(0).put("groupdata", map);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1153,6 +1176,17 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
QueryBuilder multiQuery = queryInResult(searchInfoEO);
|
||||
boolQueryBuilder.must(multiQuery);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS())){
|
||||
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getNYLXCLASS(),
|
||||
"textContent"
|
||||
).minimumShouldMatch("100%").field("title",10f));
|
||||
}else if(StringUtils.isNotBlank(searchInfoEO.getCLLX())){
|
||||
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getCLLX(),
|
||||
"textContent"
|
||||
).minimumShouldMatch("100%").field("title",10f));
|
||||
}
|
||||
|
||||
HighlightBuilder hiBuilder=new HighlightBuilder();
|
||||
HighlightBuilder.Field highlightTitle = new HighlightBuilder.Field("title");
|
||||
hiBuilder.field(highlightTitle);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user