diff --git a/adc-da-activiti/src/main/java/com/adc/da/common/ActDefineStartMap.java b/adc-da-activiti/src/main/java/com/adc/da/common/ActDefineStartMap.java
index 29878087..f639d5e2 100644
--- a/adc-da-activiti/src/main/java/com/adc/da/common/ActDefineStartMap.java
+++ b/adc-da-activiti/src/main/java/com/adc/da/common/ActDefineStartMap.java
@@ -24,6 +24,7 @@ public class ActDefineStartMap {
map.put("8","nonConformanceRectificationKey");
map.put("9","standardReadWkflow");
+ map.put("10","itemlistvalidationprocessKey");
return map.get(type);
}
}
diff --git a/adc-da-convert/pom.xml b/adc-da-convert/pom.xml
index f11c490a..da2487c4 100644
--- a/adc-da-convert/pom.xml
+++ b/adc-da-convert/pom.xml
@@ -24,19 +24,11 @@
- org.jodconverter
- jodconverter-core
- 4.2.2
-
-
- org.jodconverter
- jodconverter-spring-boot-starter
- 4.2.2
-
-
- org.jodconverter
- jodconverter-local
- 4.2.2
+ com.artofsolving
+ jodconverter
+ system
+ 2.2.2
+ ${basedir}/src/main/lib/jodconverter-2.2.2.jar
diff --git a/adc-da-convert/src/main/java/com/adc/da/convert/common/DocConverterPdf.java b/adc-da-convert/src/main/java/com/adc/da/convert/common/DocConverterPdf.java
index d7840550..27974771 100644
--- a/adc-da-convert/src/main/java/com/adc/da/convert/common/DocConverterPdf.java
+++ b/adc-da-convert/src/main/java/com/adc/da/convert/common/DocConverterPdf.java
@@ -1,24 +1,20 @@
package com.adc.da.convert.common;
+import com.artofsolving.jodconverter.DocumentConverter;
+import com.artofsolving.jodconverter.openoffice.connection.OpenOfficeConnection;
+import com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection;
+import com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter;
+import com.artofsolving.jodconverter.openoffice.converter.StreamOpenOfficeDocumentConverter;
import org.apache.commons.lang.StringUtils;
-import org.jodconverter.DocumentConverter;
-import org.jodconverter.OfficeDocumentConverter;
-import org.jodconverter.document.DefaultDocumentFormatRegistry;
-import org.jodconverter.office.DefaultOfficeManagerBuilder;
-import org.jodconverter.office.OfficeException;
-import org.jodconverter.office.OfficeManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-
import java.io.*;
public class DocConverterPdf {
private static final Logger logger = LoggerFactory.getLogger(DocConverterPdf.class);
- @Autowired
- private DocumentConverter converter;
+ private static String OS_NAME = System.getProperty("os.name").toLowerCase();
private static final int ENVIRONMENT = 1;// 环境 1:windows 2:linux
private String fileString;// (只涉及pdf2swf路径问题)
@@ -28,7 +24,6 @@ public class DocConverterPdf {
private File convertPdfFile;
private File swfFile;
private File docFile;
- private String filesType;
String waterPdfPath;
private String convertHost;
@@ -56,7 +51,6 @@ public class DocConverterPdf {
fileName = fileString.substring(0, fileString.lastIndexOf("."));
if(".doc".equals(fileType.toLowerCase()) || ".docx".equals(fileType.toLowerCase()) || ".xlsx".equals(fileType.toLowerCase()) || ".xls".equals(fileType.toLowerCase()) || ".ppt".equals(fileType.toLowerCase()) || ".pptx".equals(fileType.toLowerCase())){
docFile = new File(fileString);
- filesType = fileType.toLowerCase();
convertPdfFile=new File(fileName+"_C"+ ".pdf");
pdfFile = new File(fileName + ".pdf");
swfFile = new File(fileName + ".swf");
@@ -66,38 +60,6 @@ public class DocConverterPdf {
}
}
- /**
- * openOffice目录,window 可能在C://Program Files (x86)//OpenOffice 4
- */
- private static final String openOfficeHome = "/opt/openoffice4";
-
- /**
- * openOffice端口
- */
- private static final int openOfficePort = 8100;
-
- /**
- * 转化文档
- * @param input
- * @param output
- */
- public static void convertFile(File input , File output) throws OfficeException {
- try {
- DefaultOfficeManagerBuilder defaultOfficeManagerBuilder = new DefaultOfficeManagerBuilder();
- defaultOfficeManagerBuilder.setOfficeHome(openOfficeHome);
- OfficeManager officeManager = defaultOfficeManagerBuilder.build();
- officeManager.start();
-
- //转换,自动识别转化类型
- OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager);
- converter.convert(input, output);
-
- officeManager.stop();
- } catch (OfficeException e) {
- throw e;
- }
- }
-
/**
* 转为PDF
*
@@ -105,16 +67,22 @@ public class DocConverterPdf {
*/
private void doc2pdf() throws Exception {
if (!pdfFile.exists()) {
+ OpenOfficeConnection connection = null;
logger.info("转换服务地址接口:"+convertHost);
- InputStream in = null;
- OutputStream out = null;
try {
-// in = new FileInputStream(docFile);
-// out = new FileOutputStream(convertPdfFile);
- convertFile(docFile,convertPdfFile);
-// converter.convert(in).as(DefaultDocumentFormatRegistry.getFormatByMediaType(filesType)).
-// to(out).as(DefaultDocumentFormatRegistry.PDF);
+ if(StringUtils.isNotBlank(convertHost)){
+ connection = new SocketOpenOfficeConnection(convertHost,8100);
+ }else{
+ connection = new SocketOpenOfficeConnection(8100);
+ }
+ connection.connect();
+ DocumentConverter converter = new StreamOpenOfficeDocumentConverter(connection);
+ converter.convert(docFile, convertPdfFile);
+
+ //addWaterToPdf(pdfFile,userId);
+
// close the connection
+ connection.disconnect();
// 开始设置PDF文档相关属性保证其安全性
logger.info("开始设置转换后的PDF文件安全性相关设置");
PDFEditUtils.setPDFFileSecurity(pdfFile.getAbsolutePath(),convertPdfFile.getAbsolutePath());
@@ -123,6 +91,10 @@ public class DocConverterPdf {
logger.error(e.getMessage(),e);
logger.info("****pdf转换器异常,openoffice服务未启动!****");
throw e;
+ } catch (com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException e) {
+ logger.error(e.getMessage(),e);
+ logger.info("****pdf转换器异常,读取转换文件失败****");
+ throw e;
} catch (Exception e) {
logger.error(e.getMessage(),e);
throw e;
@@ -268,6 +240,11 @@ public class DocConverterPdf {
}
public void setConvertHost(String convertHost) {
- this.convertHost = convertHost;
+ OS_NAME = OS_NAME.toLowerCase();
+ if (OS_NAME.contains("win")) {
+ this.convertHost = convertHost;
+ } else {
+ this.convertHost = "62.234.136.153";
+ }
}
}
diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsDetailedList/service/impl/SarLawsDetailedListServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsDetailedList/service/impl/SarLawsDetailedListServiceImpl.java
index a975f767..c5939bdb 100644
--- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsDetailedList/service/impl/SarLawsDetailedListServiceImpl.java
+++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsDetailedList/service/impl/SarLawsDetailedListServiceImpl.java
@@ -292,8 +292,8 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl AllSelectD(Integer page, Integer pageSize, String sortKey,
- String countryArea, String projectName, String carType,
- String detailedList, String detailedListName) {
+ String countryArea, String projectName,
+ String detailedList, String detailedListName,String carType) {
QueryWrapper wrapper = new QueryWrapper<>();
if ("1".equals(sortKey)) {
wrapper.like(StringUtils.isNotEmpty(countryArea), "country_area", countryArea).
diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/controller/SarStandProjectLibraryController.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/controller/SarStandProjectLibraryController.java
index 61e87707..c35f1d7d 100644
--- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/controller/SarStandProjectLibraryController.java
+++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/controller/SarStandProjectLibraryController.java
@@ -50,6 +50,15 @@ public class SarStandProjectLibraryController extends BaseController MaintenanceList = sarStandProjectLibraryService.queryMaintenanceProjectConfirm(Page,PageSize,sarDto);
+ Map map = new HashMap();
+ map.put("total",MaintenanceList);
+ return Result.success("200",map);
+ }
+
@GetMapping("/queryProjectWorkFlow")
@ApiOperation("车型/项目库-!!!")
public ResponseMessage queryMaintenanceProjectWorkFlow(@RequestParam(defaultValue = "1", value = "Page")int Page, @RequestParam(defaultValue = "10", value = "PageSize") int PageSize,SarStandProjectLibraryDto sarDto) {
diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/dao/SarStandProjectLibraryDao.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/dao/SarStandProjectLibraryDao.java
index c079727f..2b0f1594 100644
--- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/dao/SarStandProjectLibraryDao.java
+++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/dao/SarStandProjectLibraryDao.java
@@ -26,4 +26,5 @@ public interface SarStandProjectLibraryDao extends BaseMapper getAllStands();
List getAllStand();
+ void deleteByProjectId(@Param("projectId")String projectId);
}
diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/service/SarStandProjectLibraryService.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/service/SarStandProjectLibraryService.java
index 6ac5a723..aaf079e1 100644
--- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/service/SarStandProjectLibraryService.java
+++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/service/SarStandProjectLibraryService.java
@@ -9,6 +9,7 @@ import java.util.List;
public interface SarStandProjectLibraryService {
IPage queryMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
IPage queryMaintenanceProjectWorkFlow(int current, int pageSize, SarStandProjectLibraryDto sarDto);
+ IPage queryMaintenanceProjectConfirm(int current, int pageSize, SarStandProjectLibraryDto sarDto);
IPage queryNotMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
List queryById(String id);
IPage queryProjectManager(int current, int pageSize);
diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/service/impl/SarStandProjectLibraryServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/service/impl/SarStandProjectLibraryServiceImpl.java
index a7cb5326..6cab703a 100644
--- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/service/impl/SarStandProjectLibraryServiceImpl.java
+++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandProjectLibrary/service/impl/SarStandProjectLibraryServiceImpl.java
@@ -98,6 +98,36 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl queryMaintenanceProjectConfirm(int current, int pageSize,
+ SarStandProjectLibraryDto sarDto) {
+ SarStandProjectLibrary sar = new SarStandProjectLibrary();
+ sar.setProjectPlatfor(sarDto.getProjectPlatfor());
+ sar.setProjectNumber(sarDto.getProjectNumber());
+ sar.setProjectName(sarDto.getProjectName());
+ sar.setProjectClassification(sarDto.getProjectClassification());
+ sar.setProjectStatus(sarDto.getProjectStatus());
+ sar.setProjectGroup(sarDto.getProjectGroup());
+ sar.setCurrentNode(sarDto.getCurrentNode());
+ sar.setProjectLevel(sarDto.getProjectLevel());
+ sar.setProjectManager(sarDto.getProjectManager());
+ sar.setProductLine(sarDto.getProductLine());
+ SimpleDateFormat formater = new SimpleDateFormat();
+ formater.applyPattern("yyyy-MM-dd");
+ try {
+ if (sarDto.getProjectStartDate()!=null){
+ sar.setProjectStartDate(formater.parse(sarDto.getProjectStartDate()));
+ }
+ if (sarDto.getProjectEndDate()!=null){
+ sar.setProjectEndDate(formater.parse(sarDto.getProjectEndDate()));
+ }
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ int flag=4;
+ return getSarStandProjectLibraryIPage(current, pageSize, sar,flag);
+ }
@Override
public IPage queryNotMaintenanceProject(int current, int pageSize,
SarStandProjectLibraryDto sarDto) {
@@ -240,6 +270,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl list) {
+ sarStandProjectLibraryDao.deleteByProjectId(list.get(0).getProjectId());
sarStandProjectLibraryDao.batchInsert(list);
}
@@ -323,7 +354,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl sarStandProjectLibraries = sarStandProjectLibraryDao.selectPagesWorkFlow(current, pageSize, wrapper, flag);
Integer count = sarStandProjectLibraryDao.selectCountWorkFlow(wrapper, flag);
diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/utArea/entity/UtArea.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/utArea/entity/UtArea.java
index 8dd5c749..7edf6204 100644
--- a/adc-da-slrs/src/main/java/com/adc/da/slrs/utArea/entity/UtArea.java
+++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/utArea/entity/UtArea.java
@@ -5,6 +5,7 @@ import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.Date;
+import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
@@ -63,5 +64,6 @@ public class UtArea extends BaseEntity {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date modifyTime;
-
+ @TableField(exist = false)
+ private List sarTypeList;
}
diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/utArea/service/impl/UtAreaServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/utArea/service/impl/UtAreaServiceImpl.java
index f7dda383..b4c9e9b2 100644
--- a/adc-da-slrs/src/main/java/com/adc/da/slrs/utArea/service/impl/UtAreaServiceImpl.java
+++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/utArea/service/impl/UtAreaServiceImpl.java
@@ -13,6 +13,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -37,6 +38,18 @@ public class UtAreaServiceImpl extends ServiceImpl implements
}
public List getAreaSelList(UtArea utAreaEO){
+ List list = new ArrayList<>();
+ if(utAreaEO.getSarType().equals("INLAND_STAND")){
+ utAreaEO.setSarType(null);
+ list.add("INLAND_STAND");
+ list.add("STAND");
+ utAreaEO.setSarTypeList(list);
+ }else if(utAreaEO.getSarType().equals("FOREIGN_STAND")){
+ utAreaEO.setSarType(null);
+ list.add("FOREIGN_STAND");
+ list.add("STAND");
+ utAreaEO.setSarTypeList(list);
+ }
return dao.getAreaSelList(utAreaEO);
}
diff --git a/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsAttrDetailedList/SarLawsAttrDetailedListMapper.xml b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsAttrDetailedList/SarLawsAttrDetailedListMapper.xml
index f75adaa6..d280e916 100644
--- a/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsAttrDetailedList/SarLawsAttrDetailedListMapper.xml
+++ b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsAttrDetailedList/SarLawsAttrDetailedListMapper.xml
@@ -64,7 +64,7 @@