Merge branch 'develop_master' into develop_3
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,7 +11,9 @@ 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;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
@@ -31,6 +33,7 @@ import java.util.List;
|
||||
*/
|
||||
@Component
|
||||
@EnableScheduling
|
||||
@Slf4j
|
||||
public class ProcessTimer {
|
||||
|
||||
@Autowired
|
||||
@@ -178,7 +181,35 @@ public class ProcessTimer {
|
||||
busMes.setJson(jsonObject.toJSONString());
|
||||
busMes.setUserId(jsonObject.getString("revisionId"));
|
||||
Wrapper<String> wrapper=workFlowFeignClient.completeTaskByUserId(busMes);
|
||||
System.out.println("dasda");
|
||||
log.info("政策课题组会后流程已发起");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@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("标准化活动会后流程自动发起");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,6 +218,7 @@ public class ProcessTimer {
|
||||
public static void main(String[]args){
|
||||
ProcessTimer processTimer = new ProcessTimer();
|
||||
processTimer.everyDayTenOlockScan();
|
||||
processTimer.everyDayTenOlockScanSAM();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,11 @@ public class ActDefineStartMap {
|
||||
map.put("18","policyResearchGroupAttendMeeting");
|
||||
map.put("19","policyResearchGroupAfterMeeting");
|
||||
|
||||
//企标复审流程
|
||||
map.put("23","enterpriseBidReviewProcess");
|
||||
map.put("24","Aboliish");
|
||||
map.put("25","enterpriseStandardSystemRevisionPlan");
|
||||
|
||||
return map.get(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,18 +49,19 @@ public class WaterMarkUtil {
|
||||
// set Transparency
|
||||
PdfGState gs = new PdfGState();
|
||||
// 设置透明度为0.2
|
||||
gs.setFillOpacity(0.5f);
|
||||
gs.setFillOpacity(0.25f);
|
||||
under.setGState(gs);
|
||||
under.restoreState();
|
||||
under.beginText();
|
||||
under.setFontAndSize(base, 13);
|
||||
under.setFontAndSize(base, 50);
|
||||
under.setTextMatrix(30, 30);
|
||||
under.setColorFill(BaseColor.LIGHT_GRAY);
|
||||
for (int y = 0; y < 10; y++) {
|
||||
for (int x = 0; x < 8; x++) {
|
||||
for (int y = 0; y < 5; y++) {
|
||||
for (int x = 0; x < 10; 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");
|
||||
@@ -54,6 +55,10 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
//标准征求意见导出
|
||||
addInterceptor.excludePathPatterns("/api/slrs/sar-public-idea-all/tuallStand");
|
||||
//标准法规清单导出
|
||||
addInterceptor.excludePathPatterns("/api/sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById");
|
||||
//标准法规清单车型导出
|
||||
addInterceptor.excludePathPatterns("/api/sarStandProjectLibrary/exportStandAttrInfoExcel");
|
||||
//为符合项整改导出
|
||||
addInterceptor.excludePathPatterns("/api/sarStandUnqualified/sar-stand-unqualified/exportStandUnqulifiedExcel");
|
||||
//文件预览
|
||||
@@ -68,6 +73,14 @@ 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/att/attFile/downloadFile");
|
||||
|
||||
|
||||
// //测试接口使用
|
||||
// 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
|
||||
@@ -61,6 +61,7 @@ spring.rabbitmq.listener.simple.retry.max-attempts= 5
|
||||
# 文档存储路径指向
|
||||
# ==============================================
|
||||
file.path=/usr/laws/file/
|
||||
file.split.path=/usr/laws/file/
|
||||
|
||||
# 云端OCR识别集成配置参数
|
||||
#OCR请求识别URL地址
|
||||
|
||||
@@ -267,6 +267,7 @@ public class SeniorSearchInfoEO extends BasePage {
|
||||
private String lawsLabel;
|
||||
private String lawsRemark;
|
||||
private String CYSDLAWS;
|
||||
private String NYLXCLASS;
|
||||
|
||||
|
||||
|
||||
|
||||
+142
-46
@@ -7,7 +7,9 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.elasticsearch.action.search.SearchRequestBuilder;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
@@ -32,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.lang.reflect.Field;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -172,7 +175,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}else {
|
||||
boolQueryBuilder.must(boolQueryShould);
|
||||
}
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder);
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder).setTrackTotalHits(true);
|
||||
//在结果中检索
|
||||
if (StringUtils.isNotEmpty(searchInfoEO.getResultKeyword()) && StringUtils.isNotBlank(searchInfoEO.getIsHigh())) {
|
||||
QueryBuilder multiQuery = queryInResult(searchInfoEO);
|
||||
@@ -282,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()+" "+"*"));
|
||||
@@ -310,7 +317,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
boolQueryBuilder.must(multiQuery);
|
||||
}
|
||||
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder);
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder).setTrackTotalHits(true);
|
||||
|
||||
// 获取查询到的结果
|
||||
result = countStandSearchResult(searchRequestBuilder,searchInfoEO);
|
||||
@@ -386,6 +393,12 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
collectAttrMap.put("CYSDLAWS",array);
|
||||
}
|
||||
|
||||
if(searchInfoEO.getNYLXCLASS() != null && StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS())){
|
||||
List<String> fieldList = Arrays.asList(searchInfoEO.getNYLXCLASS() .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||
JSONArray array= JSONArray.parseArray(JSON.toJSONString(fieldList));
|
||||
collectAttrMap.put("NYLXCLASS",array);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
List<String> fieldList = getStringField(searchInfoEO);
|
||||
@@ -394,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();
|
||||
@@ -471,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;
|
||||
@@ -503,11 +532,11 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
if(list.size() > 1){
|
||||
BoolQueryBuilder boolQueryBuilderShould = new BoolQueryBuilder();
|
||||
list.forEach(s -> {
|
||||
boolQueryBuilderShould.should(QueryBuilders.wildcardQuery("numbershow.keyword", "*"+s+" "+"*"));
|
||||
boolQueryBuilderShould.should(QueryBuilders.termQuery("standSort.keyword", s));
|
||||
});
|
||||
boolQueryBuilder.must(boolQueryBuilderShould);
|
||||
}else {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("numbershow.keyword", "*"+searchInfoEO.getStandSort()+" "+"*"));
|
||||
boolQueryBuilder.must(QueryBuilders.termQuery("standSort.keyword", searchInfoEO.getStandSort()));
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandNumber())) {
|
||||
@@ -670,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()+"*"));
|
||||
@@ -723,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";
|
||||
@@ -776,22 +805,29 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
// 循环统计各种类型数据
|
||||
String[] seniortype;
|
||||
if("stand".equals(searchInfoEO.getSelectIndex())) {
|
||||
String[] seniortypeStand = {"standSort", "statecode","CYSD","ZRLX","CLLX","CBCD","textStatus","textStatusName"};
|
||||
String[] seniortypeStand = {"standSort", "numbershow","statecode","CYSD","ZRLX","CLLX","CBCD","textStatus","textStatusName","NYLXCLASS"};
|
||||
seniortype = seniortypeStand.clone();
|
||||
} else if("laws".equals(searchInfoEO.getSelectIndex())){
|
||||
String[] seniortypeLaws = {"lawsSyqy","lawsSycx","CYSDLAWS"};
|
||||
seniortype = seniortypeLaws.clone();
|
||||
} else if ("bussstand".equals(searchInfoEO.getSelectIndex())) {
|
||||
String[] seniortypeBuss = {"textStatusBuss","QCDW"};
|
||||
String[] seniortypeBuss = {"standSort", "numbershow", "statecode","CLLX","textStatus","textStatusName","NYLXCLASS"};
|
||||
seniortype = seniortypeBuss.clone();
|
||||
} else {
|
||||
String[] seniortypeMsg = {"module"};
|
||||
seniortype = seniortypeMsg.clone();
|
||||
}
|
||||
String standType = searchInfoEO.getStandType();
|
||||
String[] standVerify = {"GB","GB/T","QC/T","JT","JB","GA","GJB","HJ"};
|
||||
String[] standEnVerify = {"ECE","EU","EC","EEC","ISO","IEC","GTR","CFR",
|
||||
"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<>();
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
for (int i = 0; i < seniortype.length; i++) {
|
||||
//分组依靠关键字terms
|
||||
TermsAggregationBuilder aggregationBuilders = AggregationBuilders.terms("by_" + seniortype[i]).field(seniortype[i] + ".keyword").size(1000);
|
||||
TermsAggregationBuilder aggregationBuilders = AggregationBuilders.terms("by_" + seniortype[i]).field(seniortype[i] + ".keyword").size(100000);
|
||||
searchRequestBuilder.addAggregation(aggregationBuilders);
|
||||
}
|
||||
// 获取查询到的结果
|
||||
@@ -799,51 +835,100 @@ 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 ,如果不存在,直接放入值,如果存在,需要进行一个累加
|
||||
if(submap.containsKey(itemkeyname)){
|
||||
submap.put(itemkeyname.trim(), (long)submap.get(itemkeyname)+ bucket.getDocCount());
|
||||
|
||||
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 {
|
||||
submap.put(itemkeyname.trim(), bucket.getDocCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(submap.containsKey(keyname)){
|
||||
submap.put(keyname.trim(), (long)submap.get(keyname)+ bucket.getDocCount());
|
||||
}
|
||||
else {
|
||||
submap.put(keyname.trim(), bucket.getDocCount());
|
||||
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);
|
||||
}
|
||||
result.get(0).put("groupdata", map);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Map<String, Object> objectToMap(Object obj){
|
||||
if(obj == null){
|
||||
return null;
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
Field[] declaredFields = obj.getClass().getDeclaredFields();
|
||||
try {
|
||||
for (Field field : declaredFields) {
|
||||
field.setAccessible(true);
|
||||
map.put(field.getName(), field.get(obj));
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.getMessage();
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
private void keyNameFilter(String standType, List<String> list, Map<String, Object> submap, StringTerms.Bucket bucket, String keyname) {
|
||||
if(standType.equals("bussstand")){
|
||||
if(!list.isEmpty()){
|
||||
String finalKeyName = keyname;
|
||||
List<String> list1 = list.stream().filter(string-> (finalKeyName.contains(string))).collect(Collectors.toList());
|
||||
if(!list1.isEmpty()){
|
||||
if(submap.containsKey(list1.get(0))){
|
||||
submap.put(list1.get(0).trim(), (long)submap.get(list1.get(0).trim())+ bucket.getDocCount());
|
||||
}else {
|
||||
submap.put(list1.get(0).trim(), bucket.getDocCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if(submap.containsKey(keyname)){
|
||||
submap.put(keyname.trim(), (long)submap.get(keyname)+ bucket.getDocCount());
|
||||
}else {
|
||||
submap.put(keyname.trim(), bucket.getDocCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> SearchResponseToList(SearchResponse searchResponse) {
|
||||
List<Map<String, Object>> sourceList = new ArrayList<Map<String, Object>>();
|
||||
@@ -1091,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);
|
||||
@@ -1110,7 +1206,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
|
||||
// boolQueryBuilder.must(QueryBuilders.matchQuery("valid_flag", 0));
|
||||
// boolQueryBuilder.should(boolQueryBuilderShould);
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder);
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder).setTrackTotalHits(true);
|
||||
// 获取查询到的结果
|
||||
SearchResponse response = searchRequestBuilder.get();
|
||||
for (SearchHit searchHit : response.getHits().getHits()) {
|
||||
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.adc.da.slrs.esRevisePlan.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企标制修订计划 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-14
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|EsRevisePlan|")
|
||||
@RequestMapping("api/esRevisePlan/es-revise-plan")
|
||||
public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
||||
|
||||
@Autowired
|
||||
IEsRevisePlanService iEsRevisePlanService;
|
||||
|
||||
@ApiOperation(value = "获取所有企标计划")
|
||||
@GetMapping("getAllPlans")
|
||||
public ResponseMessage<Object> getAllPlans(EsRevisePlan esRevisePlan){
|
||||
List<EsRevisePlan> esRevisePlans = iEsRevisePlanService.getAllPlans(esRevisePlan);
|
||||
PageInfo<EsRevisePlan> pageInfo = getPageInfo(esRevisePlan.getPager(),esRevisePlans);
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "多条件查询企标计划")
|
||||
@PostMapping("queryAllPlans")
|
||||
public ResponseMessage<Object> queryAllPlans(EsRevisePlan esRevisePlan){
|
||||
List<EsRevisePlan> esRevisePlans = iEsRevisePlanService.queryAllPlans(esRevisePlan);
|
||||
PageInfo<EsRevisePlan> pageInfo = getPageInfo(esRevisePlan.getPager(),esRevisePlans);
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取单个企标计划详情")
|
||||
@GetMapping("getPlanInfo")
|
||||
public ResponseMessage<Object> getPlanInfo(String id){
|
||||
return Result.success(iEsRevisePlanService.getOnePlan(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑企标计划")
|
||||
@PostMapping("modPlan")
|
||||
public ResponseMessage<Object> modPlan(EsRevisePlan esRevisePlan){
|
||||
return Result.success(iEsRevisePlanService.modPlan(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加企标计划")
|
||||
@PostMapping("addPlan")
|
||||
public ResponseMessage<Object> addPlan(EsRevisePlan esRevisePlan){
|
||||
return Result.success(iEsRevisePlanService.addPlan(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除单个企标计划")
|
||||
@GetMapping("delPlan")
|
||||
public ResponseMessage<Object> delPlan(String id){
|
||||
return Result.success(iEsRevisePlanService.delPlan(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量删除企标计划")
|
||||
@GetMapping("delPlans")
|
||||
public ResponseMessage<Object> delPlans(String ids){
|
||||
return Result.success(iEsRevisePlanService.delPlans(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.adc.da.slrs.esRevisePlan.dao;
|
||||
|
||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdAssocCost;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企标制修订计划 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-14
|
||||
*/
|
||||
public interface EsRevisePlanDao extends BaseMapper<EsRevisePlan> {
|
||||
Integer getTotal();
|
||||
Integer getQueryTotal(EsRevisePlan esRevisePlan);
|
||||
List<EsRevisePlan> selectAll(EsRevisePlan esRevisePlan);//查询所有
|
||||
List<EsRevisePlan> queryAll(EsRevisePlan esRevisePlan);//多条件查询
|
||||
EsRevisePlan selectOne(String id);//查询详情
|
||||
|
||||
int updateOne(EsRevisePlan esRevisePlan);//编辑
|
||||
int insertOne(EsRevisePlan esRevisePlan);//插入
|
||||
int deleteOne(String id);//删除
|
||||
int deleteBatch(String[] ids);//批量删除
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.adc.da.slrs.esRevisePlan.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企标制修订计划
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-14
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="EsRevisePlan对象", description="企标制修订计划")
|
||||
public class EsRevisePlan extends BasePage {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "企标名称")
|
||||
private String esName;
|
||||
|
||||
@ApiModelProperty(value = "计划状态")
|
||||
private String planStatus;
|
||||
|
||||
@ApiModelProperty(value = "制修订状态")
|
||||
private String reviseStatus;
|
||||
|
||||
@ApiModelProperty(value = "起草人")
|
||||
private String drafter;
|
||||
|
||||
@ApiModelProperty(value = "评审责任人")
|
||||
private String resPerson;
|
||||
|
||||
@ApiModelProperty(value = "工作组组长")
|
||||
private String wgLeader;
|
||||
|
||||
@ApiModelProperty(value = "计划标准初稿完成时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date draftTime;
|
||||
|
||||
@ApiModelProperty(value = "计划标准发布时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date releaseTime;
|
||||
|
||||
@ApiModelProperty(value = "起草责任单位")
|
||||
private String unit;
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.adc.da.slrs.esRevisePlan.service;
|
||||
|
||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企标制修订计划 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-14
|
||||
*/
|
||||
public interface IEsRevisePlanService extends IService<EsRevisePlan> {
|
||||
List<EsRevisePlan> getAllPlans(EsRevisePlan esRevisePlan);//查询所有
|
||||
List<EsRevisePlan> queryAllPlans(EsRevisePlan esRevisePlan);//多条件查询
|
||||
EsRevisePlan getOnePlan(String id);//查询详情
|
||||
|
||||
int modPlan(EsRevisePlan esRevisePlan);//编辑
|
||||
int addPlan(EsRevisePlan esRevisePlan);//插入
|
||||
int delPlan(String id);//删除
|
||||
int delPlans(String ids);//批量删除
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.adc.da.slrs.esRevisePlan.service.impl;
|
||||
|
||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanDao;
|
||||
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
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 zcr
|
||||
* @since 2021-11-14
|
||||
*/
|
||||
@Service
|
||||
public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevisePlan> implements IEsRevisePlanService {
|
||||
|
||||
@Autowired
|
||||
EsRevisePlanDao esRevisePlanDao;
|
||||
|
||||
@Override
|
||||
public List<EsRevisePlan> getAllPlans(EsRevisePlan esRevisePlan) {
|
||||
Integer count = esRevisePlanDao.getTotal();
|
||||
esRevisePlan.getPager().setRowCount(count);
|
||||
List<EsRevisePlan> esRevisePlans = esRevisePlanDao.selectAll(esRevisePlan);
|
||||
return esRevisePlans;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EsRevisePlan> queryAllPlans(EsRevisePlan esRevisePlan) {
|
||||
Integer count = esRevisePlanDao.getQueryTotal(esRevisePlan);
|
||||
esRevisePlan.getPager().setRowCount(count);
|
||||
List<EsRevisePlan> esRevisePlans = esRevisePlanDao.queryAll(esRevisePlan);
|
||||
return esRevisePlans;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EsRevisePlan getOnePlan(String id) {
|
||||
return esRevisePlanDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int modPlan(EsRevisePlan esRevisePlan) {
|
||||
return esRevisePlanDao.updateOne(esRevisePlan);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addPlan(EsRevisePlan esRevisePlan) {
|
||||
esRevisePlan.setId(UUIDUtils.randomUUID(32));
|
||||
return esRevisePlanDao.insertOne(esRevisePlan);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delPlan(String id) {
|
||||
return esRevisePlanDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delPlans(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return esRevisePlanDao.deleteBatch(str);
|
||||
}
|
||||
}
|
||||
+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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+134
-2
@@ -220,7 +220,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
if (StringUtils.isNotBlank(sarBussionessStandEO.getStandYear())) {
|
||||
number += "-" + sarBussionessStandEO.getStandYear();
|
||||
}
|
||||
String content = "新增" + number + " 《" + sarBussionessStandEO.getStandName() + "》";
|
||||
String content = "入库" + number + " 《" + sarBussionessStandEO.getStandName() + "》";
|
||||
sarUpdLogEOService.createBaseLog(sarBussionessStandEO.getId(),"BUSINESS",content);
|
||||
if(elasflag) {
|
||||
attrInfoShowSearchDetails(sarBussionessStandEO,"add");
|
||||
@@ -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);
|
||||
attrInfoShow(getList);
|
||||
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);
|
||||
@@ -332,6 +367,55 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShowExport (List<SarBussionessStand> sarlist) throws Exception {
|
||||
for(SarBussionessStand row : sarlist){
|
||||
attrInfoDetailsExport(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
Map<String, Object> getNewMap = new LinkedHashMap<>();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
String svppsTip = "";
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if ("SVPPS".equals(name)) {
|
||||
Object svpps = entry.getValue();
|
||||
if (svpps != null && StringUtils.isNotBlank(svpps.toString())) {
|
||||
svppsTip = svpps.toString();
|
||||
}
|
||||
if (StringUtils.isNotBlank(svppsTip)) {
|
||||
svppsTip = sysInfoEOService.getSvppsNamesTipByIds(svppsTip);
|
||||
}
|
||||
value = String.valueOf(getAttrMap.get("SVPPSName"));
|
||||
entry.setValue(value);
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.fileFieldListBuss != null && InitStandAttrUtil.fileFieldListBuss.size() > 0 && InitStandAttrUtil.fileFieldListBuss.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
if("ZYQCR".equals(name)||"QTQCR".equals(name)){
|
||||
if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
}else{
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
getAttrMap.put("SVPPSTips",svppsTip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SarBussionessStand updateSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception {
|
||||
String standId = sarBussionessStandEO.getId();
|
||||
SarBussionessStand beforeStandEO = this.baseMapper.selectByPrimaryKey(standId);
|
||||
@@ -991,6 +1075,54 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetailsExport (SarBussionessStand row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarBussStandAttrInfoEODao.selectStandFieldAndData(fieldInfo,row.getId());
|
||||
if (InitStandAttrUtil.clobFieldListBuss != null && !InitStandAttrUtil.clobFieldListBuss.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldListBuss) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField,fieldValue);
|
||||
}
|
||||
}
|
||||
// 组织机构和人员
|
||||
Map<String,Object> newMap = new HashMap<>();
|
||||
if(getAttrMap != null){
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
Object value1 = entry.getValue();
|
||||
if (value1 != null && value1.toString().equals("\"null\"")){
|
||||
entry.setValue("");
|
||||
}
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getOrgNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getUserNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
+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){
|
||||
|
||||
+6
-2
@@ -208,8 +208,12 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
}
|
||||
}
|
||||
}
|
||||
String completedString = builder.delete(builder.length()-1,builder.length()).toString();
|
||||
list1.setZRBM(completedString);
|
||||
try {
|
||||
String completedString = builder.delete(builder.length()-1,builder.length()).toString();
|
||||
list1.setZRBM(completedString);
|
||||
}catch (Exception e){
|
||||
System.out.println(e);
|
||||
}
|
||||
}else {
|
||||
for (Map<String, String> map1 : zrbn) {
|
||||
if (map1.get("value").equals(list1.getZRBM())) {
|
||||
|
||||
+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")
|
||||
|
||||
+23
-2
@@ -230,6 +230,27 @@ public class SarLawsStandInfoPage extends BasePage {
|
||||
private String GLWJBUSS;
|
||||
private String XCSJBUSS;
|
||||
|
||||
private String SSRQLAWS;
|
||||
private String XCXSSRQLAWS;
|
||||
private String ZCXSSRQLAWS;
|
||||
private String ZCWBLAWS;
|
||||
private String GCWBLAWS;
|
||||
private String JDWJLAWS;
|
||||
private String FBJGLAWS;
|
||||
private String CYSDLAWS;
|
||||
private String TGRLAWS;
|
||||
private String TGDWLAWS;
|
||||
private String NYLXLAWS;
|
||||
private String YYRZLAWS;
|
||||
private String ZRBMLAWS;
|
||||
private String ZRGCSLAWS;
|
||||
private String DTWJHLAWS;
|
||||
private String BDTWJHLAWS;
|
||||
private String YYBZZCLAWS;
|
||||
private String CHJLLAWS;
|
||||
private String GLWJLAWS;
|
||||
|
||||
|
||||
//页面排序
|
||||
private String paixu;
|
||||
private String shunxu;
|
||||
@@ -247,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 = "";
|
||||
|
||||
}
|
||||
|
||||
+127
-3
@@ -298,6 +298,54 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetailsExport (SarLawsStandInfo row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldLaws;
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarLawsAttrInfoDao.selectLawsFieldAndData(fieldInfo,row.getId());
|
||||
if (InitStandAttrUtil.clobFieldListLaws != null && !InitStandAttrUtil.clobFieldListLaws.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldListLaws) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField,fieldValue);
|
||||
}
|
||||
}
|
||||
// 组织机构和人员
|
||||
Map<String,Object> newMap = new HashMap<>();
|
||||
if(getAttrMap != null){
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
Object value1 = entry.getValue();
|
||||
if (value1 != null && value1.toString().equals("\"null\"")){
|
||||
entry.setValue("");
|
||||
}
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapLaws.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getOrgNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getUserNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, Object> transformUpperCase(Map<String, Object> orgMap) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
@@ -382,17 +430,52 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setOrderBy("SAR_LAWS_ATTR_INFO.issue_time is null,SAR_LAWS_ATTR_INFO.issue_time desc,SAR_LAWS_ATTR_INFO.id");
|
||||
// page.setOrderBy("SAR_LAWS_ATTR_INFO.issue_time is null,SAR_LAWS_ATTR_INFO.issue_time desc,SAR_LAWS_ATTR_INFO.id");
|
||||
if(userId != null){
|
||||
page.setUserId(userId);
|
||||
}else {
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
|
||||
if (null != page.getNowOrderBy()) {
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
|
||||
List<SarLawsStandInfo> rows = this.baseMapper.getSarStandardsExportInfo(page);
|
||||
attrInfoShow(rows);
|
||||
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);
|
||||
@@ -432,6 +515,45 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShowExport (List<SarLawsStandInfo> sarlist) throws Exception {
|
||||
for(SarLawsStandInfo row : sarlist){
|
||||
attrInfoDetailsExport(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
Map<String, Object> getNewMap = new LinkedHashMap<>();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
String svppsTip = "";
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldListLaws != null && InitStandAttrUtil.fileFieldListLaws.size() > 0 && InitStandAttrUtil.fileFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapLaws.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
if("ZYQCR".equals(name)||"QTQCR".equals(name)){
|
||||
if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
}else{
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
getAttrMap.put("SVPPSTips",svppsTip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SarLawsStandInfoPage updateStandardsMenu(SarLawsStandInfoPage standardsInfoEO) {
|
||||
SarLawsMenu sarStandMenuEO = new SarLawsMenu();
|
||||
@@ -507,6 +629,8 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
createStandAttrInfo(sarLawsStandInfo);
|
||||
// 根据代替标准号 ,修改代替标准号标准中的,被代替标准号
|
||||
// updateReplaceConnect(sarLawsStandInfo);
|
||||
updateCiteStand(sarLawsStandInfo, null, "DTWJHLAWS", "BDTWJHLAWS");
|
||||
|
||||
//修改收藏分享编号名称
|
||||
updateCollectAndShare(sarLawsStandInfo);
|
||||
// 记录修改日志
|
||||
@@ -886,7 +1010,7 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
if (StringUtils.isNotBlank(sarLawsStandInfo.getLawsNumber())) {
|
||||
number = sarLawsStandInfo.getLawsNumber();
|
||||
}
|
||||
String content = "新增" + number + " 《" + sarLawsStandInfo.getLawsName() + "》";
|
||||
String content = "入库" + number + " 《" + sarLawsStandInfo.getLawsName() + "》";
|
||||
sarUpdLogEOService.createBaseLog(sarLawsStandInfo.getId(), sarLawsStandInfo.getLawsType() + "_Laws", content);
|
||||
if(elasflag) {
|
||||
// 消息队列
|
||||
|
||||
+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(){
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarResource.dao;
|
||||
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -14,6 +15,7 @@ import java.util.List;
|
||||
* @author zyl
|
||||
* @since 2021-06-30
|
||||
*/
|
||||
@Repository
|
||||
public interface TsResourceDao extends BaseMapper<TsResource> {
|
||||
|
||||
List<TsResource> queryMenuByDis(TsResource sarMenuEO);
|
||||
|
||||
@@ -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);
|
||||
|
||||
+50
-16
@@ -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>
|
||||
@@ -151,6 +149,10 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
tsResourceQueryWrapper.eq("sor_divide",tsResource.getSorDivide());
|
||||
}
|
||||
tsResourceQueryWrapper.isNull("PARENT_ID");
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("INLAND_STAND");
|
||||
list.add("FOREIGN_STAND");
|
||||
tsResourceQueryWrapper.notIn("SOR_DIVIDE",list);
|
||||
tsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> TsResources=dao.selectList(tsResourceQueryWrapper);
|
||||
for(TsResource TsResource:TsResources){
|
||||
@@ -180,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),(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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,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<>();
|
||||
@@ -284,19 +320,17 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
|
||||
/**
|
||||
* 递归调用获取子节点
|
||||
* @param parent:父节点
|
||||
* @return List<TsResource>
|
||||
*/
|
||||
private List<TsResource> recursionGetListChildren(TsResource parent,List<String> getMenuIdList){
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.eq("PARENT_ID",parent.getId());
|
||||
TsResourceQueryWrapper.in("ID",getMenuIdList);
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
for(TsResource TsResource:children){
|
||||
TsResource.setChildren(recursionGetListChildren((TsResource),(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)));
|
||||
});
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
+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("ISSUE_TIME");//发布日期
|
||||
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;
|
||||
|
||||
+195
-26
@@ -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;
|
||||
}
|
||||
@@ -413,6 +441,53 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetailsExport(SarStandardsInfo row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarStandAttrInfoEODao.selectStandFieldAndData(fieldInfo, row.getId());
|
||||
if (InitStandAttrUtil.clobFieldList != null && !InitStandAttrUtil.clobFieldList.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldList) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField, fieldValue);
|
||||
}
|
||||
}
|
||||
// 组织机构和人员
|
||||
Map<String, Object> newMap = new HashMap<>();
|
||||
if (getAttrMap != null) {
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
if ("\"null\"".equals(entry.getValue())) {
|
||||
entry.setValue("");
|
||||
}
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMap.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getOrgNamesByIds(value);
|
||||
newMap.put(name + "Name", value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getUserNamesByIds(value);
|
||||
newMap.put(name + "Name", value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoSearchDetails(SarStandardsInfo row,String type) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
@@ -604,6 +679,55 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShowExport(List<SarStandardsInfo> sarlist) throws Exception {
|
||||
for (SarStandardsInfo row : sarlist) {
|
||||
attrInfoDetailsExport(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
Map<String, Object> getNewMap = new LinkedHashMap<>();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
String svppsTip = "";
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if ("SVPPS".equals(name)) {
|
||||
Object svpps = entry.getValue();
|
||||
if (svpps != null && StringUtils.isNotBlank(svpps.toString())) {
|
||||
svppsTip = svpps.toString();
|
||||
}
|
||||
if (StringUtils.isNotBlank(svppsTip)) {
|
||||
svppsTip = sysInfoEOService.getSvppsNamesTipByIds(svppsTip);
|
||||
}
|
||||
value = String.valueOf(getAttrMap.get("SVPPSName"));
|
||||
entry.setValue(value);
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.fileFieldList != null && InitStandAttrUtil.fileFieldList.size() > 0 && InitStandAttrUtil.fileFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if ("GZZXX".equals(name)) {
|
||||
value = sysInfoEOService.getGroupNamesByIds(value);
|
||||
} else {
|
||||
String selVal = InitStandAttrUtil.selectFieldMap.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
if (getAttrMap.get(name + "Name") != null) {
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
getAttrMap.put("SVPPSTips", svppsTip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* @Description: 新增标准
|
||||
@@ -655,7 +779,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
if (StringUtils.isNotBlank(sarStandardsInfoEO.getStandYear())) {
|
||||
number += "-" + sarStandardsInfoEO.getStandYear();
|
||||
}
|
||||
String content = "新增" + number + " 《" + sarStandardsInfoEO.getStandName() + "》";
|
||||
String content = "入库" + number + " 《" + sarStandardsInfoEO.getStandName() + "》";
|
||||
sarUpdLogEOService.createBaseLog(sarStandardsInfoEO.getId(), sarStandardsInfoEO.getStandType() + "_STAND", content);
|
||||
if(elasflag) {
|
||||
// 消息队列
|
||||
@@ -1412,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();
|
||||
@@ -1456,19 +1580,23 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
page = (SarStandardsInfoEOPage) JSONObject.toBean(jsonObject, SarStandardsInfoEOPage.class);
|
||||
page.setStandType(standardsInfoExcelVO.getStandType());
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
List<String> getMenuIdList = new ArrayList<>();
|
||||
if(standardsInfoExcelVO.getUserId() != null){
|
||||
getMenuIdList= tsUserService.getResourceUserId(standardsInfoExcelVO.getUserId());
|
||||
}
|
||||
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = sarMenuEOService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (org.apache.commons.lang.StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = com.alibaba.fastjson.JSONObject.parseArray(page.getAdvanceSearchVOStr(), SarAdvanceSearchVO.class);
|
||||
@@ -1480,17 +1608,58 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setOrderBy("SAR_STANDARDS_INFO.issue_time is null,SAR_STANDARDS_INFO.issue_time desc,SAR_STANDARDS_INFO.id");
|
||||
if(standardsInfoExcelVO.getUserId() != null){
|
||||
page.setUserId(standardsInfoExcelVO.getUserId());
|
||||
}else {
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
if (null != page.getNowOrderBy()) {
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
List<SarStandardsInfo> getList = dao.getSarStandardsExportInfo(page);
|
||||
attrInfoShow(getList);
|
||||
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 {
|
||||
@@ -2640,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;
|
||||
}
|
||||
|
||||
+3
-1
@@ -57,6 +57,8 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
||||
private IAttFileEOService attFileEOService;
|
||||
@Value("${file.path}")
|
||||
private String filePath;//文件存储路径
|
||||
@Value("${file.split.path}")
|
||||
private String splitFilePath;//拆分图片存储路径
|
||||
/**
|
||||
* 文件下载路径
|
||||
*/
|
||||
@@ -480,7 +482,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
||||
try {
|
||||
FileOutputStream fos = new FileOutputStream(filepathandname);
|
||||
fos.write(bytev);
|
||||
String path = "uploadPath/img/" + imageName;
|
||||
String path = splitFilePath +"/" + imageName;
|
||||
String imgCon = "<img class=\'wordImg\' src=\'" + path + "\'>";
|
||||
message.getItemsCondi().add(imgCon);
|
||||
message.setItermsConditions(message.getItermsConditions() + imgCon);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.wgDept.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
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-04
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgDept|")
|
||||
@RequestMapping("/${restPath}/wgDept")
|
||||
public class WgDeptController extends BaseController<WgDept> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 集团参与情况 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface WgDeptDao extends BaseMapper<WgDept> {
|
||||
List<WgDeptShow> researchDatas(@Param(value = "data") String data);
|
||||
|
||||
List<WgDeptShow> researchAllDatas(@Param(value = "type") String type);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 集团参与情况
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgDept对象", description="集团参与情况")
|
||||
@TableName("wg_dept")
|
||||
public class WgDept 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 = "前端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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
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>
|
||||
* 集团参与情况 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface IWgDeptService extends IService<WgDept> {
|
||||
List<WgDeptShow> getAllDatas(String type);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
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>
|
||||
* 集团参与情况 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.wgMeetingInfo.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
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-04
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgMeetingInfo|")
|
||||
@RequestMapping("/${restPath}/wgMeetingInfo")
|
||||
public class WgMeetingInfoController extends BaseController<WgMeetingInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.adc.da.slrs.wgMeetingInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
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-04
|
||||
*/
|
||||
public interface WgMeetingInfoDao extends BaseMapper<WgMeetingInfo> {
|
||||
|
||||
List<WgMeetingInfo> researchDatas(@Param(value = "data") String data);
|
||||
|
||||
List<WgMeetingInfo> researchAllDatas(@Param(value = "type") String type);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
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>
|
||||
* 参会记录及资料
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgMeetingInfo对象", description="参会记录及资料")
|
||||
@TableName("wg_meeting_info")
|
||||
public class WgMeetingInfo 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("meeting_time")
|
||||
@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("meeting_name")
|
||||
private String meetingName;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "会议报告")
|
||||
@TableField("meeting_report")
|
||||
private String meetingReport;
|
||||
|
||||
@ApiModelProperty(value = "会议资料")
|
||||
@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;
|
||||
|
||||
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
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>
|
||||
* 参会记录及资料 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface IWgMeetingInfoService extends IService<WgMeetingInfo> {
|
||||
List<WgMeetingInfo> getAllDatas(String type);
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.adc.da.slrs.wgMeetingInfo.service.impl;
|
||||
|
||||
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>
|
||||
* 参会记录及资料 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.wgNetInfo.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
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-04
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgNetInfo|")
|
||||
@RequestMapping("/${restPath}/wgNetInfo")
|
||||
public class WgNetInfoController extends BaseController<WgNetInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组秘书联系方式 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface WgNetInfoDao extends BaseMapper<WgNetInfo> {
|
||||
|
||||
List<WgNetInfoDTO> researchDatas(@Param(value = "data") String data);
|
||||
|
||||
List<WgNetInfoDTO> researchAllDatas(@Param(value = "type") String type);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
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 WgNetInfo 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;
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
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>
|
||||
* 工作组秘书联系方式 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface IWgNetInfoService extends IService<WgNetInfo> {
|
||||
List<WgNetInfoDTO> getAllDatas(String type);
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.adc.da.slrs.wgNetInfo.service.impl;
|
||||
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.dao.WgNetInfoDao;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO;
|
||||
import com.adc.da.slrs.wgNetInfo.service.IWgNetInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组秘书联系方式 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Service
|
||||
public class WgNetInfoServiceImpl extends ServiceImpl<WgNetInfoDao, WgNetInfo> implements IWgNetInfoService {
|
||||
@Autowired
|
||||
private WgNetInfoDao wgNetInfoDao;
|
||||
|
||||
@Override
|
||||
public List<WgNetInfoDTO> getAllDatas(String type) {
|
||||
return wgNetInfoDao.researchAllDatas(type);
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.wgPayInfo.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
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-04
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgPayInfo|")
|
||||
@RequestMapping("/${restPath}/wgPayInfo")
|
||||
public class WgPayInfoController extends BaseController<WgPayInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.adc.da.slrs.wgPayInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
||||
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-04
|
||||
*/
|
||||
public interface WgPayInfoDao extends BaseMapper<WgPayInfo> {
|
||||
List<WgPayInfo> researchDatas(@Param(value = "data") String data);
|
||||
|
||||
List<WgPayInfo> researchAllDatas(@Param(value = "type") String type);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.adc.da.slrs.wgPayInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
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="WgPayInfo对象", description="支付信息")
|
||||
@TableName("wg_pay_info")
|
||||
public class WgPayInfo 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("price")
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "年份")
|
||||
@TableField("year")
|
||||
private String year;
|
||||
|
||||
@ApiModelProperty(value = "支付状态(0:未支付,1:已支付)")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "是否计划内(0:计划内,1:计划外)")
|
||||
@TableField("inplan")
|
||||
private String inplan;
|
||||
|
||||
@ApiModelProperty(value = "支付方式")
|
||||
@TableField("pay_way")
|
||||
private String payWay;
|
||||
|
||||
@ApiModelProperty(value = "支付资料")
|
||||
@TableField("joinfile")
|
||||
private String joinfile;
|
||||
|
||||
@ApiModelProperty(value = "费用列支")
|
||||
@TableField("pay_info")
|
||||
private String payInfo;
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.wgPayInfo.service;
|
||||
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 支付信息 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface IWgPayInfoService extends IService<WgPayInfo> {
|
||||
|
||||
List<WgPayInfo> getAllDatas(String type);
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.adc.da.slrs.wgPayInfo.service.impl;
|
||||
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.adc.da.slrs.wgPayInfo.dao.WgPayInfoDao;
|
||||
import com.adc.da.slrs.wgPayInfo.service.IWgPayInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 支付信息 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Service
|
||||
public class WgPayInfoServiceImpl extends ServiceImpl<WgPayInfoDao, WgPayInfo> implements IWgPayInfoService {
|
||||
|
||||
@Autowired
|
||||
private WgPayInfoDao wgPayInfoDao;
|
||||
|
||||
@Override
|
||||
public List<WgPayInfo> getAllDatas(String type) {
|
||||
return wgPayInfoDao.researchAllDatas(type);
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.wgStandorpolicyInfo.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
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-04
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgStandorpolicyInfo|")
|
||||
@RequestMapping("/${restPath}/wgStandorpolicyInfo")
|
||||
public class WgStandorpolicyInfoController extends BaseController<WgStandorpolicyInfo> {
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.adc.da.slrs.wgStandorpolicyInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
||||
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-04
|
||||
*/
|
||||
public interface WgStandorpolicyInfoDao extends BaseMapper<WgStandorpolicyInfo> {
|
||||
|
||||
//仅用来政策或者标准新增验重不是查全部的接口
|
||||
List<WgStandorpolicyInfo> researchDatas();
|
||||
|
||||
List<WgStandorpolicyInfo> researchAllDatas(@Param(value = "type")String type);
|
||||
|
||||
List<WgStandorpolicyInfo> researchAllDatasPartTwo(@Param(value = "type")String type);
|
||||
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package com.adc.da.slrs.wgStandorpolicyInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
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="WgStandorpolicyInfo对象", description="标准/政策 -信息")
|
||||
@TableName("wg_standorpolicy_info")
|
||||
public class WgStandorpolicyInfo 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("stand_id")
|
||||
private String standId;
|
||||
|
||||
@ApiModelProperty(value = "政策/标准 类别")
|
||||
@TableField(exist = false)
|
||||
private String categary;
|
||||
|
||||
@ApiModelProperty(value = "政策/标准 编号")
|
||||
@TableField(exist = false)
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value = "政策/标准 年份")
|
||||
@TableField(exist = false)
|
||||
private String year;
|
||||
|
||||
@ApiModelProperty(value = "政策标准 名称")
|
||||
@TableField(exist = false)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "政策/标准 英文名称")
|
||||
@TableField(exist = false)
|
||||
private String usname;
|
||||
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
@TableField(exist = false)
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "参与制定情况")
|
||||
@TableField(exist = false)
|
||||
private String joinDevelop;
|
||||
|
||||
@ApiModelProperty(value = "相关材料")
|
||||
@TableField(exist = false)
|
||||
private String netDatum;
|
||||
|
||||
@ApiModelProperty(value = "相关材料")
|
||||
@TableField(exist = false)
|
||||
private String dataType;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.adc.da.slrs.wgStandorpolicyInfo.service;
|
||||
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准/政策 -信息 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface IWgStandorpolicyInfoService extends IService<WgStandorpolicyInfo> {
|
||||
|
||||
List<WgStandorpolicyInfo> getAllDatas(String type);
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.adc.da.slrs.wgStandorpolicyInfo.service.impl;
|
||||
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.dao.WgStandorpolicyInfoDao;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.service.IWgStandorpolicyInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准/政策 -信息 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Service
|
||||
public class WgStandorpolicyInfoServiceImpl extends ServiceImpl<WgStandorpolicyInfoDao, WgStandorpolicyInfo> implements IWgStandorpolicyInfoService {
|
||||
|
||||
@Autowired
|
||||
private WgStandorpolicyInfoDao wgStandorpolicyInfoDao;
|
||||
|
||||
@Override
|
||||
public List<WgStandorpolicyInfo> getAllDatas(String type) {
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos=wgStandorpolicyInfoDao.researchAllDatas(type);
|
||||
if ("0".equals(type)) {
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos1 = wgStandorpolicyInfoDao.researchAllDatasPartTwo(type);
|
||||
wgStandorpolicyInfos1.forEach(wgStandorpolicyInfo -> wgStandorpolicyInfo.setDataType("3"));
|
||||
wgStandorpolicyInfos.addAll(wgStandorpolicyInfos1);
|
||||
}
|
||||
wgStandorpolicyInfos.removeIf(wgStandorpolicyInfo -> null==wgStandorpolicyInfo.getName());
|
||||
return wgStandorpolicyInfos;
|
||||
}
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.adc.da.slrs.wgWorkGroup.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupDTO;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
||||
import com.adc.da.slrs.wgWorkGroup.service.IWgWorkGroupService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroup;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组主表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgWorkGroup|")
|
||||
@RequestMapping("/${restPath}/wg_work_group")
|
||||
public class WgWorkGroupController extends BaseController<WgWorkGroup> {
|
||||
|
||||
@Autowired
|
||||
private IWgWorkGroupService wgWorkGroupService;
|
||||
|
||||
@ApiOperation("添加工作组节点数据")
|
||||
@PostMapping("/add")
|
||||
public ResponseMessage<Object> addResource(@RequestBody WgWorkGroupDTO wgWorkGroup){
|
||||
return Result.success(wgWorkGroupService.saveDatas(wgWorkGroup));
|
||||
}
|
||||
|
||||
@ApiOperation("添加标准/政策节点数据")
|
||||
@PostMapping("/addStand")
|
||||
public ResponseMessage<Object> addResourceData(@RequestBody WgWorkGroupDTO wgWorkGroup){
|
||||
return Result.success(wgWorkGroupService.saveStandDatas(wgWorkGroup));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("搜索工作组节点数据")
|
||||
@GetMapping("/researchData")
|
||||
public ResponseMessage<WgWorkGroupShowDTO> researchData(@RequestParam(value = "type") String type){
|
||||
return Result.success(wgWorkGroupService.researchDataUp(type));
|
||||
}
|
||||
|
||||
@ApiOperation("删除工作组节点数据")
|
||||
@PostMapping("/deleteData")
|
||||
public ResponseMessage<Object> deleteData(@RequestParam(value = "id") String id, @RequestParam(value = "meetingId",required=false)List<String> meetingId){
|
||||
return wgWorkGroupService.deleteData(id,meetingId);
|
||||
}
|
||||
|
||||
@ApiOperation("修改工作组节点数据")
|
||||
@PostMapping("/updateData")
|
||||
public ResponseMessage<Object> updateData(@RequestBody WgWorkGroupShowDTO wgWorkGroupShowDTO){
|
||||
return wgWorkGroupService.updateData(wgWorkGroupShowDTO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.adc.da.slrs.wgWorkGroup.dao;
|
||||
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroup;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
||||
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-04
|
||||
*/
|
||||
public interface WgWorkGroupDao extends BaseMapper<WgWorkGroup> {
|
||||
|
||||
WgWorkGroupShowDTO researchDatas(@Param(value = "data") List<WgWorkGroupShowDTO> wgWorkGroupShowDTOS,@Param(value = "type")String type);
|
||||
|
||||
List<WgWorkGroupShowDTO> researchDownLevel(@Param(value = "data") String data);
|
||||
|
||||
List<WgWorkGroupShowDTO> researchAllData(@Param(value = "type")String type);
|
||||
|
||||
List<WgWorkGroup> researchDownCheck(@Param(value = "data") String data,@Param(value = "status")String status);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.adc.da.slrs.wgWorkGroup.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组主表
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgWorkGroup对象", description="工作组主表")
|
||||
@TableName("wg_work_group")
|
||||
public class WgWorkGroup extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
@TableId(value = "id",type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "父级id")
|
||||
@TableField("pid")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty(value = "编号")
|
||||
@TableField("number")
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "性质(0:标委会,1:分标委,2:工作组,3:政策)")
|
||||
@TableField("nature")
|
||||
private String nature;
|
||||
|
||||
@ApiModelProperty(value = "状态(0:流程中,1:流程已通过)")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "换届时间")
|
||||
@TableField("change_time")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date changeTime;
|
||||
|
||||
@ApiModelProperty(value = "标准化工作领域")
|
||||
@TableField("stander_area")
|
||||
private String standerArea;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@TableField("mark")
|
||||
private String mark;
|
||||
|
||||
@ApiModelProperty(value = "0:标准化流程 1:政策课题组")
|
||||
@TableField("type")
|
||||
private String types;
|
||||
|
||||
@ApiModelProperty(value = "层级")
|
||||
@TableField("level")
|
||||
private String level;
|
||||
|
||||
//可能缺少性质,状态两个字段
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.adc.da.slrs.wgWorkGroup.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组主表
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgWorkGroup对象", description="工作组主表")
|
||||
public class WgWorkGroupDTO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "父级id")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "性质(0:标委会,1:分标委,2:工作组,3:政策)")
|
||||
private String nature;
|
||||
|
||||
@ApiModelProperty(value = "状态(0:流程中,1:流程已通过)")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "换届时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date changeTime;
|
||||
|
||||
@ApiModelProperty(value = "标准化工作领域")
|
||||
private String standerArea;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String mark;
|
||||
|
||||
@ApiModelProperty(value = "0:标准化流程 1:政策课题组")
|
||||
private String types;
|
||||
|
||||
@ApiModelProperty(value = "层级")
|
||||
private String level;
|
||||
|
||||
//支付信息
|
||||
List<WgPayInfo> wgPayInfos;
|
||||
|
||||
//标准政策
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos;
|
||||
|
||||
//集团参与情况
|
||||
List<WgDept> wgDepts;
|
||||
|
||||
//秘书联系方式
|
||||
List<WgNetInfo> wgNetInfos;
|
||||
|
||||
//参会记录及资料
|
||||
List<WgMeetingInfo> wgMeetingInfos;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.adc.da.slrs.wgWorkGroup.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDeptShow;
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO;
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jdk.nashorn.internal.objects.annotations.Constructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组主表
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgWorkGroup对象", description="工作组主表")
|
||||
public class WgWorkGroupShowDTO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "父级id")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "性质(0:标委会,1:分标委,2:工作组,3:政策)")
|
||||
private String nature;
|
||||
|
||||
@ApiModelProperty(value = "状态(0:流程中,1:流程已通过)")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "换届时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date changeTime;
|
||||
|
||||
@ApiModelProperty(value = "标准化工作领域")
|
||||
private String standerArea;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String mark;
|
||||
|
||||
@ApiModelProperty(value = "0:标准化流程 1:政策课题组")
|
||||
private String types;
|
||||
|
||||
private String level;
|
||||
|
||||
//支付信息
|
||||
List<WgPayInfo> wgPayInfos;
|
||||
|
||||
//标准政策
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos;
|
||||
|
||||
//集团参与情况
|
||||
List<WgDeptShow> wgDepts;
|
||||
|
||||
//秘书联系方式
|
||||
List<WgNetInfoDTO> wgNetInfos;
|
||||
|
||||
//参会记录及资料
|
||||
List<WgMeetingInfo> wgMeetingInfos;
|
||||
|
||||
List<WgWorkGroupShowDTO> children;
|
||||
|
||||
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.adc.da.slrs.wgWorkGroup.service;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroup;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupDTO;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组主表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface IWgWorkGroupService extends IService<WgWorkGroup> {
|
||||
|
||||
String saveDatas(WgWorkGroupDTO wgWorkGroupDTO);
|
||||
|
||||
String saveStandDatas(WgWorkGroupDTO wgWorkGroupDTO);
|
||||
|
||||
WgWorkGroupShowDTO researchData(String type);
|
||||
|
||||
//优化查询接口 速度
|
||||
WgWorkGroupShowDTO researchDataUp(String type);
|
||||
|
||||
ResponseMessage<Object> deleteData(String id,List<String> meetingId);
|
||||
|
||||
ResponseMessage<Object> updateData(WgWorkGroupShowDTO wgWorkGroupShowDTO);
|
||||
|
||||
|
||||
|
||||
}
|
||||
+386
@@ -0,0 +1,386 @@
|
||||
package com.adc.da.slrs.wgWorkGroup.service.impl;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDeptShow;
|
||||
import com.adc.da.slrs.wgDept.service.IWgDeptService;
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.adc.da.slrs.wgMeetingInfo.service.IWgMeetingInfoService;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.service.IWgMeetingUserRelationService;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO;
|
||||
import com.adc.da.slrs.wgNetInfo.service.IWgNetInfoService;
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.adc.da.slrs.wgPayInfo.service.IWgPayInfoService;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.dao.WgStandorpolicyInfoDao;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.service.IWgStandorpolicyInfoService;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroup;
|
||||
import com.adc.da.slrs.wgWorkGroup.dao.WgWorkGroupDao;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupDTO;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
||||
import com.adc.da.slrs.wgWorkGroup.service.IWgWorkGroupService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组主表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Service
|
||||
public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGroup> implements IWgWorkGroupService {
|
||||
|
||||
@Autowired
|
||||
private IWgWorkGroupService wgWorkGroupService;
|
||||
@Autowired
|
||||
private IWgDeptService wgDeptService;
|
||||
@Autowired
|
||||
private IWgMeetingInfoService wgMeetingInfoService;
|
||||
@Autowired
|
||||
private IWgNetInfoService wgNetInfoService;
|
||||
@Autowired
|
||||
private IWgPayInfoService wgPayInfoService;
|
||||
@Autowired
|
||||
private IWgStandorpolicyInfoService wgStandorpolicyInfoService;
|
||||
@Autowired
|
||||
private WgWorkGroupDao wgWorkGroupDao;
|
||||
@Autowired
|
||||
private WgStandorpolicyInfoDao wgStandorpolicyInfoDao;
|
||||
@Autowired
|
||||
private IWgMeetingUserRelationService wgMeetingUserRelationService;
|
||||
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public String saveDatas(WgWorkGroupDTO wgWorkGroupDTO) {
|
||||
WgWorkGroup wgWorkGroup = new WgWorkGroup();
|
||||
BeanUtils.copyProperties(wgWorkGroupDTO, wgWorkGroup);
|
||||
//存储集团参与情况
|
||||
boolean flag = true;
|
||||
wgWorkGroup.setId(String.valueOf(UUID.randomUUID()));
|
||||
flag = wgWorkGroupService.save(wgWorkGroup);
|
||||
if (null != wgWorkGroupDTO.getWgDepts()) {
|
||||
wgWorkGroupDTO.getWgDepts().forEach(wgDept -> {
|
||||
wgDept.setWgId(wgWorkGroup.getId());
|
||||
});
|
||||
flag = wgDeptService.saveBatch(wgWorkGroupDTO.getWgDepts());
|
||||
}
|
||||
//存储会议信息
|
||||
if (null != wgWorkGroupDTO.getWgMeetingInfos()) {
|
||||
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
|
||||
wgWorkGroupDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
|
||||
wgMeetingInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
wgMeetingInfo.setWgId(wgWorkGroup.getId());
|
||||
wgMeetingInfo.getMeetingPeople().forEach(s -> {
|
||||
WgMeetingUserRelation wgMeetingUserRelation = new WgMeetingUserRelation();
|
||||
wgMeetingUserRelation.setMeetingId(wgMeetingInfo.getId());
|
||||
wgMeetingUserRelation.setUserId(s);
|
||||
wgMeetingUserRelations.add(wgMeetingUserRelation);
|
||||
});
|
||||
});
|
||||
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
|
||||
flag = wgMeetingInfoService.saveBatch(wgWorkGroupDTO.getWgMeetingInfos());
|
||||
}
|
||||
//存储秘书联系方式信息
|
||||
if (null != wgWorkGroupDTO.getWgNetInfos()) {
|
||||
wgWorkGroupDTO.getWgNetInfos().forEach(wgNetInfo -> {
|
||||
wgNetInfo.setWgId(wgWorkGroup.getId());
|
||||
});
|
||||
flag = wgNetInfoService.saveBatch(wgWorkGroupDTO.getWgNetInfos());
|
||||
}
|
||||
//支付信息
|
||||
if (null != wgWorkGroupDTO.getWgPayInfos()) {
|
||||
wgWorkGroupDTO.getWgPayInfos().forEach(wgPayInfo -> {
|
||||
wgPayInfo.setWgId(wgWorkGroup.getId());
|
||||
});
|
||||
flag = wgPayInfoService.saveBatch(wgWorkGroupDTO.getWgPayInfos());
|
||||
}
|
||||
//标准政策信息
|
||||
if (null != wgWorkGroupDTO.getWgStandorpolicyInfos()) {
|
||||
wgWorkGroupDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {
|
||||
wgStandorpolicyInfo.setWgId(wgWorkGroup.getId());
|
||||
});
|
||||
flag = wgStandorpolicyInfoService.saveBatch(wgWorkGroupDTO.getWgStandorpolicyInfos());
|
||||
}
|
||||
//先存储主数据
|
||||
if (flag) {
|
||||
return "添加成功";
|
||||
} else {
|
||||
return "数据错误,添加失败";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveStandDatas(WgWorkGroupDTO wgWorkGroupDTO) {
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos= wgStandorpolicyInfoDao.researchDatas();
|
||||
Map<String,WgStandorpolicyInfo> map=new HashMap<>();
|
||||
wgStandorpolicyInfos.forEach(wgStandorpolicyInfo -> {
|
||||
map.put(wgStandorpolicyInfo.getStandId()+"-"+wgStandorpolicyInfo.getWgId(),wgStandorpolicyInfo);
|
||||
});
|
||||
if (null!=wgWorkGroupDTO.getWgStandorpolicyInfos() && wgWorkGroupDTO.getWgStandorpolicyInfos().size()>0){
|
||||
List<WgWorkGroup> wgWorkGroups=new ArrayList<>();
|
||||
wgWorkGroupDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {
|
||||
WgWorkGroup wgWorkGroup=new WgWorkGroup();
|
||||
BeanUtils.copyProperties(wgWorkGroupDTO,wgWorkGroup);
|
||||
wgWorkGroup.setId(String.valueOf(UUID.randomUUID()));
|
||||
wgStandorpolicyInfo.setWgId(wgWorkGroup.getId());
|
||||
if (null==map.get(wgStandorpolicyInfo.getStandId()+"-"+wgWorkGroup.getPid())) {
|
||||
wgWorkGroups.add(wgWorkGroup);
|
||||
}
|
||||
});
|
||||
if (wgWorkGroups.size()==0){
|
||||
return "政策已存在,请勿重复添加";
|
||||
}
|
||||
boolean flag=wgWorkGroupService.saveOrUpdateBatch(wgWorkGroups);
|
||||
boolean flag1=wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupDTO.getWgStandorpolicyInfos());
|
||||
if (flag && flag1){
|
||||
return "添加成功";
|
||||
}else {
|
||||
return "添加失败";
|
||||
}
|
||||
}else {
|
||||
return "数据有误,请检查数据";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgWorkGroupShowDTO researchData(String type) {
|
||||
//构建最初的节点 用来向下搜索
|
||||
WgWorkGroupShowDTO wgWorkGroupShowDTO = new WgWorkGroupShowDTO();
|
||||
wgWorkGroupShowDTO.setId("root");
|
||||
wgWorkGroupShowDTO.setTypes(type);
|
||||
List<WgWorkGroupShowDTO> wgWorkGroupShowDTOS = new ArrayList<>();
|
||||
wgWorkGroupShowDTOS.add(wgWorkGroupShowDTO);
|
||||
return wgWorkGroupDao.researchDatas(wgWorkGroupShowDTOS, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgWorkGroupShowDTO researchDataUp(String type) {
|
||||
List<WgWorkGroupShowDTO> wgWorkGroupShowDTOS = wgWorkGroupDao.researchAllData(type);
|
||||
List<WgPayInfo> wgPayInfos = wgPayInfoService.getAllDatas(type);
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos = wgStandorpolicyInfoService.getAllDatas(type);
|
||||
List<WgDeptShow> wgDeptShows = wgDeptService.getAllDatas(type);
|
||||
List<WgNetInfoDTO> wgNetInfoDTOS = wgNetInfoService.getAllDatas(type);
|
||||
List<WgMeetingInfo> wgMeetingInfos = wgMeetingInfoService.getAllDatas(type);
|
||||
List<WgMeetingUserRelationShow> wgMeetingUserRelations = wgMeetingUserRelationService.getMeetingAllPeoples(type);
|
||||
//处理数据
|
||||
//part1 会议数据组装 提速第一步建造数据的map集合
|
||||
Map<String,WgWorkGroupShowDTO> wgWorkGroupMap=new HashMap<>();
|
||||
wgWorkGroupShowDTOS.forEach(wgWorkGroupShowDTO -> {
|
||||
wgWorkGroupMap.put(wgWorkGroupShowDTO.getId(),wgWorkGroupShowDTO);
|
||||
});
|
||||
|
||||
Map<String, WgMeetingInfo> meetMap = new HashMap<>();
|
||||
if (null!=wgMeetingInfos && wgMeetingInfos.size()>0) {
|
||||
wgMeetingInfos.forEach(wgMeetingInfo -> {
|
||||
meetMap.put(wgMeetingInfo.getId(), wgMeetingInfo);
|
||||
});
|
||||
}
|
||||
//组装会议数据
|
||||
if (null!=wgMeetingUserRelations && wgMeetingUserRelations.size()>0) {
|
||||
wgMeetingUserRelations.forEach(wgMeetingUserRelationShow -> {
|
||||
if (null!=meetMap.get(wgMeetingUserRelationShow.getMeetingId()).getJoinMeetingPeopleInfo()) {
|
||||
meetMap.get(wgMeetingUserRelationShow.getMeetingId()).getJoinMeetingPeopleInfo().add(wgMeetingUserRelationShow);
|
||||
}else {
|
||||
List<WgMeetingUserRelationShow> wgMeetingUserRelationShows=new ArrayList<>();
|
||||
wgMeetingUserRelationShows.add(wgMeetingUserRelationShow);
|
||||
meetMap.get(wgMeetingUserRelationShow.getMeetingId()).setJoinMeetingPeopleInfo(wgMeetingUserRelationShows);
|
||||
}
|
||||
});
|
||||
}
|
||||
//组装总数据
|
||||
if (null!=wgDeptShows && wgDeptShows.size()>0) {
|
||||
wgDeptShows.forEach(wgDeptShow -> {
|
||||
if (null!=wgWorkGroupMap.get(wgDeptShow.getWgId()).getWgDepts()) {
|
||||
wgWorkGroupMap.get(wgDeptShow.getWgId()).getWgDepts().add(wgDeptShow);
|
||||
}else {
|
||||
List<WgDeptShow> wgDepts = new ArrayList<>();
|
||||
wgDepts.add(wgDeptShow);
|
||||
wgWorkGroupMap.get(wgDeptShow.getWgId()).setWgDepts(wgDepts);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (null!=wgMeetingInfos && wgMeetingInfos.size()>0) {
|
||||
wgMeetingInfos.forEach(wgMeetingInfo -> {
|
||||
if (null!=wgWorkGroupMap.get(wgMeetingInfo.getWgId()).getWgMeetingInfos()) {
|
||||
wgWorkGroupMap.get(wgMeetingInfo.getWgId()).getWgMeetingInfos().add(meetMap.get(wgMeetingInfo.getId()));
|
||||
}else {
|
||||
List<WgMeetingInfo> wgMeetingInfos1 = new ArrayList<>();
|
||||
wgMeetingInfos1.add(wgMeetingInfo);
|
||||
wgWorkGroupMap.get(wgMeetingInfo.getWgId()).setWgMeetingInfos(wgMeetingInfos1);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (null!=wgNetInfoDTOS && wgNetInfoDTOS.size()>0) {
|
||||
wgNetInfoDTOS.forEach(wgNetInfoDTO -> {
|
||||
if (null!=wgWorkGroupMap.get(wgNetInfoDTO.getWgId()).getWgNetInfos()) {
|
||||
wgWorkGroupMap.get(wgNetInfoDTO.getWgId()).getWgNetInfos().add(wgNetInfoDTO);
|
||||
}else {
|
||||
List<WgNetInfoDTO> wgNetInfos=new ArrayList<>();
|
||||
wgNetInfos.add(wgNetInfoDTO);
|
||||
wgWorkGroupMap.get(wgNetInfoDTO.getWgId()).setWgNetInfos(wgNetInfos);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (null!=wgPayInfos && wgPayInfos.size()>0) {
|
||||
wgPayInfos.forEach(wgPayInfo -> {
|
||||
if (null!=wgWorkGroupMap.get(wgPayInfo.getWgId()).getWgPayInfos()) {
|
||||
wgWorkGroupMap.get(wgPayInfo.getWgId()).getWgPayInfos().add(wgPayInfo);
|
||||
}else {
|
||||
List<WgPayInfo> wgPayInfos1=new ArrayList<>();
|
||||
wgPayInfos1.add(wgPayInfo);
|
||||
wgWorkGroupMap.get(wgPayInfo.getWgId()).setWgPayInfos(wgPayInfos1);
|
||||
}
|
||||
});
|
||||
}
|
||||
//处理标准政策数据
|
||||
if (null!=wgStandorpolicyInfos && wgStandorpolicyInfos.size()>0) {
|
||||
wgStandorpolicyInfos.forEach(wgStandorpolicyInfo -> {
|
||||
if (null!=wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos()) {
|
||||
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setName(wgStandorpolicyInfo.getName());
|
||||
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos().add(wgStandorpolicyInfo);
|
||||
}else {
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos1=new ArrayList<>();
|
||||
wgStandorpolicyInfos1.add(wgStandorpolicyInfo);
|
||||
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setName(wgStandorpolicyInfo.getName());
|
||||
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setWgStandorpolicyInfos(wgStandorpolicyInfos1);
|
||||
}
|
||||
});
|
||||
}
|
||||
//数据初步组装完成 开始进行树结构排序
|
||||
List<Integer> nums=new ArrayList<>();
|
||||
Map<Integer,List<WgWorkGroupShowDTO>> map=new HashMap<>();
|
||||
wgWorkGroupShowDTOS.forEach(wgWorkGroupShowDTO -> {
|
||||
if (null!=map.get(Integer.valueOf(wgWorkGroupShowDTO.getLevel()))){
|
||||
map.get(Integer.valueOf(wgWorkGroupShowDTO.getLevel())).add(wgWorkGroupShowDTO);
|
||||
}else {
|
||||
List<WgWorkGroupShowDTO> middle = new ArrayList<>();
|
||||
middle.add(wgWorkGroupShowDTO);
|
||||
nums.add(Integer.valueOf(wgWorkGroupShowDTO.getLevel()));
|
||||
map.put(Integer.valueOf(wgWorkGroupShowDTO.getLevel()),middle);
|
||||
}
|
||||
});
|
||||
//组装数据
|
||||
for (int i=nums.size()-1;i>0;i--){
|
||||
int finalI = i;
|
||||
map.get(i-1).forEach(wgWorkGroupShowDTO -> {
|
||||
map.get(finalI).forEach(wgWorkGroupShowDTO1 -> {
|
||||
if (wgWorkGroupShowDTO.getId().equals(wgWorkGroupShowDTO1.getPid())){
|
||||
if (null!=wgWorkGroupShowDTO.getChildren()) {
|
||||
wgWorkGroupShowDTO.getChildren().add(wgWorkGroupShowDTO1);
|
||||
}else {
|
||||
List<WgWorkGroupShowDTO> children = new ArrayList<>();
|
||||
children.add(wgWorkGroupShowDTO1);
|
||||
wgWorkGroupShowDTO.setChildren(children);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
return map.get(0).get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseMessage<Object> deleteData(String id, List<String> ids) {
|
||||
List<WgWorkGroup> wgWorkGroupShowDTOS = wgWorkGroupDao.researchDownCheck(id, "1");
|
||||
List<WgWorkGroupShowDTO> wgWorkGroups = wgWorkGroupDao.researchDownLevel(id);
|
||||
if (null != wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size() > 0 && null != wgWorkGroups && wgWorkGroups.size() > 0) {
|
||||
return Result.error("该工作组下存在工作组且处在流程中,无法删除");
|
||||
} else if (null != wgWorkGroups && wgWorkGroups.size() > 0) {
|
||||
return Result.error("该工作组下存在工作组,无法删除");
|
||||
} else if (null != wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size() > 0) {
|
||||
return Result.error("该工作组处在流程中,无法删除");
|
||||
} else {
|
||||
wgWorkGroupService.removeById(id);
|
||||
Map<String, Object> columnMap = new HashMap<>();
|
||||
columnMap.put("wg_id", id);
|
||||
wgStandorpolicyInfoService.removeByMap(columnMap);
|
||||
wgPayInfoService.removeByMap(columnMap);
|
||||
wgNetInfoService.removeByMap(columnMap);
|
||||
wgMeetingInfoService.removeByMap(columnMap);
|
||||
wgDeptService.removeByMap(columnMap);
|
||||
if (null != ids && ids.size() > 0) {
|
||||
wgMeetingUserRelationService.removeByIds(ids);
|
||||
}
|
||||
return Result.success("删除成功");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseMessage<Object> updateData(WgWorkGroupShowDTO wgWorkGroupShowDTO) {
|
||||
List<WgWorkGroup> wgWorkGroupShowDTOS = wgWorkGroupDao.researchDownCheck(wgWorkGroupShowDTO.getId(), "1");
|
||||
if (null != wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size() > 0) {
|
||||
return Result.error("工作组处在流程中,无法修改");
|
||||
} else {
|
||||
WgWorkGroup wgWorkGroup = new WgWorkGroup();
|
||||
BeanUtils.copyProperties(wgWorkGroupShowDTO, wgWorkGroup);
|
||||
boolean flag = false;
|
||||
flag = wgWorkGroupService.saveOrUpdate(wgWorkGroup);
|
||||
if (null != wgWorkGroupShowDTO.getWgDepts() && wgWorkGroupShowDTO.getWgDepts().size() > 0) {
|
||||
List<WgDept> wgDepts=new ArrayList<>();
|
||||
wgWorkGroupShowDTO.getWgDepts().forEach(wgDeptShow -> {
|
||||
WgDept wgDept=new WgDept();
|
||||
BeanUtils.copyProperties(wgDeptShow,wgDept);
|
||||
wgDepts.add(wgDept);
|
||||
});
|
||||
|
||||
flag = wgDeptService.saveOrUpdateBatch(wgDepts);
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgMeetingInfos() && wgWorkGroupShowDTO.getWgMeetingInfos().size() > 0) {
|
||||
List<String> removeMeet = new ArrayList<>();
|
||||
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
|
||||
wgWorkGroupShowDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
|
||||
wgMeetingInfo.getMeetingPeople().forEach(s -> {
|
||||
WgMeetingUserRelation wgMeetingUserRelation = new WgMeetingUserRelation();
|
||||
wgMeetingUserRelation.setUserId(s);
|
||||
wgMeetingUserRelation.setMeetingId(wgMeetingInfo.getId());
|
||||
wgMeetingUserRelations.add(wgMeetingUserRelation);
|
||||
});
|
||||
removeMeet.add(wgMeetingInfo.getId());
|
||||
});
|
||||
if (!removeMeet.isEmpty()) {
|
||||
wgMeetingUserRelationService.removeByIds(removeMeet);
|
||||
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
|
||||
}
|
||||
|
||||
|
||||
flag = wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgNetInfos() && wgWorkGroupShowDTO.getWgNetInfos().size() > 0) {
|
||||
List<WgNetInfo> wgNetInfos = new ArrayList<>();
|
||||
wgWorkGroupShowDTO.getWgNetInfos().forEach(wgNetInfoDTO -> {
|
||||
WgNetInfo wgNetInfo = new WgNetInfo();
|
||||
BeanUtils.copyProperties(wgNetInfoDTO, wgNetInfo);
|
||||
wgNetInfos.add(wgNetInfo);
|
||||
});
|
||||
flag = wgNetInfoService.saveOrUpdateBatch(wgNetInfos);
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgPayInfos() && wgWorkGroupShowDTO.getWgPayInfos().size() > 0) {
|
||||
flag = wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgStandorpolicyInfos() && wgWorkGroupShowDTO.getWgStandorpolicyInfos().size() > 0) {
|
||||
flag = wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
return Result.success("更新成功");
|
||||
} else {
|
||||
return Result.error("无法更新");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdCgfy;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdCgfyService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 委员信息数据统计 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgdCgfy|")
|
||||
@RequestMapping("api/wgdCensusLeo/wgd-cgfy")
|
||||
public class WgdCgfyController extends BaseController<WgdCgfy> {
|
||||
@Autowired
|
||||
IWgdCgfyService iWgdCgfyService;
|
||||
|
||||
@GetMapping("/getAllCgfys")
|
||||
public ResponseMessage<Object> getAllWgdCgfys(){//查询所有
|
||||
return Result.success(iWgdCgfyService.getAllWgdCgfys());
|
||||
}
|
||||
|
||||
@ApiOperation("查询")
|
||||
@GetMapping("/queryAllCgfys")
|
||||
public ResponseMessage<Object> queryAllWgdCgfys(WgdCgfy wgdCgfy){//多条件查询
|
||||
List<WgdCgfy> wgdCgfys = iWgdCgfyService.queryAllWgdCgfys(wgdCgfy);
|
||||
PageInfo pageInfo = getPageInfo(wgdCgfy.getPager(),wgdCgfys);
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@GetMapping("/getCgfyById")
|
||||
public ResponseMessage<Object> getWgdCgfyById(String id) {//查询详情
|
||||
return Result.success(iWgdCgfyService.getWgdCgfyById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("更新")
|
||||
@PostMapping("/modCgfy")
|
||||
ResponseMessage<Object> updateWgdCgfy(WgdCgfy WgdCgfy) {//编辑
|
||||
return Result.success(iWgdCgfyService.updateWgdCgfy(WgdCgfy));
|
||||
}
|
||||
|
||||
@ApiOperation("添加")
|
||||
@PostMapping("/addCgfy")
|
||||
ResponseMessage<Object> insertWgdCgfy(WgdCgfy WgdCgfy) {//插入
|
||||
return Result.success(iWgdCgfyService.insertWgdCgfy(WgdCgfy));
|
||||
}
|
||||
|
||||
@PostMapping("/delCgfy")
|
||||
ResponseMessage<Object> deleteWgdCgfy(String id){//删除
|
||||
return Result.success(iWgdCgfyService.deleteWgdCgfy(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@PostMapping("/delCgfys")
|
||||
ResponseMessage<Object> deleteWgdCgfys(String ids){//批量删除
|
||||
return Result.success(iWgdCgfyService.deleteWgdCgfys(ids));
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdFyfy;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdFyfyService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 翻译费用信息统计 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgdFyfy|")
|
||||
@RequestMapping("api/wgdCensusLeo/wgd-fyfy")
|
||||
public class WgdFyfyController extends BaseController<WgdFyfy> {
|
||||
@Autowired
|
||||
IWgdFyfyService iWgdFyfyService;
|
||||
|
||||
@GetMapping("/getAllFyfys")
|
||||
public ResponseMessage<Object> getAllWgdFyfys(){//查询所有
|
||||
return Result.success(iWgdFyfyService.getAllWgdFyfys());
|
||||
}
|
||||
|
||||
@ApiOperation("查询")
|
||||
@GetMapping("/queryAllFyfys")
|
||||
public ResponseMessage<Object> queryAllWgdFyfys(WgdFyfy wgdFyfy){//多条件查询
|
||||
List<WgdFyfy> wgdFyfys = iWgdFyfyService.queryAllWgdFyfys(wgdFyfy);
|
||||
PageInfo pageInfo = getPageInfo(wgdFyfy.getPager(),wgdFyfys);
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@GetMapping("/getFyfyById")
|
||||
public ResponseMessage<Object> getWgdFyfyById(String id) {//查询详情
|
||||
return Result.success(iWgdFyfyService.getWgdFyfyById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("更新")
|
||||
@PostMapping("/modFyfy")
|
||||
ResponseMessage<Object> updateWgdFyfy(WgdFyfy WgdFyfy) {//编辑
|
||||
return Result.success(iWgdFyfyService.updateWgdFyfy(WgdFyfy));
|
||||
}
|
||||
|
||||
@ApiOperation("添加")
|
||||
@PostMapping("/addFyfy")
|
||||
ResponseMessage<Object> insertWgdFyfy(WgdFyfy WgdFyfy) {//插入
|
||||
return Result.success(iWgdFyfyService.insertWgdFyfy(WgdFyfy));
|
||||
}
|
||||
|
||||
@PostMapping("/delFyfy")
|
||||
ResponseMessage<Object> deleteWgdFyfy(String id){//删除
|
||||
return Result.success(iWgdFyfyService.deleteWgdFyfy(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@PostMapping("/delFyfys")
|
||||
ResponseMessage<Object> deleteWgdFyfys(String ids){//批量删除
|
||||
return Result.success(iWgdFyfyService.deleteWgdFyfys(ids));
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdSrb;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdSrbService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准制修订补助资金收支统计收入表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgdSrb|")
|
||||
@RequestMapping("api/wgdCensusLeo/wgd-srb")
|
||||
public class WgdSrbController extends BaseController<WgdSrb> {
|
||||
@Autowired
|
||||
IWgdSrbService iWgdSrbService;
|
||||
|
||||
@GetMapping("/getAllSrbs")
|
||||
public ResponseMessage<Object> getAllWgdSrbs(){//查询所有
|
||||
return Result.success(iWgdSrbService.getAllWgdSrbs());
|
||||
}
|
||||
|
||||
@ApiOperation("查询")
|
||||
@GetMapping("/queryAllSrbs")
|
||||
public ResponseMessage<Object> queryAllWgdSrbs(WgdSrb wgdSrb){//多条件查询
|
||||
List<WgdSrb> wgdSrbs = iWgdSrbService.queryAllWgdSrbs(wgdSrb);
|
||||
PageInfo pageInfo = getPageInfo(wgdSrb.getPager(),wgdSrbs);
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
@GetMapping("/getSrbById")
|
||||
public ResponseMessage<Object> getWgdSrbById(String id) {//查询详情
|
||||
return Result.success(iWgdSrbService.getWgdSrbById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("更新")
|
||||
@PostMapping("/modSrb")
|
||||
ResponseMessage<Object> updateWgdSrb(WgdSrb WgdSrb) {//编辑
|
||||
return Result.success(iWgdSrbService.updateWgdSrb(WgdSrb));
|
||||
}
|
||||
|
||||
@ApiOperation("添加")
|
||||
@PostMapping("/addSrb")
|
||||
ResponseMessage<Object> insertWgdSrb(WgdSrb WgdSrb) {//插入
|
||||
return Result.success(iWgdSrbService.insertWgdSrb(WgdSrb));
|
||||
}
|
||||
|
||||
@PostMapping("/delSrb")
|
||||
ResponseMessage<Object> deleteWgdSrb(String id){//删除
|
||||
return Result.success(iWgdSrbService.deleteWgdSrb(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@PostMapping("/delSrbs")
|
||||
ResponseMessage<Object> deleteWgdSrbs(String ids){//批量删除
|
||||
return Result.success(iWgdSrbService.deleteWgdSrbs(ids));
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user