Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -270,4 +270,38 @@ CREATE TABLE `laws_asms_open_api`
|
|||||||
alter table laws_asms_open_api
|
alter table laws_asms_open_api
|
||||||
comment '汽车标准数字化平台ASMS开放API接口管理';
|
comment '汽车标准数字化平台ASMS开放API接口管理';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `laws_asms_domestic`;
|
||||||
|
CREATE TABLE `laws_asms_domestic`
|
||||||
|
(
|
||||||
|
`id` varchar(100) NOT NULL PRIMARY KEY COMMENT '主键ID',
|
||||||
|
`code` varchar(100) COMMENT '标准法规编号/标准号',
|
||||||
|
`name` varchar(100) COMMENT '标准法规名称/标准名称',
|
||||||
|
`english_name` varchar(100) COMMENT '法规英文名称',
|
||||||
|
`type` varchar(100) COMMENT '标准法规类别/标准类别',
|
||||||
|
`applicable_certification_list_string` varchar(100) COMMENT '适用认证',
|
||||||
|
`applicable_models_list_string` varchar(100) COMMENT '适用车型拼接名称',
|
||||||
|
`degree_adoption` varchar(100) COMMENT '采标程度',
|
||||||
|
`drafting_people` varchar(500) COMMENT '起草人',
|
||||||
|
`drafting_unit` varchar(500) COMMENT '起草单位',
|
||||||
|
`focal_point_name` varchar(100) COMMENT '标准领域名称',
|
||||||
|
`implementation_date` varchar(100) COMMENT '实施日期',
|
||||||
|
`international_standard` varchar(100) COMMENT '采用国际标准号',
|
||||||
|
`new_car_implementation_date` varchar(100) COMMENT '新车实施日期',
|
||||||
|
`new_register_car_implementation_date` varchar(100) COMMENT '新注册车实施日期',
|
||||||
|
`power_type_list_string` varchar(100) COMMENT '动力类型',
|
||||||
|
`production_car_implementation_date` varchar(100) COMMENT '在产车实施日期',
|
||||||
|
`proposing_department` varchar(100) COMMENT '提出部门',
|
||||||
|
`publish_date` varchar(100) COMMENT '发布日期',
|
||||||
|
`replace_code` varchar(100) COMMENT '代替标准号',
|
||||||
|
`scope_application` varchar(100) COMMENT '适用范围',
|
||||||
|
`standard_nature` varchar(100) COMMENT '标准性质',
|
||||||
|
`standard_status` varchar(100) COMMENT '标准状态',
|
||||||
|
`subcommittee` varchar(100) COMMENT '分标委',
|
||||||
|
`create_time` varchar(100) COMMENT '创建时间',
|
||||||
|
`update_time` varchar(100) COMMENT '更新时间',
|
||||||
|
`is_sync` varchar(5) COMMENT '是否同步(0未同步,1已同步)'
|
||||||
|
) COMMENT = 'ASMS国内法规';
|
||||||
|
alter table laws_asms_domestic
|
||||||
|
comment 'ASMS国内法规';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* @Author: Greyfus
|
||||||
|
* @Create: 2022-06-26 19:24
|
||||||
|
* @Version:
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
package com.jero.common.util;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.*;
|
||||||
|
import java.nio.file.attribute.BasicFileAttributes;
|
||||||
|
|
||||||
|
public class FileUtils {
|
||||||
|
|
||||||
|
private FileUtils() {
|
||||||
|
throw new IllegalStateException("FileUtils class");
|
||||||
|
}
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(FileUtils.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除指定文件夹下文件
|
||||||
|
*
|
||||||
|
* @param filePath
|
||||||
|
*/
|
||||||
|
public static void deleteFolders(String filePath) {
|
||||||
|
|
||||||
|
Path path = Paths.get(filePath);
|
||||||
|
try {
|
||||||
|
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
|
||||||
|
@Override
|
||||||
|
public FileVisitResult visitFile(Path file, BasicFileAttributes attributes) throws IOException {
|
||||||
|
Files.delete(file);
|
||||||
|
LOGGER.info("删除文件: {}", file);
|
||||||
|
return FileVisitResult.CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FileVisitResult postVisitDirectory(Path dir,
|
||||||
|
IOException exc) throws IOException {
|
||||||
|
Files.delete(dir);
|
||||||
|
LOGGER.info("文件夹被删除: {}", dir);
|
||||||
|
return FileVisitResult.CONTINUE;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -11,12 +11,10 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.ProtocolException;
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.security.InvalidKeyException;
|
import java.security.InvalidKeyException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@@ -94,7 +92,7 @@ public class MinioUtil {
|
|||||||
orgName=file.getName();
|
orgName=file.getName();
|
||||||
}
|
}
|
||||||
orgName = CommonUtils.getFileName(orgName);
|
orgName = CommonUtils.getFileName(orgName);
|
||||||
String objectName = bizPath+File.separator
|
String objectName = bizPath+"/"
|
||||||
+(!orgName.contains(".")
|
+(!orgName.contains(".")
|
||||||
?orgName + "_" + System.currentTimeMillis()
|
?orgName + "_" + System.currentTimeMillis()
|
||||||
:orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.lastIndexOf("."))
|
:orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.lastIndexOf("."))
|
||||||
|
|||||||
@@ -0,0 +1,309 @@
|
|||||||
|
package com.jero.common.util;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Enumeration;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipFile;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class ZipUtil {
|
||||||
|
|
||||||
|
private static final int BUFFER_SIZE = 2 * 1024;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 压缩成ZIP 方法1
|
||||||
|
*
|
||||||
|
* @param srcDir 压缩文件夹路径
|
||||||
|
* @param out 压缩文件输出流
|
||||||
|
* @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构;
|
||||||
|
* false:所有文件跑到压缩包根目录下(注意:不保留目录结构可能会出现同名文件,会压缩失败)
|
||||||
|
* @throws RuntimeException 压缩失败会抛出运行时异常
|
||||||
|
*/
|
||||||
|
public static void toZip(String srcDir, OutputStream out, HttpServletResponse response, boolean KeepDirStructure)
|
||||||
|
throws RuntimeException {
|
||||||
|
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
ZipOutputStream zos = null;
|
||||||
|
try {
|
||||||
|
zos = new ZipOutputStream(out);
|
||||||
|
File sourceFile = new File(srcDir);
|
||||||
|
compress(sourceFile, zos, sourceFile.getName(), KeepDirStructure);
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
System.out.println("压缩完成,耗时:" + (end - start) + " ms");
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("zip error from ZipUtils", e);
|
||||||
|
} finally {
|
||||||
|
if (zos != null) {
|
||||||
|
try {
|
||||||
|
zos.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 压缩成ZIP 方法2
|
||||||
|
*
|
||||||
|
* @param srcFiles 需要压缩的文件列表
|
||||||
|
* @param out 压缩文件输出流
|
||||||
|
* @throws RuntimeException 压缩失败会抛出运行时异常
|
||||||
|
*/
|
||||||
|
public static void toZip(List<File> srcFiles, OutputStream out) throws RuntimeException {
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
ZipOutputStream zos = null;
|
||||||
|
try {
|
||||||
|
zos = new ZipOutputStream(out);
|
||||||
|
for (File srcFile : srcFiles) {
|
||||||
|
byte[] buf = new byte[BUFFER_SIZE];
|
||||||
|
zos.putNextEntry(new ZipEntry(srcFile.getName()));
|
||||||
|
int len;
|
||||||
|
FileInputStream in = new FileInputStream(srcFile);
|
||||||
|
while ((len = in.read(buf)) != -1) {
|
||||||
|
zos.write(buf, 0, len);
|
||||||
|
}
|
||||||
|
zos.closeEntry();
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
System.out.println("压缩完成,耗时:" + (end - start) + " ms");
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("zip error from ZipUtils", e);
|
||||||
|
} finally {
|
||||||
|
if (zos != null) {
|
||||||
|
try {
|
||||||
|
zos.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归压缩方法
|
||||||
|
*
|
||||||
|
* @param sourceFile 源文件
|
||||||
|
* @param zos zip输出流
|
||||||
|
* @param name 压缩后的名称
|
||||||
|
* @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构;
|
||||||
|
* false:所有文件跑到压缩包根目录下(注意:不保留目录结构可能会出现同名文件,会压缩失败)
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private static void compress(File sourceFile, ZipOutputStream zos, String name,
|
||||||
|
boolean KeepDirStructure) throws Exception {
|
||||||
|
byte[] buf = new byte[BUFFER_SIZE];
|
||||||
|
if (sourceFile.isFile()) {
|
||||||
|
// 向zip输出流中添加一个zip实体,构造器中name为zip实体的文件的名字
|
||||||
|
zos.putNextEntry(new ZipEntry(name));
|
||||||
|
// copy文件到zip输出流中
|
||||||
|
int len;
|
||||||
|
FileInputStream in = new FileInputStream(sourceFile);
|
||||||
|
while ((len = in.read(buf)) != -1) {
|
||||||
|
zos.write(buf, 0, len);
|
||||||
|
}
|
||||||
|
// Complete the entry
|
||||||
|
zos.closeEntry();
|
||||||
|
in.close();
|
||||||
|
} else {
|
||||||
|
File[] listFiles = sourceFile.listFiles();
|
||||||
|
if (listFiles == null || listFiles.length == 0) {
|
||||||
|
// 需要保留原来的文件结构时,需要对空文件夹进行处理
|
||||||
|
if (KeepDirStructure) {
|
||||||
|
// 空文件夹的处理
|
||||||
|
zos.putNextEntry(new ZipEntry(name + "/"));
|
||||||
|
// 没有文件,不需要文件的copy
|
||||||
|
zos.closeEntry();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
for (File file : listFiles) {
|
||||||
|
// 判断是否需要保留原来的文件结构
|
||||||
|
if (KeepDirStructure) {
|
||||||
|
// 注意:file.getName()前面需要带上父文件夹的名字加一斜杠,
|
||||||
|
// 不然最后压缩包中就不能保留原来的文件结构,即:所有文件都跑到压缩包根目录下了
|
||||||
|
compress(file, zos, name + "/" + file.getName(), KeepDirStructure);
|
||||||
|
} else {
|
||||||
|
compress(file, zos, file.getName(), KeepDirStructure);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载ZIP压缩包(会对下载后的压缩包进行删除)
|
||||||
|
*
|
||||||
|
* @param file zip压缩包文件
|
||||||
|
* @param response 响应
|
||||||
|
* @author liukai
|
||||||
|
*/
|
||||||
|
public static void downloadZip(File file, HttpServletResponse response) {
|
||||||
|
OutputStream toClient = null;
|
||||||
|
try {
|
||||||
|
// 以流的形式下载文件。
|
||||||
|
BufferedInputStream fis = new BufferedInputStream(new FileInputStream(file.getPath()));
|
||||||
|
byte[] buffer = new byte[fis.available()];
|
||||||
|
fis.read(buffer);
|
||||||
|
fis.close();
|
||||||
|
// 清空response
|
||||||
|
response.reset();
|
||||||
|
toClient = new BufferedOutputStream(response.getOutputStream());
|
||||||
|
response.setCharacterEncoding("UTF-8");
|
||||||
|
response.setContentType("application/octet-stream");
|
||||||
|
response.setHeader("Content-Disposition", "attachment;filename=" + file.getName());
|
||||||
|
toClient.write(buffer);
|
||||||
|
toClient.flush();
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("下载zip压缩包过程发生异常");
|
||||||
|
} finally {
|
||||||
|
if (toClient != null) {
|
||||||
|
try {
|
||||||
|
toClient.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println("zip包下载关流失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* zip解压
|
||||||
|
*
|
||||||
|
* @param srcFile zip源文件
|
||||||
|
* @param destDirPath 解压后的目标文件夹
|
||||||
|
* @throws RuntimeException 解压失败会抛出运行时异常
|
||||||
|
*/
|
||||||
|
public static List<String> unZip(File srcFile, String destDirPath) throws RuntimeException {
|
||||||
|
|
||||||
|
//记录解压出来的所有文件名
|
||||||
|
List<String> filesName = new ArrayList<>();
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
// 判断源文件是否存在
|
||||||
|
if (!srcFile.exists()) {
|
||||||
|
throw new RuntimeException(srcFile.getPath() + "所指文件不存在");
|
||||||
|
}
|
||||||
|
// 开始解压
|
||||||
|
ZipFile zipFile = null;
|
||||||
|
try {
|
||||||
|
zipFile = new ZipFile(srcFile, Charset.forName("GBK"));
|
||||||
|
Enumeration<?> entries = zipFile.entries();
|
||||||
|
|
||||||
|
while (entries.hasMoreElements()) {
|
||||||
|
ZipEntry entry = (ZipEntry) entries.nextElement();
|
||||||
|
|
||||||
|
// System.out.println("解压文件:" + entry.getName());
|
||||||
|
// 如果是文件夹,就创建个文件夹
|
||||||
|
if (entry.isDirectory()) {
|
||||||
|
String dirPath = destDirPath + "/" + entry.getName();
|
||||||
|
File dir = new File(dirPath);
|
||||||
|
dir.mkdirs();
|
||||||
|
} else {
|
||||||
|
//添加进filesName
|
||||||
|
filesName.add(entry.getName());
|
||||||
|
// 如果是文件,就先创建一个文件,然后用io流把内容copy过去
|
||||||
|
File targetFile = new File(destDirPath + "/" + entry.getName());
|
||||||
|
// 保证这个文件的父文件夹必须要存在
|
||||||
|
if (!targetFile.getParentFile().exists()) {
|
||||||
|
targetFile.getParentFile().mkdirs();
|
||||||
|
}
|
||||||
|
targetFile.createNewFile();
|
||||||
|
// 将压缩文件内容写入到这个文件中
|
||||||
|
InputStream is = zipFile.getInputStream(entry);
|
||||||
|
FileOutputStream fos = new FileOutputStream(targetFile);
|
||||||
|
int len;
|
||||||
|
byte[] buf = new byte[1024];
|
||||||
|
while ((len = is.read(buf)) != -1) {
|
||||||
|
fos.write(buf, 0, len);
|
||||||
|
}
|
||||||
|
// 关流顺序,先打开的后关闭
|
||||||
|
fos.close();
|
||||||
|
is.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
System.out.println("解压完成,耗时:" + (end - start) + " ms");
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("unzip error from ZipUtils", e);
|
||||||
|
} finally {
|
||||||
|
if (zipFile != null) {
|
||||||
|
try {
|
||||||
|
zipFile.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return filesName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除文件
|
||||||
|
*
|
||||||
|
* @param filePath
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean deleteFile(String filePath) {
|
||||||
|
boolean flag = false;
|
||||||
|
File file = new File(filePath);
|
||||||
|
if (!file.exists()) {
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
if (!file.isDirectory()) {
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
String[] tempList = file.list();
|
||||||
|
File temp;
|
||||||
|
for (int i = 0; i < tempList.length; i++) {
|
||||||
|
if (filePath.endsWith(File.separator)) {
|
||||||
|
temp = new File(filePath + tempList[i]);
|
||||||
|
} else {
|
||||||
|
temp = new File(filePath + File.separator + tempList[i]);
|
||||||
|
}
|
||||||
|
if (temp.isFile()) {
|
||||||
|
temp.delete();
|
||||||
|
}
|
||||||
|
if (temp.isDirectory()) {
|
||||||
|
// 先删除文件夹里面的文件
|
||||||
|
deleteFile(filePath + "/" + tempList[i]);
|
||||||
|
// 再删除空文件夹
|
||||||
|
deleteFile(filePath + "/" + tempList[i]);
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除zip
|
||||||
|
*
|
||||||
|
* @param filePath
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static void deleteZip(String filePath) {
|
||||||
|
File file = new File(filePath);
|
||||||
|
// zip文件 判断 是否存在
|
||||||
|
if (file.getName().endsWith(".zip")) {
|
||||||
|
if (file.delete()) {
|
||||||
|
log.info("zip文件已经删除");
|
||||||
|
} else {
|
||||||
|
log.info("zip文件删除失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
-6
@@ -19,9 +19,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -169,22 +167,22 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 将文件上传至腾讯云 cos
|
// 将文件上传至腾讯云 cos
|
||||||
MinioUtil.upload(mf, filePath);
|
String upload = MinioUtil.upload(mf, "/" + uploadCospath);
|
||||||
|
|
||||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
//存入文件表
|
//存入文件表
|
||||||
oSSFile.setFileName(orgName);
|
oSSFile.setFileName(orgName);
|
||||||
oSSFile.setId(UuidUtils.getUUID());
|
oSSFile.setId(UuidUtils.getUUID());
|
||||||
oSSFile.setUrl(filePath);
|
|
||||||
oSSFile.setCreateBy(loginUser.getUsername());
|
oSSFile.setCreateBy(loginUser.getUsername());
|
||||||
oSSFile.setCreateTime(new Date());
|
oSSFile.setCreateTime(new Date());
|
||||||
this.save(oSSFile);
|
this.save(oSSFile);
|
||||||
// 文件路径做特殊处理
|
// 文件路径做特殊处理
|
||||||
// BASE64Encoder base64Encoder = new BASE64Encoder();
|
// BASE64Encoder base64Encoder = new BASE64Encoder();
|
||||||
// String encode = base64Encoder.encode(filePath.getBytes(StandardCharsets.UTF_8));
|
// String encode = base64Encoder.encode(filePath.getBytes(StandardCharsets.UTF_8));
|
||||||
String imgUrl = splitUrl + filePath;
|
String imgUrl = upload.split("/")[1];
|
||||||
oSSFile.setUrl(imgUrl);
|
oSSFile.setUrl(splitUrl + imgUrl);
|
||||||
return oSSFile;
|
return oSSFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-30
@@ -1,30 +0,0 @@
|
|||||||
package com.jero.modules.docking.asms.controller;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.jero.common.api.vo.Result;
|
|
||||||
import com.jero.modules.docking.asms.util.AsmsPostUtil;
|
|
||||||
import com.jero.modules.laws.common.constant.FieldCommon;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: liao
|
|
||||||
* @Date: 2023/10/17 17:36
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
@Api(tags="国内法规标准")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/asms")
|
|
||||||
public class AsmsController {
|
|
||||||
@Autowired
|
|
||||||
private AsmsPostUtil asmsPostUtil;
|
|
||||||
@GetMapping(value = "/getInfo")
|
|
||||||
public Result<Object> getInfo(String uri, Map<String, String> map) {
|
|
||||||
List<Map<String, String>> mapList = asmsPostUtil.sendGetReq(uri, map);
|
|
||||||
return Result.OK(mapList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+153
@@ -0,0 +1,153 @@
|
|||||||
|
package com.jero.modules.docking.asms.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.modules.docking.asms.entity.LawsAsmsDomestic;
|
||||||
|
import com.jero.modules.docking.asms.service.ILawsAsmsDomesticService;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: ASMS国内法规
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-10-20
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="ASMS国内法规")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/docking/asms/lawsAsmsDomestic")
|
||||||
|
@Slf4j
|
||||||
|
public class LawsAsmsDomesticController extends JeroController<LawsAsmsDomestic, ILawsAsmsDomesticService> {
|
||||||
|
@Autowired
|
||||||
|
private ILawsAsmsDomesticService lawsAsmsDomesticService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "ASMS国内法规-分页列表查询")
|
||||||
|
@ApiOperation(value="ASMS国内法规-分页列表查询", notes="ASMS国内法规-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<IPage<LawsAsmsDomestic>> queryPageList(LawsAsmsDomestic lawsAsmsDomestic,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
IPage<LawsAsmsDomestic> pageList = lawsAsmsDomesticService.queryPage(lawsAsmsDomestic, pageNo, pageSize, req);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "ASMS国内法规-列表查询")
|
||||||
|
@ApiOperation(value="ASMS国内法规-列表查询", notes="ASMS国内法规-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<LawsAsmsDomestic>> queryList(LawsAsmsDomestic lawsAsmsDomestic, HttpServletRequest req) {
|
||||||
|
List<LawsAsmsDomestic> list = lawsAsmsDomesticService.queryList(lawsAsmsDomestic, req);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "ASMS国内法规-添加")
|
||||||
|
@ApiOperation(value="ASMS国内法规-添加", notes="ASMS国内法规-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<T> add(@Validated @RequestBody LawsAsmsDomestic lawsAsmsDomestic) {
|
||||||
|
lawsAsmsDomesticService.add(lawsAsmsDomestic);
|
||||||
|
return Result.OK("操作成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "ASMS国内法规-编辑")
|
||||||
|
@ApiOperation(value="ASMS国内法规-编辑", notes="ASMS国内法规-编辑")
|
||||||
|
@PostMapping(value = "/edit")
|
||||||
|
public Result<T> edit(@Validated @RequestBody LawsAsmsDomestic lawsAsmsDomestic) {
|
||||||
|
lawsAsmsDomesticService.editById(lawsAsmsDomestic);
|
||||||
|
return Result.OK("操作成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "ASMS国内法规-通过id删除")
|
||||||
|
@ApiOperation(value="ASMS国内法规-通过id删除", notes="ASMS国内法规-通过id删除")
|
||||||
|
@PostMapping(value = "/delete")
|
||||||
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||||
|
return Result.error("请选择数据!");
|
||||||
|
}
|
||||||
|
lawsAsmsDomesticService.deleteById(map.get("id"));
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "ASMS国内法规-批量删除")
|
||||||
|
@ApiOperation(value="ASMS国内法规-批量删除", notes="ASMS国内法规-批量删除")
|
||||||
|
@PostMapping(value = "/deleteBatch")
|
||||||
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||||
|
return Result.error("请选择数据!");
|
||||||
|
}
|
||||||
|
this.lawsAsmsDomesticService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "ASMS国内法规-通过id查询")
|
||||||
|
@ApiOperation(value="ASMS国内法规-通过id查询", notes="ASMS国内法规-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<LawsAsmsDomestic> queryById(@RequestParam(name="id") String id) {
|
||||||
|
LawsAsmsDomestic lawsAsmsDomestic = lawsAsmsDomesticService.queryById(id);
|
||||||
|
if(lawsAsmsDomestic==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(lawsAsmsDomestic);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+3
-6
@@ -1,16 +1,14 @@
|
|||||||
package com.jero.modules.docking.asms.api.controller;
|
package com.jero.modules.docking.asms.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.modules.docking.asms.api.entity.LawsAsmsOpenApi;
|
import com.jero.modules.docking.asms.entity.LawsAsmsOpenApi;
|
||||||
import com.jero.modules.docking.asms.api.service.ILawsAsmsOpenApiService;
|
import com.jero.modules.docking.asms.service.ILawsAsmsOpenApiService;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.jero.modules.docking.asms.util.AsmsPostUtil;
|
import com.jero.modules.docking.asms.util.AsmsPostUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -18,7 +16,6 @@ import com.jero.common.system.base.controller.JeroController;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
+143
@@ -0,0 +1,143 @@
|
|||||||
|
package com.jero.modules.docking.asms.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: ASMS国内法规
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-10-20
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("laws_asms_domestic")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="laws_asms_domestic对象", description="ASMS国内法规")
|
||||||
|
public class LawsAsmsDomestic implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键ID*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
private java.lang.String id;
|
||||||
|
/**标准法规编号/标准号*/
|
||||||
|
@Excel(name = "标准法规编号/标准号", width = 15)
|
||||||
|
@ApiModelProperty(value = "标准法规编号/标准号")
|
||||||
|
private java.lang.String code;
|
||||||
|
/**标准法规名称/标准名称*/
|
||||||
|
@Excel(name = "标准法规名称/标准名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "标准法规名称/标准名称")
|
||||||
|
private java.lang.String name;
|
||||||
|
/**法规英文名称*/
|
||||||
|
@Excel(name = "法规英文名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "法规英文名称")
|
||||||
|
private java.lang.String englishName;
|
||||||
|
/**标准法规类别/标准类别*/
|
||||||
|
@Excel(name = "标准法规类别/标准类别", width = 15)
|
||||||
|
@ApiModelProperty(value = "标准法规类别/标准类别")
|
||||||
|
private java.lang.String type;
|
||||||
|
/**适用认证*/
|
||||||
|
@Excel(name = "适用认证", width = 15)
|
||||||
|
@ApiModelProperty(value = "适用认证")
|
||||||
|
private java.lang.String applicableCertificationListString;
|
||||||
|
/**适用车型拼接名称*/
|
||||||
|
@Excel(name = "适用车型拼接名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "适用车型拼接名称")
|
||||||
|
private java.lang.String applicableModelsListString;
|
||||||
|
/**采标程度*/
|
||||||
|
@Excel(name = "采标程度", width = 15)
|
||||||
|
@ApiModelProperty(value = "采标程度")
|
||||||
|
private java.lang.String degreeAdoption;
|
||||||
|
/**起草人*/
|
||||||
|
@Excel(name = "起草人", width = 15)
|
||||||
|
@ApiModelProperty(value = "起草人")
|
||||||
|
private java.lang.String draftingPeople;
|
||||||
|
/**起草单位*/
|
||||||
|
@Excel(name = "起草单位", width = 15)
|
||||||
|
@ApiModelProperty(value = "起草单位")
|
||||||
|
private java.lang.String draftingUnit;
|
||||||
|
/**标准领域名称*/
|
||||||
|
@Excel(name = "标准领域名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "标准领域名称")
|
||||||
|
private java.lang.String focalPointName;
|
||||||
|
/**实施日期*/
|
||||||
|
@Excel(name = "实施日期", width = 15)
|
||||||
|
@ApiModelProperty(value = "实施日期")
|
||||||
|
private java.lang.String implementationDate;
|
||||||
|
/**采用国际标准号*/
|
||||||
|
@Excel(name = "采用国际标准号", width = 15)
|
||||||
|
@ApiModelProperty(value = "采用国际标准号")
|
||||||
|
private java.lang.String internationalStandard;
|
||||||
|
/**新车实施日期*/
|
||||||
|
@Excel(name = "新车实施日期", width = 15)
|
||||||
|
@ApiModelProperty(value = "新车实施日期")
|
||||||
|
private java.lang.String newCarImplementationDate;
|
||||||
|
/**新注册车实施日期*/
|
||||||
|
@Excel(name = "新注册车实施日期", width = 15)
|
||||||
|
@ApiModelProperty(value = "新注册车实施日期")
|
||||||
|
private java.lang.String newRegisterCarImplementationDate;
|
||||||
|
/**动力类型*/
|
||||||
|
@Excel(name = "动力类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "动力类型")
|
||||||
|
private java.lang.String powerTypeListString;
|
||||||
|
/**在产车实施日期*/
|
||||||
|
@Excel(name = "在产车实施日期", width = 15)
|
||||||
|
@ApiModelProperty(value = "在产车实施日期")
|
||||||
|
private java.lang.String productionCarImplementationDate;
|
||||||
|
/**提出部门*/
|
||||||
|
@Excel(name = "提出部门", width = 15)
|
||||||
|
@ApiModelProperty(value = "提出部门")
|
||||||
|
private java.lang.String proposingDepartment;
|
||||||
|
/**发布日期*/
|
||||||
|
@Excel(name = "发布日期", width = 15)
|
||||||
|
@ApiModelProperty(value = "发布日期")
|
||||||
|
private java.lang.String publishDate;
|
||||||
|
/**代替标准号*/
|
||||||
|
@Excel(name = "代替标准号", width = 15)
|
||||||
|
@ApiModelProperty(value = "代替标准号")
|
||||||
|
private java.lang.String replaceCode;
|
||||||
|
/**适用范围*/
|
||||||
|
@Excel(name = "适用范围", width = 15)
|
||||||
|
@ApiModelProperty(value = "适用范围")
|
||||||
|
private java.lang.String scopeApplication;
|
||||||
|
/**标准性质*/
|
||||||
|
@Excel(name = "标准性质", width = 15)
|
||||||
|
@ApiModelProperty(value = "标准性质")
|
||||||
|
private java.lang.String standardNature;
|
||||||
|
/**标准状态*/
|
||||||
|
@Excel(name = "标准状态", width = 15)
|
||||||
|
@ApiModelProperty(value = "标准状态")
|
||||||
|
private java.lang.String standardStatus;
|
||||||
|
/**分标委*/
|
||||||
|
@Excel(name = "分标委", width = 15)
|
||||||
|
@ApiModelProperty(value = "分标委")
|
||||||
|
private java.lang.String subcommittee;
|
||||||
|
/**创建时间*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private java.lang.String createTimeString;
|
||||||
|
/**更新时间*/
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private java.lang.String updateTimeString;
|
||||||
|
/**同步标识*/
|
||||||
|
@Excel(name = "同步标识", width = 15)
|
||||||
|
@ApiModelProperty(value = "同步标识")
|
||||||
|
@Dict(dicCode = "sync_flag")
|
||||||
|
private java.lang.String syncFlag;
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.jero.modules.docking.asms.api.entity;
|
package com.jero.modules.docking.asms.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.docking.asms.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.jero.modules.docking.asms.entity.LawsAsmsDomestic;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: ASMS国内法规
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-10-20
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface LawsAsmsDomesticMapper extends BaseMapper<LawsAsmsDomestic> {
|
||||||
|
|
||||||
|
}
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package com.jero.modules.docking.asms.api.mapper;
|
package com.jero.modules.docking.asms.mapper;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import com.jero.modules.docking.asms.api.entity.LawsAsmsOpenApi;
|
import com.jero.modules.docking.asms.entity.LawsAsmsOpenApi;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.docking.asms.mapper.LawsAsmsDomesticMapper">
|
||||||
|
<resultMap id="LawsAsmsDomesticResultMap" type="com.jero.modules.docking.asms.entity.LawsAsmsDomestic">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="code" property="code" />
|
||||||
|
<result column="name" property="name" />
|
||||||
|
<result column="english_name" property="englishName" />
|
||||||
|
<result column="type" property="type" />
|
||||||
|
<result column="applicable_certification_list_string" property="applicableCertificationListString" />
|
||||||
|
<result column="applicable_models_list_string" property="applicableModelsListString" />
|
||||||
|
<result column="degree_adoption" property="degreeAdoption" />
|
||||||
|
<result column="drafting_people" property="draftingPeople" />
|
||||||
|
<result column="drafting_unit" property="draftingUnit" />
|
||||||
|
<result column="focal_point_name" property="focalPointName" />
|
||||||
|
<result column="implementation_date" property="implementationDate" />
|
||||||
|
<result column="international_standard" property="internationalStandard" />
|
||||||
|
<result column="new_car_implementation_date" property="newCarImplementationDate" />
|
||||||
|
<result column="new_register_car_implementation_date" property="newRegisterCarImplementationDate" />
|
||||||
|
<result column="power_type_list_string" property="powerTypeListString" />
|
||||||
|
<result column="production_car_implementation_date" property="productionCarImplementationDate" />
|
||||||
|
<result column="proposing_department" property="proposingDepartment" />
|
||||||
|
<result column="publish_date" property="publishDate" />
|
||||||
|
<result column="replace_code" property="replaceCode" />
|
||||||
|
<result column="scope_application" property="scopeApplication" />
|
||||||
|
<result column="standard_nature" property="standardNature" />
|
||||||
|
<result column="standard_status" property="standardStatus" />
|
||||||
|
<result column="subcommittee" property="subcommittee" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sync_flag" property="syncFlag" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.jero.modules.docking.asms.api.mapper.LawsAsmsOpenApiMapper">
|
<mapper namespace="com.jero.modules.docking.asms.mapper.LawsAsmsOpenApiMapper">
|
||||||
<resultMap id="LawsAsmsOpenApiResultMap" type="com.jero.modules.docking.asms.api.entity.LawsAsmsOpenApi">
|
<resultMap id="LawsAsmsOpenApiResultMap" type="com.jero.modules.docking.asms.entity.LawsAsmsOpenApi">
|
||||||
<id column="id" property="id" />
|
<id column="id" property="id" />
|
||||||
<result column="api_name" property="apiName" />
|
<result column="api_name" property="apiName" />
|
||||||
<result column="api_url" property="apiUrl" />
|
<result column="api_url" property="apiUrl" />
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
package com.jero.modules.docking.asms.service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: liao
|
|
||||||
* @Date: 2023/10/17 14:51
|
|
||||||
* @Description: 汽车标准数字化化平台ASMS
|
|
||||||
*/
|
|
||||||
public interface IAsmsOpenApi {
|
|
||||||
}
|
|
||||||
+76
@@ -0,0 +1,76 @@
|
|||||||
|
package com.jero.modules.docking.asms.service;
|
||||||
|
|
||||||
|
import com.jero.modules.docking.asms.entity.LawsAsmsDomestic;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: ASMS国内法规
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-10-20
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ILawsAsmsDomesticService extends IService<LawsAsmsDomestic> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
IPage<LawsAsmsDomestic> queryPage(LawsAsmsDomestic lawsAsmsDomestic, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LawsAsmsDomestic> queryList(LawsAsmsDomestic lawsAsmsDomestic, HttpServletRequest req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(LawsAsmsDomestic lawsAsmsDomestic);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(LawsAsmsDomestic lawsAsmsDomestic);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
LawsAsmsDomestic queryById(String id);
|
||||||
|
}
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package com.jero.modules.docking.asms.api.service;
|
package com.jero.modules.docking.asms.service;
|
||||||
|
|
||||||
import com.jero.modules.docking.asms.api.entity.LawsAsmsOpenApi;
|
import com.jero.modules.docking.asms.entity.LawsAsmsOpenApi;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
package com.jero.modules.docking.asms.service.impl;
|
|
||||||
|
|
||||||
import com.jero.modules.docking.asms.service.IAsmsOpenApi;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: liao
|
|
||||||
* @Date: 2023/10/17 14:52
|
|
||||||
* @Description: 汽车标准数字化化平台ASMS
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@Slf4j
|
|
||||||
public class AsmsOpenApiImpl implements IAsmsOpenApi {
|
|
||||||
|
|
||||||
}
|
|
||||||
+113
@@ -0,0 +1,113 @@
|
|||||||
|
package com.jero.modules.docking.asms.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.modules.docking.asms.entity.LawsAsmsDomestic;
|
||||||
|
import com.jero.modules.docking.asms.mapper.LawsAsmsDomesticMapper;
|
||||||
|
import com.jero.modules.docking.asms.service.ILawsAsmsDomesticService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: ASMS国内法规
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-10-20
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
|
public class LawsAsmsDomesticServiceImpl extends ServiceImpl<LawsAsmsDomesticMapper, LawsAsmsDomestic> implements ILawsAsmsDomesticService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IPage<LawsAsmsDomestic> queryPage(LawsAsmsDomestic lawsAsmsDomestic, Integer pageNo, Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<LawsAsmsDomestic> queryWrapper = QueryGenerator.initQueryWrapper(lawsAsmsDomestic, req.getParameterMap());
|
||||||
|
Page<LawsAsmsDomestic> page = new Page<>(pageNo, pageSize);
|
||||||
|
return page(page, queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<LawsAsmsDomestic> queryList(LawsAsmsDomestic lawsAsmsDomestic, HttpServletRequest req) {
|
||||||
|
return list(QueryGenerator.initQueryWrapper(lawsAsmsDomestic, req.getParameterMap()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(LawsAsmsDomestic lawsAsmsDomestic) {
|
||||||
|
save(lawsAsmsDomestic);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param lawsAsmsDomestic
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(LawsAsmsDomestic lawsAsmsDomestic) {
|
||||||
|
saveOrUpdate(lawsAsmsDomestic);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public LawsAsmsDomestic queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
+40
-8
@@ -1,13 +1,14 @@
|
|||||||
package com.jero.modules.docking.asms.api.service.impl;
|
package com.jero.modules.docking.asms.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.jero.modules.docking.asms.entity.LawsAsmsDomestic;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.modules.docking.asms.entity.LawsAsmsOpenApi;
|
||||||
import com.jero.modules.docking.asms.api.entity.LawsAsmsOpenApi;
|
import com.jero.modules.docking.asms.mapper.LawsAsmsOpenApiMapper;
|
||||||
import com.jero.modules.docking.asms.api.mapper.LawsAsmsOpenApiMapper;
|
import com.jero.modules.docking.asms.service.ILawsAsmsDomesticService;
|
||||||
import com.jero.modules.docking.asms.api.service.ILawsAsmsOpenApiService;
|
import com.jero.modules.docking.asms.service.ILawsAsmsOpenApiService;
|
||||||
import com.jero.modules.docking.asms.util.AsmsPostUtil;
|
import com.jero.modules.docking.asms.util.AsmsPostUtil;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
import com.jero.modules.system.service.ISysDictItemService;
|
import com.jero.modules.system.service.ISysDictItemService;
|
||||||
@@ -20,7 +21,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -49,6 +49,8 @@ public class LawsAsmsOpenApiServiceImpl extends ServiceImpl<LawsAsmsOpenApiMappe
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISysDictItemService sysDictItemService;
|
private ISysDictItemService sysDictItemService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private ILawsAsmsDomesticService lawsAsmsDomesticService;
|
||||||
|
@Autowired
|
||||||
private LawsAsmsOpenApiMapper lawsAsmsOpenApiMapper;
|
private LawsAsmsOpenApiMapper lawsAsmsOpenApiMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -155,7 +157,7 @@ public class LawsAsmsOpenApiServiceImpl extends ServiceImpl<LawsAsmsOpenApiMappe
|
|||||||
List<Map<String, String>> mapList = asmsPostUtil.sendGetReq(lawsAsmsOpenApi.getApiUrl(), map);
|
List<Map<String, String>> mapList = asmsPostUtil.sendGetReq(lawsAsmsOpenApi.getApiUrl(), map);
|
||||||
|
|
||||||
if ("1".equals(lawsAsmsOpenApi.getApiType())
|
if ("1".equals(lawsAsmsOpenApi.getApiType())
|
||||||
&& StringUtils.isNotBlank(lawsAsmsOpenApi.getDictId()) && !Objects.isNull(mapList)) {
|
&& StringUtils.isNotBlank(lawsAsmsOpenApi.getDictId()) && CollectionUtils.isNotEmpty(mapList)) {
|
||||||
// 如果是下拉字典(普通)、字典id不为空、返回的数据不为空,则进行数据字典同步操作
|
// 如果是下拉字典(普通)、字典id不为空、返回的数据不为空,则进行数据字典同步操作
|
||||||
// 查询该字典全部数据项
|
// 查询该字典全部数据项
|
||||||
LambdaQueryWrapper<SysDictItem> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SysDictItem> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
@@ -225,8 +227,38 @@ public class LawsAsmsOpenApiServiceImpl extends ServiceImpl<LawsAsmsOpenApiMappe
|
|||||||
}
|
}
|
||||||
// 状态设置为已同步
|
// 状态设置为已同步
|
||||||
lawsAsmsOpenApi.setStatus("1");
|
lawsAsmsOpenApi.setStatus("1");
|
||||||
|
} else if ("2".equals(lawsAsmsOpenApi.getApiType()) && !Objects.isNull(mapList)) {
|
||||||
|
// 如果是分标委
|
||||||
|
} else if ("3".equals(lawsAsmsOpenApi.getApiType())
|
||||||
|
&& "xiaobodata/openApi/domesticLaws/list".equals(lawsAsmsOpenApi.getApiUrl())) {
|
||||||
|
// 如果是国内法规,并且url为国内法规标准检索列表
|
||||||
|
Integer pageNo;
|
||||||
|
Integer pageSize;
|
||||||
|
if (CollectionUtils.isNotEmpty(mapList)) {
|
||||||
|
// 不为空则增加查询的分页
|
||||||
|
pageNo = Integer.valueOf(map.get("pageNo")) + 1;
|
||||||
|
List<LawsAsmsDomestic> lawsAsmsDomesticList = new ArrayList();
|
||||||
|
mapList.forEach(eMap -> {
|
||||||
|
LawsAsmsDomestic lawsAsmsDomestic = JSONObject.parseObject(JSONObject.toJSONString(eMap), LawsAsmsDomestic.class);
|
||||||
|
lawsAsmsDomestic.setId(lawsAsmsDomestic.getCode());
|
||||||
|
lawsAsmsDomestic.setCreateTimeString(eMap.get("createTime"));
|
||||||
|
lawsAsmsDomestic.setUpdateTimeString(eMap.get("updateTime"));
|
||||||
|
lawsAsmsDomestic.setSyncFlag("A");
|
||||||
|
lawsAsmsDomesticList.add(lawsAsmsDomestic);
|
||||||
|
});
|
||||||
|
lawsAsmsDomesticService.saveOrUpdateBatch(lawsAsmsDomesticList);
|
||||||
|
} else {
|
||||||
|
// 为空则全部置0
|
||||||
|
pageNo = 1;
|
||||||
|
// 已同步
|
||||||
|
lawsAsmsOpenApi.setStatus("1");
|
||||||
|
}
|
||||||
|
map.put("pageNo", pageNo.toString());
|
||||||
|
String jsonString = JSON.toJSONString(map);
|
||||||
|
lawsAsmsOpenApi.setQueryParamJson(jsonString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.info("{}同步成功{}条数据", lawsAsmsOpenApi.getApiName(), mapList.size());
|
||||||
});
|
});
|
||||||
// 同步接口的状态
|
// 同步接口的状态
|
||||||
updateBatchById(lawsAsmsOpenApiList);
|
updateBatchById(lawsAsmsOpenApiList);
|
||||||
+30
-12
@@ -3,6 +3,8 @@ package com.jero.modules.docking.asms.util;
|
|||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.util.RedisUtil;
|
import com.jero.common.util.RedisUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -13,10 +15,7 @@ import org.springframework.http.ResponseEntity;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
@@ -24,6 +23,7 @@ import java.util.Objects;
|
|||||||
* @Description: 远程调用
|
* @Description: 远程调用
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
|
@Slf4j
|
||||||
public class AsmsPostUtil {
|
public class AsmsPostUtil {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -62,6 +62,7 @@ public class AsmsPostUtil {
|
|||||||
token = resultMap.get("token");
|
token = resultMap.get("token");
|
||||||
// 将新获取的token存入redis
|
// 将新获取的token存入redis
|
||||||
redisUtil.set(ASMS_SYSTEM_AUTH_TOKEN, token, expire * 60 * 60);
|
redisUtil.set(ASMS_SYSTEM_AUTH_TOKEN, token, expire * 60 * 60);
|
||||||
|
log.info("new token is creating: {}", token);
|
||||||
}
|
}
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
@@ -75,9 +76,10 @@ public class AsmsPostUtil {
|
|||||||
**/
|
**/
|
||||||
public List<Map<String, String>> sendGetReq(String uri, Map<String, String> map) {
|
public List<Map<String, String>> sendGetReq(String uri, Map<String, String> map) {
|
||||||
// 准备请求头
|
// 准备请求头
|
||||||
|
String token = getToken();
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
headers.set("Content-Type", "application/x-www-form-urlencoded");
|
headers.set("Content-Type", "application/x-www-form-urlencoded");
|
||||||
headers.set("X-Access-Token", getToken());
|
headers.set("X-Access-Token", token);
|
||||||
|
|
||||||
if (StringUtils.isBlank(uri)) {
|
if (StringUtils.isBlank(uri)) {
|
||||||
throw new JeroBootException("url不能为空");
|
throw new JeroBootException("url不能为空");
|
||||||
@@ -91,19 +93,35 @@ public class AsmsPostUtil {
|
|||||||
url += "?" + s.substring(1);
|
url += "?" + s.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResponseEntity<Result> responseEntity = restTemplate.exchange(url.toString(),
|
ResponseEntity<Result> responseEntity;
|
||||||
HttpMethod.GET, new HttpEntity<>(null, headers), Result.class);
|
try {
|
||||||
|
log.info("request url : {}", url);
|
||||||
|
responseEntity = restTemplate.exchange(url.toString(),
|
||||||
|
HttpMethod.GET, new HttpEntity<>(null, headers), Result.class);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("old token is deleting: {}", token);
|
||||||
|
redisUtil.del(ASMS_SYSTEM_AUTH_TOKEN);
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new JeroBootException("操作失败,请稍后重试");
|
||||||
|
}
|
||||||
|
|
||||||
if (!responseEntity.getBody().isSuccess()) {
|
if (!responseEntity.getBody().isSuccess()) {
|
||||||
throw new JeroBootException("汽车标准数字化平台:请求发送失败");
|
throw new JeroBootException("汽车标准数字化平台:请求发送失败");
|
||||||
}
|
}
|
||||||
Map<String, Object> resultMap = (Map<String, Object>) responseEntity.getBody().getResult();
|
Map<String, Object> resultMap = (Map<String, Object>) responseEntity.getBody().getResult();
|
||||||
|
if (Objects.isNull(resultMap)) {
|
||||||
|
throw new JeroBootException("返回数据为空");
|
||||||
|
}
|
||||||
List<Map<String, String>> mapList = (List<Map<String, String>>) resultMap.get("records");
|
List<Map<String, String>> mapList = (List<Map<String, String>>) resultMap.get("records");
|
||||||
mapList.forEach(eMap -> {
|
if (CollectionUtils.isEmpty(mapList)) {
|
||||||
StringBuilder sb = new StringBuilder();
|
mapList = new ArrayList<>();
|
||||||
eMap.forEach((k, v) -> sb.append(k + ":" + v + ","));
|
Map<String, String> result = (Map<String, String>) responseEntity.getBody().getResult();
|
||||||
System.out.println(sb);
|
if (result.containsKey("records")) {
|
||||||
});
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
mapList.add(result);
|
||||||
|
}
|
||||||
|
log.info("返回{}条数据", mapList.size());
|
||||||
return mapList;
|
return mapList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -89,6 +89,19 @@ public class WorkCenterController {
|
|||||||
return Result.OK(sentList);
|
return Result.OK(sentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询全部流程")
|
||||||
|
@GetMapping("/getAllList")
|
||||||
|
public Result<?> getAllList(ProcessAll processAll,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<ProcessAll> queryWrapper = getProcessAllQueryWrapper(processAll);
|
||||||
|
|
||||||
|
Page<ProcessAll> page = new Page<>(pageNo, pageSize);
|
||||||
|
IPage<ProcessAll> sentList = processAllService.getAllList(page, queryWrapper);
|
||||||
|
return Result.OK(sentList);
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private QueryWrapper<ProcessAll> getProcessAllQueryWrapper(ProcessAll processAll) {
|
private QueryWrapper<ProcessAll> getProcessAllQueryWrapper(ProcessAll processAll) {
|
||||||
String prcName = processAll.getPrcName();
|
String prcName = processAll.getPrcName();
|
||||||
@@ -105,7 +118,7 @@ public class WorkCenterController {
|
|||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "撤销流程")
|
@ApiOperation(value = "强制撤销")
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<?> delete(@RequestBody Map<String, String> map) {
|
public Result<?> delete(@RequestBody Map<String, String> map) {
|
||||||
String processInstanceId = map.get("processInstanceId");
|
String processInstanceId = map.get("processInstanceId");
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.modules.activiti.enums;
|
package com.jero.modules.activiti.enums;
|
||||||
|
|
||||||
|
import com.jero.modules.activiti.process.esInitChange.service.impl.ProcessEsInitChangeServiceImpl;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@@ -13,11 +14,13 @@ public enum ProcessTypeEnum {
|
|||||||
/**
|
/**
|
||||||
* A
|
* A
|
||||||
*/
|
*/
|
||||||
A("企标制修订流程", 1,"Process_17bj7d9");
|
A("企标制修订流程", 1, "com.jero.modules.activiti.process.esInitChange.service.impl.ProcessEsInitChangeServiceImpl"),
|
||||||
|
B("企标立项变更流程",2, "com.jero.modules.activiti.process.esInitChange.service.impl.ProcessEsInitChangeServiceImpl"),
|
||||||
|
;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private Integer value;
|
private Integer value;
|
||||||
private String key;
|
private String implClass;
|
||||||
|
|
||||||
public static String getNameByValue(Integer value) {
|
public static String getNameByValue(Integer value) {
|
||||||
for (ProcessTypeEnum enumObject : values()) {
|
for (ProcessTypeEnum enumObject : values()) {
|
||||||
@@ -28,9 +31,18 @@ public enum ProcessTypeEnum {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Integer getValueByKey(String key) {
|
public static String getClassByValue(Integer value) {
|
||||||
for (ProcessTypeEnum enumObject : values()) {
|
for (ProcessTypeEnum enumObject : values()) {
|
||||||
if (enumObject.getKey().equals(key)) {
|
if (enumObject.getValue().equals(value)) {
|
||||||
|
return enumObject.getImplClass();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Integer getValueByName(String name) {
|
||||||
|
for (ProcessTypeEnum enumObject : values()) {
|
||||||
|
if (enumObject.getName().equals(name)) {
|
||||||
return enumObject.getValue();
|
return enumObject.getValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,16 @@
|
|||||||
package com.jero.modules.activiti.listener;
|
package com.jero.modules.activiti.listener;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.jero.modules.activiti.entity.ProcessAll;
|
import com.jero.modules.activiti.entity.ProcessAll;
|
||||||
import com.jero.modules.activiti.enums.ProcessStatusEnum;
|
import com.jero.modules.activiti.enums.ProcessStatusEnum;
|
||||||
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||||
import com.jero.modules.activiti.service.ProcessAllService;
|
import com.jero.modules.activiti.service.ProcessAllService;
|
||||||
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
||||||
import com.jero.modules.activiti.util.SpringContextUtil;
|
import com.jero.modules.activiti.util.SpringContextUtil;
|
||||||
import org.activiti.bpmn.model.ActivitiListener;
|
|
||||||
import org.activiti.bpmn.model.FlowElement;
|
|
||||||
|
|
||||||
import org.activiti.engine.*;
|
import org.activiti.engine.*;
|
||||||
import org.activiti.engine.delegate.DelegateExecution;
|
import org.activiti.engine.delegate.DelegateExecution;
|
||||||
import org.activiti.engine.delegate.DelegateTask;
|
|
||||||
import org.activiti.engine.delegate.ExecutionListener;
|
import org.activiti.engine.delegate.ExecutionListener;
|
||||||
import org.activiti.engine.delegate.TaskListener;
|
|
||||||
import org.activiti.engine.repository.ProcessDefinition;
|
import org.activiti.engine.repository.ProcessDefinition;
|
||||||
import org.activiti.engine.runtime.NativeProcessInstanceQuery;
|
|
||||||
import org.activiti.engine.runtime.ProcessInstance;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author liJiaRao
|
* @author liJiaRao
|
||||||
@@ -45,7 +37,7 @@ public class StartListener implements ExecutionListener {
|
|||||||
//新增流程总表信息(剩余的内容在启动流程时填充)
|
//新增流程总表信息(剩余的内容在启动流程时填充)
|
||||||
ProcessAll processAll = new ProcessAll();
|
ProcessAll processAll = new ProcessAll();
|
||||||
processAll.setProcessInstanceId(processInstanceId);
|
processAll.setProcessInstanceId(processInstanceId);
|
||||||
processAll.setPrcType(ProcessTypeEnum.getValueByKey(key));
|
processAll.setPrcType(ProcessTypeEnum.getValueByName(name));
|
||||||
processAll.setPrcStatus(ProcessStatusEnum.INCOMPLETE.getValue());
|
processAll.setPrcStatus(ProcessStatusEnum.INCOMPLETE.getValue());
|
||||||
processAllService.save(processAll);
|
processAllService.save(processAll);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,6 @@ public interface ProcessAllMapper extends BaseMapper<ProcessAll> {
|
|||||||
IPage<ProcessAll> getCompletedList(Page<ProcessAll> page, @Param(Constants.WRAPPER) QueryWrapper<ProcessAll> queryWrapper);
|
IPage<ProcessAll> getCompletedList(Page<ProcessAll> page, @Param(Constants.WRAPPER) QueryWrapper<ProcessAll> queryWrapper);
|
||||||
|
|
||||||
IPage<ProcessAll> getSentList(Page<ProcessAll> page, @Param(Constants.WRAPPER) QueryWrapper<ProcessAll> queryWrapper);
|
IPage<ProcessAll> getSentList(Page<ProcessAll> page, @Param(Constants.WRAPPER) QueryWrapper<ProcessAll> queryWrapper);
|
||||||
|
|
||||||
|
IPage<ProcessAll> getAllList(Page<ProcessAll> page, @Param(Constants.WRAPPER) QueryWrapper<ProcessAll> queryWrapper);
|
||||||
}
|
}
|
||||||
+15
-2
@@ -17,7 +17,7 @@
|
|||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
) p
|
) p
|
||||||
left join process_approval_record par on p.process_instance_id = par.process_instance_id
|
left join process_approval_record par on p.process_instance_id = par.process_instance_id
|
||||||
WHERE par.finish_flag = 0
|
WHERE par.finish_flag = 0 or par.id is null
|
||||||
group by p.process_instance_id
|
group by p.process_instance_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -30,7 +30,20 @@
|
|||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
) p
|
) p
|
||||||
left join process_approval_record par on p.process_instance_id = par.process_instance_id
|
left join process_approval_record par on p.process_instance_id = par.process_instance_id
|
||||||
WHERE par.finish_flag = 0
|
WHERE par.finish_flag = 0 or par.id is null
|
||||||
|
group by p.process_instance_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getAllList" resultType="com.jero.modules.activiti.entity.ProcessAll">
|
||||||
|
select p.*, group_concat(par.user_id) as handleUserId
|
||||||
|
from (
|
||||||
|
select pa.*, max(par.create_time) as receivedTaskTime, max(par.end_time) as completedTaskTime
|
||||||
|
from process_all pa
|
||||||
|
left join process_approval_record par on pa.process_instance_id = par.process_instance_id
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
) p
|
||||||
|
left join process_approval_record par on p.process_instance_id = par.process_instance_id
|
||||||
|
WHERE par.finish_flag = 0 or par.id is null
|
||||||
group by p.process_instance_id
|
group by p.process_instance_id
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
+2
@@ -2,6 +2,7 @@ package com.jero.modules.activiti.process.common.controller;
|
|||||||
|
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import com.jero.common.aspect.annotation.Translation;
|
||||||
import com.jero.modules.activiti.process.common.entity.CenterQueryVO;
|
import com.jero.modules.activiti.process.common.entity.CenterQueryVO;
|
||||||
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
||||||
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
|
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
|
||||||
@@ -97,6 +98,7 @@ public class ProcessCenterController {
|
|||||||
@AutoLog(value = "流程中心-办理")
|
@AutoLog(value = "流程中心-办理")
|
||||||
@ApiOperation(value="流程中心-办理", notes="流程中心-办理")
|
@ApiOperation(value="流程中心-办理", notes="流程中心-办理")
|
||||||
@GetMapping("/handle")
|
@GetMapping("/handle")
|
||||||
|
@Translation
|
||||||
public Result<?> handle(@RequestParam("processInstanceId") String processInstanceId) {
|
public Result<?> handle(@RequestParam("processInstanceId") String processInstanceId) {
|
||||||
return Result.OK(actFlowCommonService.handleTask(processInstanceId));
|
return Result.OK(actFlowCommonService.handleTask(processInstanceId));
|
||||||
}
|
}
|
||||||
|
|||||||
+79
@@ -0,0 +1,79 @@
|
|||||||
|
package com.jero.modules.activiti.process.esAnnualInit.controller;
|
||||||
|
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import com.jero.common.aspect.annotation.Translation;
|
||||||
|
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualInit.entity.ProcessEsAnnualInit;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualInit.service.ProcessEsAnnualInitService;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static com.jero.common.system.base.controller.JeroController.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: Mzaxd
|
||||||
|
* @Date: 2023/10/18 10:44
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "企标年度制修订标准化发起流程")
|
||||||
|
@RequestMapping("/process/es/annualInit")
|
||||||
|
public class ESAnnualInitController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ProcessEsAnnualInitService annualInitService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入模板下载
|
||||||
|
*/
|
||||||
|
@GetMapping("/templateDownload")
|
||||||
|
@ApiOperation(value = "企标年度制修订标准化发起流程-模板下载", notes = "企标年度制修订标准化发起流程-模板下载",
|
||||||
|
produces = "application/octet-stream")
|
||||||
|
@AutoLog(value = "企标年度制修订标准化发起流程-模板下载")
|
||||||
|
public ModelAndView templateDownload() {
|
||||||
|
// AutoPoi 导出Excel
|
||||||
|
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||||
|
String title = "标准化发起导入模板";
|
||||||
|
mv.addObject(FILE_NAME, title);
|
||||||
|
mv.addObject(CLASS, ProcessEsAnnualInit.class);
|
||||||
|
ExportParams exportParams = new ExportParams(title, title);
|
||||||
|
// 导出xlsx
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
mv.addObject(PARAMS, exportParams);
|
||||||
|
mv.addObject(NormalExcelConstants.DATA_LIST, new ArrayList<T>());
|
||||||
|
return mv;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/importExcel")
|
||||||
|
@ApiOperation(value = "企标年度制修订标准化发起流程-导入", notes = "企标年度制修订标准化发起流程-导入")
|
||||||
|
@AutoLog(value = "企标年度制修订标准化发起流程-导入")
|
||||||
|
@Translation
|
||||||
|
public Result<?> importExcel(@ApiParam(value = "要上传的文件", required = true) @RequestParam("file") MultipartFile file) {
|
||||||
|
Map<String, Object> resultMap = annualInitService.importData(file);
|
||||||
|
Object flag = resultMap.get("flag");
|
||||||
|
if (flag == YesOrNoEnum.YES.getValue()) {
|
||||||
|
return Result.OK(resultMap.get("dataList"));
|
||||||
|
} else {
|
||||||
|
return Result.error("导入失败", resultMap.get("msg"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+319
@@ -0,0 +1,319 @@
|
|||||||
|
package com.jero.modules.activiti.process.esAnnualInit.entity;
|
||||||
|
|
||||||
|
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 java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.ExcelVerify;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标-年度制修订计划-标准化发起
|
||||||
|
* @TableName process_es_annual_init
|
||||||
|
*/
|
||||||
|
@TableName(value ="process_es_annual_init")
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="process_es_annual_init", description="企标-年度制修订计划-标准化发起")
|
||||||
|
public class ProcessEsAnnualInit implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标计划Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企标计划Id")
|
||||||
|
private String espId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private String orgCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0表示未删除,1表示删除
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "0表示未删除,1表示删除")
|
||||||
|
private Integer delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "流程实例Id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请类别
|
||||||
|
*/
|
||||||
|
@Dict(dicCode = "esp_application_category")
|
||||||
|
@ApiModelProperty(value = "申请类别")
|
||||||
|
private String applicationCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 制修订类型
|
||||||
|
*/
|
||||||
|
@Excel(name = "制修订类型", width = 15, orderNum = "1")
|
||||||
|
@Dict(dicCode = "esp_revision_type")
|
||||||
|
@ApiModelProperty(value = "制修订类型")
|
||||||
|
private String projectType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原企标编号
|
||||||
|
*/
|
||||||
|
@Excel(name = "原企标编号", width = 15, orderNum = "2")
|
||||||
|
@ApiModelProperty(value = "原企标编号")
|
||||||
|
private String originEnStandardNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新企标编号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "新企标编号")
|
||||||
|
private String newEnStandardNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原企标名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "原企标名称", width = 15, orderNum = "4")
|
||||||
|
@ApiModelProperty(value = "原企标名称")
|
||||||
|
private String originEnStandardName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新企标名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "新企标名称", width = 15, orderNum = "5")
|
||||||
|
@ApiModelProperty(value = "新企标名称")
|
||||||
|
private String newEnStandardName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标英文名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企标英文名称")
|
||||||
|
private String enStandardEnglishName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标体系
|
||||||
|
*/
|
||||||
|
@Dict(dictTable = "laws_tree_node", dicCode = "id", dicText = "node_name")
|
||||||
|
@ApiModelProperty(value = "企标体系")
|
||||||
|
private String enStandardSystem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业标准代号
|
||||||
|
*/
|
||||||
|
@Excel(name = "企业标准代号", width = 15, orderNum = "7")
|
||||||
|
@ApiModelProperty(value = "企业标准代号")
|
||||||
|
private String enStandardCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业名称代号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企业名称代号")
|
||||||
|
private String enNameCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准类别代号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准类别代号")
|
||||||
|
private String standardCategoryCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年代号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "年代号")
|
||||||
|
private String decadeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准类型")
|
||||||
|
private String standardType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标等级分类
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企标等级分类")
|
||||||
|
private String enStandardClassification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 草稿计划完成日期
|
||||||
|
*/
|
||||||
|
@Excel(name = "草稿计划完成日期", width = 20, orderNum = "13")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "草稿计划完成日期")
|
||||||
|
private Date draftPlannedCompleteDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 征求意见稿计划完成日期
|
||||||
|
*/
|
||||||
|
@Excel(name = "征求意见稿计划完成日期", width = 24, orderNum = "14")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "征求意见稿计划完成日期")
|
||||||
|
private Date solicitationDraftPlanCompleteDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划报批日期
|
||||||
|
*/
|
||||||
|
@Excel(name = "计划报批日期", width = 15, orderNum = "15")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "计划报批日期")
|
||||||
|
private Date planApprovalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "项目状态")
|
||||||
|
private String projectStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编制说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "编制说明")
|
||||||
|
private String compilationDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 零部件名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "零部件名称")
|
||||||
|
private String componentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主起草人
|
||||||
|
*/
|
||||||
|
@Excel(name = "主起草人", width = 15, orderNum = "9")
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty(value = "主起草人")
|
||||||
|
private String mainDraftingUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主起草单位
|
||||||
|
*/
|
||||||
|
@Excel(name = "主起草单位", width = 15, orderNum = "10")
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty(value = "主起草单位")
|
||||||
|
private String mainDraftingUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主起草单位责任人
|
||||||
|
*/
|
||||||
|
@Excel(name = "主起草单位责任人", width = 20, orderNum = "11")
|
||||||
|
@Dict(dicCode = "id", dictTable = "sys_user", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "主起草单位责任人")
|
||||||
|
private String mainDraftingUnitResponsiblePerson;
|
||||||
|
|
||||||
|
@Excel(name = "标准推进人", width = 15, orderNum = "12")
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "标准推进人")
|
||||||
|
private String standardPromoter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 征求意见稿完成日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "征求意见稿完成日期")
|
||||||
|
private Date solicitationDraftCompletionDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更状态
|
||||||
|
*/
|
||||||
|
@Dict(dicCode = "esp_change_status")
|
||||||
|
@ApiModelProperty(value = "变更状态")
|
||||||
|
private String changeStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传附件
|
||||||
|
*/
|
||||||
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
|
@ApiModelProperty(value = "上传附件")
|
||||||
|
private String uploadAttachment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更原因
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "变更原因")
|
||||||
|
private String changeReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 授权部门
|
||||||
|
*/
|
||||||
|
@Excel(name = "授权部门", width = 15, orderNum = "6")
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@ApiModelProperty(value = "授权部门")
|
||||||
|
private String authDept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配合单位
|
||||||
|
*/
|
||||||
|
@Excel(name = "配合单位", width = 15, orderNum = "8")
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@ApiModelProperty(value = "配合单位")
|
||||||
|
private String cooperationUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联络人
|
||||||
|
*/
|
||||||
|
@Excel(name = "联络人", width = 15, orderNum = "17")
|
||||||
|
@ApiModelProperty(value = "联络人")
|
||||||
|
private String contactUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "审批人")
|
||||||
|
private String approvalUser;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String sort;
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package com.jero.modules.activiti.process.esAnnualInit.mapper;
|
||||||
|
|
||||||
|
import com.jero.modules.activiti.process.esAnnualInit.entity.ProcessEsAnnualInit;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ThinkBook
|
||||||
|
* @description 针对表【process_es_annual_init(企标立项变更流程)】的数据库操作Mapper
|
||||||
|
* @createDate 2023-10-18 10:01:44
|
||||||
|
* @Entity com.jero.modules.activiti.process.esAnnualInit.entity.ProcessEsAnnualInit
|
||||||
|
*/
|
||||||
|
public interface ProcessEsAnnualInitMapper extends BaseMapper<ProcessEsAnnualInit> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.activiti.process.esAnnualInit.mapper.ProcessEsAnnualInitMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.jero.modules.activiti.process.esAnnualInit.entity.ProcessEsAnnualInit">
|
||||||
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="espId" column="esp_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="orgCode" column="org_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="delFlag" column="del_flag" jdbcType="TINYINT"/>
|
||||||
|
<result property="processInstanceId" column="process_instance_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="applicationCategory" column="application_category" jdbcType="VARCHAR"/>
|
||||||
|
<result property="projectType" column="project_type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="originEnStandardNo" column="origin_en_standard_no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="newEnStandardNo" column="new_en_standard_no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="originEnStandardName" column="origin_en_standard_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="newEnStandardName" column="new_en_standard_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="enStandardEnglishName" column="en_standard_english_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="enStandardSystem" column="en_standard_system" jdbcType="VARCHAR"/>
|
||||||
|
<result property="enStandardCode" column="en_standard_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="enNameCode" column="en_name_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="standardCategoryCode" column="standard_category_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="decadeCode" column="decade_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="standardType" column="standard_type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="enStandardClassification" column="en_standard_classification" jdbcType="VARCHAR"/>
|
||||||
|
<result property="draftPlannedCompleteDate" column="draft_planned_complete_date" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="solicitationDraftPlanCompleteDate" column="solicitation_draft_plan_complete_date" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="planApprovalDate" column="plan_approval_date" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="projectStatus" column="project_status" jdbcType="VARCHAR"/>
|
||||||
|
<result property="compilationDescription" column="compilation_description" jdbcType="VARCHAR"/>
|
||||||
|
<result property="componentName" column="component_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="mainDraftingUser" column="main_drafting_user" jdbcType="VARCHAR"/>
|
||||||
|
<result property="mainDraftingUnit" column="main_drafting_unit" jdbcType="VARCHAR"/>
|
||||||
|
<result property="mainDraftingUnitResponsiblePerson" column="main_drafting_unit_responsible_person" jdbcType="VARCHAR"/>
|
||||||
|
<result property="standardPromoter" column="standard_promoter" jdbcType="VARCHAR"/>
|
||||||
|
<result property="solicitationDraftCompletionDate" column="solicitation_draft_completion_date" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="changeStatus" column="change_status" jdbcType="VARCHAR"/>
|
||||||
|
<result property="remarks" column="remarks" jdbcType="VARCHAR"/>
|
||||||
|
<result property="uploadAttachment" column="upload_attachment" jdbcType="VARCHAR"/>
|
||||||
|
<result property="changeReason" column="change_reason" jdbcType="VARCHAR"/>
|
||||||
|
<result property="authDept" column="auth_dept" jdbcType="VARCHAR"/>
|
||||||
|
<result property="cooperationUnit" column="cooperation_unit" jdbcType="VARCHAR"/>
|
||||||
|
<result property="contactUser" column="contact_user" jdbcType="VARCHAR"/>
|
||||||
|
<result property="approvalUser" column="approval_user" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,esp_id,create_by,
|
||||||
|
create_time,update_by,update_time,
|
||||||
|
org_code,del_flag,process_instance_id,
|
||||||
|
application_category,project_type,origin_en_standard_no,
|
||||||
|
new_en_standard_no,origin_en_standard_name,new_en_standard_name,
|
||||||
|
en_standard_english_name,en_standard_system,en_standard_code,
|
||||||
|
en_name_code,standard_category_code,decade_code,
|
||||||
|
standard_type,en_standard_classification,draft_planned_complete_date,
|
||||||
|
solicitation_draft_plan_complete_date,plan_approval_date,project_status,
|
||||||
|
compilation_description,component_name,main_drafting_user,
|
||||||
|
main_drafting_unit,main_drafting_unit_responsible_person,standard_promoter,
|
||||||
|
solicitation_draft_completion_date,change_status,remarks,
|
||||||
|
upload_attachment,change_reason,auth_dept,
|
||||||
|
cooperation_unit,contact_user,approval_user
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
package com.jero.modules.activiti.process.esAnnualInit.service;
|
||||||
|
|
||||||
|
import com.jero.modules.activiti.process.esAnnualInit.entity.ProcessEsAnnualInit;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ThinkBook
|
||||||
|
* @description 针对表【process_es_annual_init(企标立项变更流程)】的数据库操作Service
|
||||||
|
* @createDate 2023-10-18 10:01:44
|
||||||
|
*/
|
||||||
|
public interface ProcessEsAnnualInitService extends IService<ProcessEsAnnualInit> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据,返回数据列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> importData(MultipartFile file);
|
||||||
|
}
|
||||||
+297
@@ -0,0 +1,297 @@
|
|||||||
|
package com.jero.modules.activiti.process.esAnnualInit.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.api.CommonAPI;
|
||||||
|
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||||
|
import com.jero.common.system.vo.SysDictItemCore;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualInit.entity.ProcessEsAnnualInit;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualInit.service.ProcessEsAnnualInitService;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualInit.mapper.ProcessEsAnnualInitMapper;
|
||||||
|
import com.jero.modules.activiti.process.esInitChange.entity.enums.ESPProjectType;
|
||||||
|
import com.jero.modules.activiti.util.ExcelUtils;
|
||||||
|
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
||||||
|
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ThinkBook
|
||||||
|
* @description 针对表【process_es_annual_init(企标立项变更流程)】的数据库操作Service实现
|
||||||
|
* @createDate 2023-10-18 10:01:44
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class ProcessEsAnnualInitServiceImpl extends ServiceImpl<ProcessEsAnnualInitMapper, ProcessEsAnnualInit>
|
||||||
|
implements ProcessEsAnnualInitService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CommonAPI commonAPI;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ExcelUtils excelUtils;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ILawsEnterpriseStandardService enterpriseStandardService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> importData(MultipartFile file) {
|
||||||
|
List<SysDictItemCore> listDict = commonAPI.getDictItemAll();
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
List<String> errorMsgs = new ArrayList<>();
|
||||||
|
|
||||||
|
// 获取Excel的header
|
||||||
|
List<String> headers;
|
||||||
|
try {
|
||||||
|
headers = ExcelUtils.getHeaderFromExcel(file.getInputStream());
|
||||||
|
} catch (Exception e) {
|
||||||
|
errorMsgs.add("上传模板错误,请检查后重试。");
|
||||||
|
resultMap.put("msg", errorMsgs);
|
||||||
|
resultMap.put("flag", YesOrNoEnum.NO.getValue());
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
return resultMap; // 返回错误信息
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用静态方法验证header
|
||||||
|
boolean isMatched = headers.equals(ExcelUtils.getSortedHeadersFromClass(ProcessEsAnnualInit.class));
|
||||||
|
if (!isMatched) {
|
||||||
|
errorMsgs.add("上传模板错误,请检查后重试。");
|
||||||
|
resultMap.put("msg", errorMsgs);
|
||||||
|
resultMap.put("flag", YesOrNoEnum.NO.getValue());
|
||||||
|
return resultMap; // 返回错误信息
|
||||||
|
}
|
||||||
|
|
||||||
|
ImportParams params = new ImportParams();
|
||||||
|
params.setTitleRows(1);
|
||||||
|
params.setHeadRows(1);
|
||||||
|
params.setNeedSave(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
List<ProcessEsAnnualInit> list = ExcelImportUtil.importExcel(file.getInputStream(), ProcessEsAnnualInit.class, params);
|
||||||
|
if (list.isEmpty()) {
|
||||||
|
errorMsgs.add("文件暂无数据,请检查后重试。");
|
||||||
|
resultMap.put("msg", errorMsgs);
|
||||||
|
resultMap.put("flag", YesOrNoEnum.NO.getValue());
|
||||||
|
return resultMap; // 返回错误信息
|
||||||
|
}
|
||||||
|
// 批量检查数据是否有效
|
||||||
|
errorMsgs = this.validationList(list, listDict);
|
||||||
|
if (errorMsgs.size() > 0) {
|
||||||
|
resultMap.put("msg", errorMsgs);
|
||||||
|
resultMap.put("flag", YesOrNoEnum.NO.getValue());
|
||||||
|
} else {
|
||||||
|
resultMap.put("flag", YesOrNoEnum.YES.getValue());
|
||||||
|
// 转换为字典值
|
||||||
|
this.transToDictValue(list, listDict);
|
||||||
|
// 清洗
|
||||||
|
this.cleanData(list);
|
||||||
|
resultMap.put("dataList", list);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
errorMsgs.add("文件导入异常:" + e.getMessage());
|
||||||
|
resultMap.put("msg", errorMsgs);
|
||||||
|
resultMap.put("flag", YesOrNoEnum.NO.getValue());
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
file.getInputStream().close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cleanData(List<ProcessEsAnnualInit> list) {
|
||||||
|
list.forEach(item-> {
|
||||||
|
// 如果是制定则去除掉所有的原企标名称 原企标编号
|
||||||
|
if (ESPProjectType.ENACT.getValue().equals(item.getProjectType())) {
|
||||||
|
item.setOriginEnStandardName(null);
|
||||||
|
item.setOriginEnStandardNo(null);
|
||||||
|
}
|
||||||
|
// 设置变更状态 制定是新增 修订是变更
|
||||||
|
if (item.getProjectType().equals("制定")) {
|
||||||
|
item.setChangeStatus("新增");
|
||||||
|
} else {
|
||||||
|
item.setChangeStatus("变更");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void transToDictValue(List<ProcessEsAnnualInit> list, List<SysDictItemCore> listDict) {
|
||||||
|
list.forEach(item -> {
|
||||||
|
item.setProjectType(excelUtils.translateDictValue("esp_revision_type", item.getProjectType(), listDict));
|
||||||
|
item.setAuthDept(excelUtils.translateDictValue("depart_name", "id", "sys_depart", item.getAuthDept(), listDict));
|
||||||
|
item.setEnStandardCode(excelUtils.translateDictValue("enterprise_standard_code", item.getEnStandardCode(), listDict));
|
||||||
|
item.setCooperationUnit(excelUtils.translateDictValue("depart_name", "id", "sys_depart", item.getCooperationUnit(), listDict));
|
||||||
|
item.setMainDraftingUser(excelUtils.translateDictValue("username", "id", "sys_user", item.getMainDraftingUser(), listDict));
|
||||||
|
item.setMainDraftingUnit(excelUtils.translateDictValue("depart_name", "id", "sys_depart", item.getMainDraftingUnit(), listDict));
|
||||||
|
item.setMainDraftingUnitResponsiblePerson(excelUtils.translateDictValue("username", "id", "sys_user", item.getMainDraftingUnitResponsiblePerson(), listDict));
|
||||||
|
item.setStandardPromoter(excelUtils.translateDictValue("username", "id", "sys_user", item.getStandardPromoter(), listDict));
|
||||||
|
item.setContactUser(excelUtils.translateDictValue("username", "id", "sys_user", item.getContactUser(), listDict));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> validationList(List<ProcessEsAnnualInit> list, List<SysDictItemCore> listDict) {
|
||||||
|
List<LawsEnterpriseStandard> esList = enterpriseStandardService.list();
|
||||||
|
List<String> errorMsgs = new ArrayList<>();
|
||||||
|
|
||||||
|
int i = 3;
|
||||||
|
Iterator<ProcessEsAnnualInit> iterator = list.iterator();
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
ProcessEsAnnualInit plan = iterator.next();
|
||||||
|
if (ExcelUtils.isEmptyRow(plan)) {
|
||||||
|
iterator.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
plan.setSort(String.valueOf(i++));
|
||||||
|
String enStandardCode = plan.getProjectType();
|
||||||
|
String authDept = plan.getProjectType();
|
||||||
|
String cooperationUnit = plan.getCooperationUnit();
|
||||||
|
String mainDraftingUnit = plan.getMainDraftingUnit();
|
||||||
|
String mainDraftingUser = plan.getProjectType();
|
||||||
|
String mainDraftingUnitResponsiblePerson = plan.getMainDraftingUnitResponsiblePerson();
|
||||||
|
String standardPromoter = plan.getStandardPromoter();
|
||||||
|
String contactUser = plan.getContactUser();
|
||||||
|
|
||||||
|
StringBuilder errMsgHeader = new StringBuilder();
|
||||||
|
StringBuilder errMsg = new StringBuilder();
|
||||||
|
errMsgHeader.append("第").append(plan.getSort()).append("行");
|
||||||
|
|
||||||
|
// 检查制修订类型 编号 名称
|
||||||
|
errMsg.append(validProjectType(plan, listDict, esList));
|
||||||
|
// 检查所有数据字典校验的字段
|
||||||
|
errMsg.append(validAuthDept(authDept, listDict));
|
||||||
|
errMsg.append(validStandardCode(enStandardCode, listDict));
|
||||||
|
errMsg.append(validCooperateUnit(cooperationUnit, listDict));
|
||||||
|
errMsg.append(validMainDraftingUser(mainDraftingUser, listDict));
|
||||||
|
errMsg.append(validMainDraftingUnit(mainDraftingUnit, listDict));
|
||||||
|
errMsg.append(validMainDraftingUnitResponsiblePerson(mainDraftingUnitResponsiblePerson, listDict));
|
||||||
|
errMsg.append(validStandardPromoter(standardPromoter, listDict));
|
||||||
|
errMsg.append(validContactUser(contactUser, listDict));
|
||||||
|
// 如果数据有问题,则将提示信息添加到 errorMsgs 中
|
||||||
|
if (errMsg.length() > 0) {
|
||||||
|
errorMsgs.add(errMsgHeader.append(errMsg).toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return errorMsgs;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String validAuthDept(String value, List<SysDictItemCore> listDict) {
|
||||||
|
// 非空检查
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'授权部门'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查授权部门
|
||||||
|
if (!excelUtils.validDict("depart_name", value, "sys_depart", "id", false, listDict)) {
|
||||||
|
return "'授权部门'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validStandardCode(String value, List<SysDictItemCore> listDict) {
|
||||||
|
// 检查企业标准代号
|
||||||
|
if (!excelUtils.validDict("enterprise_standard_code", value, null, null, true, listDict)) {
|
||||||
|
return "'企业标准代号'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validCooperateUnit(String value, List<SysDictItemCore> listDict) { // 非空检查
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'配合单位'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查配合单位
|
||||||
|
if (!excelUtils.validDict("depart_name", value, "sys_depart", "id", false, listDict)) {
|
||||||
|
return "'配合单位'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validMainDraftingUser(String value, List<SysDictItemCore> listDict) {
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'主起草人'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查主起草人
|
||||||
|
if (!excelUtils.validDict("username", value, "sys_user", "id", true, listDict)) {
|
||||||
|
return "'主起草人'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validMainDraftingUnit(String value, List<SysDictItemCore> listDict) {
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'主起草单位'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查主起草单位
|
||||||
|
if (!excelUtils.validDict("depart_name", value, "sys_depart", "id", true, listDict)) {
|
||||||
|
return "'主起草单位'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validMainDraftingUnitResponsiblePerson(String value, List<SysDictItemCore> listDict) {
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'主起草单位负责人'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查主起草单位负责人
|
||||||
|
if (!excelUtils.validDict("username", value, "sys_user", "id", true, listDict)) {
|
||||||
|
return "'主起草单位负责人'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validStandardPromoter(String value, List<SysDictItemCore> listDict) {
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'标准推进人'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查标准推进人
|
||||||
|
if (!excelUtils.validDict("username", value, "sys_user", "id", true, listDict)) {
|
||||||
|
return "'标准推进人'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validContactUser(String value, List<SysDictItemCore> listDict) {
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'联络人'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查联络人
|
||||||
|
if (!excelUtils.validDict("username", value, "sys_user", "id", true, listDict)) {
|
||||||
|
return "'联络人'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
private String validProjectType(ProcessEsAnnualInit plan, List<SysDictItemCore> listDict, List<LawsEnterpriseStandard> esList) {
|
||||||
|
String projectType = plan.getProjectType();
|
||||||
|
String originEnStandardNo = plan.getProjectType();
|
||||||
|
String newEnStandardName = plan.getNewEnStandardName();
|
||||||
|
if (StrUtil.isBlank(projectType)) {
|
||||||
|
return "'制修订类型'不能为空。";
|
||||||
|
}
|
||||||
|
if (!excelUtils.validDict("esp_revision_type", projectType, null, null, true, listDict)) {
|
||||||
|
return "'制修订类型'无效。";
|
||||||
|
}
|
||||||
|
// 修订
|
||||||
|
if (projectType.equals(ESPProjectType.MODIFY.getValue())) {
|
||||||
|
// 检查企标编号是否有效
|
||||||
|
if (StrUtil.isBlank(originEnStandardNo)) {
|
||||||
|
return "'原企标编号'不能为空。";
|
||||||
|
}
|
||||||
|
if (!esList.stream().map(LawsEnterpriseStandard::getStandardNumber).collect(Collectors.toList()).contains(originEnStandardNo)) {
|
||||||
|
return "'原企标编号'无效。";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (newEnStandardName.length() > 50) {
|
||||||
|
return "'新企标名称'过长(最多50字)。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+81
@@ -0,0 +1,81 @@
|
|||||||
|
package com.jero.modules.activiti.process.esAnnualReport.controller;
|
||||||
|
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import com.jero.common.aspect.annotation.Translation;
|
||||||
|
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualReport.entity.ProcessEsAnnualReport;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualReport.service.ProcessEsAnnualReportService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static com.jero.common.system.base.controller.JeroController.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: Mzaxd
|
||||||
|
* @Date: 2023/10/18 10:44
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "企标年度制修订主动上报流程")
|
||||||
|
@RequestMapping("/process/es/annualReport")
|
||||||
|
public class ESAnnualReportController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ProcessEsAnnualReportService annualReportService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入模板下载
|
||||||
|
*/
|
||||||
|
@GetMapping("/templateDownload")
|
||||||
|
@ApiOperation(value = "企标年度制修订主动上报流程-导入模板下载", notes = "企标年度制修订主动上报流程-导入模板下载",
|
||||||
|
produces = "application/octet-stream")
|
||||||
|
@AutoLog(value = "企标年度制修订主动上报流程-导入模板下载")
|
||||||
|
public ModelAndView templateDownload() {
|
||||||
|
// AutoPoi 导出Excel
|
||||||
|
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||||
|
String title = "各部门主动上报导入模板";
|
||||||
|
mv.addObject(FILE_NAME, title);
|
||||||
|
mv.addObject(CLASS, ProcessEsAnnualReport.class);
|
||||||
|
ExportParams exportParams = new ExportParams(title, title);
|
||||||
|
// 导出xlsx
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
mv.addObject(PARAMS, exportParams);
|
||||||
|
mv.addObject(NormalExcelConstants.DATA_LIST, new ArrayList<T>());
|
||||||
|
return mv;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/importExcel")
|
||||||
|
@ApiOperation(value = "企标年度制修订主动上报流程-导入", notes = "企标年度制修订主动上报流程-导入")
|
||||||
|
@AutoLog(value = "企标年度制修订主动上报流程-导入")
|
||||||
|
@Translation
|
||||||
|
public Result<?> importExcel(@ApiParam(value = "要上传的文件", required = true) @RequestParam("file") MultipartFile file) {
|
||||||
|
Map<String, Object> resultMap = annualReportService.importData(file);
|
||||||
|
Object flag = resultMap.get("flag");
|
||||||
|
if (flag == YesOrNoEnum.YES.getValue()) {
|
||||||
|
return Result.OK(resultMap.get("dataList"));
|
||||||
|
} else {
|
||||||
|
return Result.error("导入失败", resultMap.get("msg"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+331
@@ -0,0 +1,331 @@
|
|||||||
|
package com.jero.modules.activiti.process.esAnnualReport.entity;
|
||||||
|
|
||||||
|
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 java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标-年度制修订计划-各部门主动上报
|
||||||
|
* @TableName process_es_annual_report
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value ="process_es_annual_report")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="process_es_annual_report对象", description="企标-年度制修订计划-各部门主动上报")
|
||||||
|
public class ProcessEsAnnualReport implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标计划Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企标计划Id")
|
||||||
|
private String espId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private String orgCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0表示未删除,1表示删除
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "0表示未删除,1表示删除")
|
||||||
|
private Integer delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "流程实例Id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请类别
|
||||||
|
*/
|
||||||
|
@Dict(dicCode = "esp_application_category")
|
||||||
|
@ApiModelProperty(value = "申请类别")
|
||||||
|
private String applicationCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目类型
|
||||||
|
*/
|
||||||
|
@Excel(name = "制修订类型", width = 15, orderNum = "1")
|
||||||
|
@Dict(dicCode = "esp_revision_type")
|
||||||
|
@ApiModelProperty(value = "制修订类型")
|
||||||
|
private String projectType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原企标编号
|
||||||
|
*/
|
||||||
|
@Excel(name = "原企标编号", width = 15, orderNum = "2")
|
||||||
|
@ApiModelProperty(value = "原企标编号")
|
||||||
|
private String originEnStandardNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新企标编号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "新企标编号")
|
||||||
|
private String newEnStandardNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原企标名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "原企标名称", width = 15, orderNum = "4")
|
||||||
|
@ApiModelProperty(value = "原企标名称")
|
||||||
|
private String originEnStandardName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新企标名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "新企标名称", width = 15, orderNum = "5")
|
||||||
|
@ApiModelProperty(value = "新企标名称")
|
||||||
|
private String newEnStandardName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标英文名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企标英文名称")
|
||||||
|
private String enStandardEnglishName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标体系
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企标体系")
|
||||||
|
private String enStandardSystem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业标准代号
|
||||||
|
*/
|
||||||
|
@Excel(name = "企业标准代号", width = 15, orderNum = "7")
|
||||||
|
@Dict(dicCode = "enterprise_standard_code")
|
||||||
|
@ApiModelProperty(value = "企业标准代号")
|
||||||
|
private String enStandardCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业名称代号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企业名称代号")
|
||||||
|
private String enNameCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准类别代号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准类别代号")
|
||||||
|
private String standardCategoryCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年代号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "年代号")
|
||||||
|
private String decadeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准类型")
|
||||||
|
private String standardType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标等级分类
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企标等级分类")
|
||||||
|
private String enStandardClassification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 草稿计划完成日期
|
||||||
|
*/
|
||||||
|
@Excel(name = "草稿计划完成日期", width = 20, orderNum = "13")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "草稿计划完成日期")
|
||||||
|
private Date draftPlannedCompleteDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 征求意见稿计划完成日期
|
||||||
|
*/
|
||||||
|
@Excel(name = "征求意见稿计划完成日期", width = 24, orderNum = "14")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "征求意见稿计划完成日期")
|
||||||
|
private Date solicitationDraftPlanCompleteDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划报批日期
|
||||||
|
*/
|
||||||
|
@Excel(name = "计划报批日期", width = 15, orderNum = "15")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "计划报批日期")
|
||||||
|
private Date planApprovalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "项目状态")
|
||||||
|
private String projectStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编制说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "编制说明")
|
||||||
|
private String compilationDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 零部件名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "零部件名称")
|
||||||
|
private String componentName;
|
||||||
|
/**
|
||||||
|
* 主起草人
|
||||||
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "主起草人")
|
||||||
|
private String mainDraftingUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主起草单位
|
||||||
|
*/
|
||||||
|
@Excel(name = "主起草单位", width = 15, orderNum = "9")
|
||||||
|
@ApiModelProperty(value = "主起草单位")
|
||||||
|
private String mainDraftingUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主起草单位责任人
|
||||||
|
*/
|
||||||
|
@Excel(name = "主起草单位责任人", width = 20, orderNum = "10")
|
||||||
|
@Dict(dicCode = "id", dictTable = "sys_user", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "主起草单位责任人")
|
||||||
|
private String mainDraftingUnitResponsiblePerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准推进人
|
||||||
|
*/
|
||||||
|
@Excel(name = "标准推进人", width = 15, orderNum = "12")
|
||||||
|
@Dict(dicCode = "id", dictTable = "sys_user", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "标准推进人")
|
||||||
|
private String standardPromoter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 草稿完成日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "草稿完成日期")
|
||||||
|
private Date draftCompletionDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交草稿日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "提交草稿日期")
|
||||||
|
private Date draftSubmissionDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否征求意见
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否征求意见")
|
||||||
|
private String solicitationOpinionEnabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 征求意见稿完成日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "征求意见稿完成日期")
|
||||||
|
private Date solicitationDraftCompletionDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更状态
|
||||||
|
*/
|
||||||
|
@Dict(dicCode = "esp_change_status")
|
||||||
|
@ApiModelProperty(value = "变更状态")
|
||||||
|
private String changeStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传附件
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "上传附件")
|
||||||
|
private String uploadAttachment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更原因
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "变更原因")
|
||||||
|
private String changeReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 授权部门
|
||||||
|
*/
|
||||||
|
@Excel(name = "授权部门", width = 15, orderNum = "6")
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@ApiModelProperty(value = "授权部门")
|
||||||
|
private String authDept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配合单位
|
||||||
|
*/
|
||||||
|
@Excel(name = "配合单位", width = 15, orderNum = "8")
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@ApiModelProperty(value = "配合单位")
|
||||||
|
private String cooperationUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 隶属工作组
|
||||||
|
*/
|
||||||
|
@Excel(name = "隶属工作组", width = 15, orderNum = "11")
|
||||||
|
@Dict(dictTable = "laws_working_group", dicCode = "id", dicText = "name")
|
||||||
|
@ApiModelProperty(value = "隶属工作组")
|
||||||
|
private String workGroup;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String sort;
|
||||||
|
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package com.jero.modules.activiti.process.esAnnualReport.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualReport.entity.ProcessEsAnnualReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ThinkBook
|
||||||
|
* @description 针对表【process_es_annual_report(企标-年度制修订计划-各部门主动上报)】的数据库操作Mapper
|
||||||
|
* @createDate 2023-10-18 09:52:41
|
||||||
|
* @Entity com.jero.modules.activiti.process.esAnnualInit.entity.ProcessEsAnnualReport
|
||||||
|
*/
|
||||||
|
public interface ProcessEsAnnualReportMapper extends BaseMapper<ProcessEsAnnualReport> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.activiti.process.esAnnualReport.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualReport.entity.ProcessEsAnnualReport;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ThinkBook
|
||||||
|
* @description 针对表【process_es_annual_report(企标-年度制修订计划-各部门主动上报)】的数据库操作Service
|
||||||
|
* @createDate 2023-10-18 09:52:41
|
||||||
|
*/
|
||||||
|
public interface ProcessEsAnnualReportService extends IService<ProcessEsAnnualReport> {
|
||||||
|
|
||||||
|
Map<String, Object> importData(MultipartFile file);
|
||||||
|
}
|
||||||
+294
@@ -0,0 +1,294 @@
|
|||||||
|
package com.jero.modules.activiti.process.esAnnualReport.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.api.CommonAPI;
|
||||||
|
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
import com.jero.common.system.vo.SysDictItemCore;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualReport.entity.ProcessEsAnnualReport;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualReport.mapper.ProcessEsAnnualReportMapper;
|
||||||
|
import com.jero.modules.activiti.process.esAnnualReport.service.ProcessEsAnnualReportService;
|
||||||
|
import com.jero.modules.activiti.process.esInitChange.entity.enums.ESPProjectType;
|
||||||
|
import com.jero.modules.activiti.util.ExcelUtils;
|
||||||
|
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
||||||
|
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ThinkBook
|
||||||
|
* @description 针对表【process_es_annual_report(企标-年度制修订计划-各部门主动上报)】的数据库操作Service实现
|
||||||
|
* @createDate 2023-10-18 09:52:41
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
|
public class ProcessEsAnnualReportServiceImpl extends ServiceImpl<ProcessEsAnnualReportMapper, ProcessEsAnnualReport>
|
||||||
|
implements ProcessEsAnnualReportService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CommonAPI commonAPI;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ExcelUtils excelUtils;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ILawsEnterpriseStandardService enterpriseStandardService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> importData(MultipartFile file) {
|
||||||
|
List<SysDictItemCore> listDict = commonAPI.getDictItemAll();
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
List<String> errorMsgs = new ArrayList<>();
|
||||||
|
|
||||||
|
// 获取Excel的header
|
||||||
|
List<String> headers;
|
||||||
|
try {
|
||||||
|
headers = ExcelUtils.getHeaderFromExcel(file.getInputStream());
|
||||||
|
} catch (Exception e) {
|
||||||
|
errorMsgs.add("上传模板错误,请检查后重试。");
|
||||||
|
resultMap.put("msg", errorMsgs);
|
||||||
|
resultMap.put("flag", YesOrNoEnum.NO.getValue());
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
return resultMap; // 返回错误信息
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用静态方法验证header
|
||||||
|
boolean isMatched = headers.equals(ExcelUtils.getSortedHeadersFromClass(ProcessEsAnnualReport.class));
|
||||||
|
if (!isMatched) {
|
||||||
|
errorMsgs.add("上传模板错误,请检查后重试。");
|
||||||
|
resultMap.put("msg", errorMsgs);
|
||||||
|
resultMap.put("flag", YesOrNoEnum.NO.getValue());
|
||||||
|
return resultMap; // 返回错误信息
|
||||||
|
}
|
||||||
|
|
||||||
|
ImportParams params = new ImportParams();
|
||||||
|
params.setTitleRows(1);
|
||||||
|
params.setHeadRows(1);
|
||||||
|
params.setNeedSave(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
List<ProcessEsAnnualReport> list = ExcelImportUtil.importExcel(file.getInputStream(), ProcessEsAnnualReport.class, params);
|
||||||
|
if (list.isEmpty()) {
|
||||||
|
errorMsgs.add("文件暂无数据,请检查后重试。");
|
||||||
|
resultMap.put("msg", errorMsgs);
|
||||||
|
resultMap.put("flag", YesOrNoEnum.NO.getValue());
|
||||||
|
return resultMap; // 返回错误信息
|
||||||
|
}
|
||||||
|
// 批量检查数据是否有效
|
||||||
|
errorMsgs = this.validationList(list, listDict);
|
||||||
|
if (errorMsgs.size() > 0) {
|
||||||
|
resultMap.put("msg", errorMsgs);
|
||||||
|
resultMap.put("flag", YesOrNoEnum.NO.getValue());
|
||||||
|
} else {
|
||||||
|
resultMap.put("flag", YesOrNoEnum.YES.getValue());
|
||||||
|
// 转换为字典值
|
||||||
|
this.transToDictValue(list, listDict);
|
||||||
|
// 清洗
|
||||||
|
this.cleanData(list);
|
||||||
|
resultMap.put("dataList", list);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
errorMsgs.add("文件导入异常:" + e.getMessage());
|
||||||
|
resultMap.put("msg", errorMsgs);
|
||||||
|
resultMap.put("flag", YesOrNoEnum.NO.getValue());
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
file.getInputStream().close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cleanData(List<ProcessEsAnnualReport> list) {
|
||||||
|
list.forEach(item-> {
|
||||||
|
// 如果是制定则去除掉所有的原企标名称 原企标编号
|
||||||
|
if (ESPProjectType.ENACT.getValue().equals(item.getProjectType())) {
|
||||||
|
item.setOriginEnStandardName(null);
|
||||||
|
item.setOriginEnStandardNo(null);
|
||||||
|
}
|
||||||
|
// 设置变更状态 制定是新增 修订是变更
|
||||||
|
if (item.getProjectType().equals("制定")) {
|
||||||
|
item.setChangeStatus("新增");
|
||||||
|
} else {
|
||||||
|
item.setChangeStatus("变更");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void transToDictValue(List<ProcessEsAnnualReport> list, List<SysDictItemCore> listDict) {
|
||||||
|
list.forEach(item -> {
|
||||||
|
item.setProjectType(excelUtils.translateDictValue("esp_revision_type", item.getProjectType(), listDict));
|
||||||
|
item.setAuthDept(excelUtils.translateDictValue("depart_name", "id", "sys_depart", item.getAuthDept(), listDict));
|
||||||
|
item.setEnStandardCode(excelUtils.translateDictValue("enterprise_standard_code", item.getEnStandardCode(), listDict));
|
||||||
|
item.setCooperationUnit(excelUtils.translateDictValue("depart_name", "id", "sys_depart", item.getCooperationUnit(), listDict));
|
||||||
|
item.setMainDraftingUser(excelUtils.translateDictValue("username", "id", "sys_user", item.getMainDraftingUser(), listDict));
|
||||||
|
item.setMainDraftingUnit(excelUtils.translateDictValue("depart_name", "id", "sys_depart", item.getMainDraftingUnit(), listDict));
|
||||||
|
item.setMainDraftingUnitResponsiblePerson(excelUtils.translateDictValue("username", "id", "sys_user", item.getMainDraftingUnitResponsiblePerson(), listDict));
|
||||||
|
item.setStandardPromoter(excelUtils.translateDictValue("username", "id", "sys_user", item.getStandardPromoter(), listDict));
|
||||||
|
item.setWorkGroup(excelUtils.translateDictValue("name", "id", "laws_working_group", item.getWorkGroup(), listDict));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> validationList(List<ProcessEsAnnualReport> list, List<SysDictItemCore> listDict) {
|
||||||
|
List<LawsEnterpriseStandard> esList = enterpriseStandardService.list();
|
||||||
|
List<String> errorMsgs = new ArrayList<>();
|
||||||
|
|
||||||
|
int i = 3;
|
||||||
|
Iterator<ProcessEsAnnualReport> iterator = list.iterator();
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
ProcessEsAnnualReport plan = iterator.next();
|
||||||
|
if (ExcelUtils.isEmptyRow(plan)) {
|
||||||
|
iterator.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
plan.setSort(String.valueOf(i++));
|
||||||
|
String enStandardCode = plan.getProjectType();
|
||||||
|
String authDept = plan.getProjectType();
|
||||||
|
String cooperationUnit = plan.getCooperationUnit();
|
||||||
|
String mainDraftingUnit = plan.getMainDraftingUnit();
|
||||||
|
String mainDraftingUser = plan.getProjectType();
|
||||||
|
String mainDraftingUnitResponsiblePerson = plan.getMainDraftingUnitResponsiblePerson();
|
||||||
|
String standardPromoter = plan.getStandardPromoter();
|
||||||
|
String workGroup = plan.getWorkGroup();
|
||||||
|
|
||||||
|
StringBuilder errMsgHeader = new StringBuilder();
|
||||||
|
StringBuilder errMsg = new StringBuilder();
|
||||||
|
errMsgHeader.append("第").append(plan.getSort()).append("行");
|
||||||
|
|
||||||
|
// 检查制修订类型 编号 名称
|
||||||
|
errMsg.append(validProjectType(plan, listDict, esList));
|
||||||
|
// 检查所有数据字典校验的字段
|
||||||
|
errMsg.append(validAuthDept(authDept, listDict));
|
||||||
|
errMsg.append(validStandardCode(enStandardCode, listDict));
|
||||||
|
errMsg.append(validCooperateUnit(cooperationUnit, listDict));
|
||||||
|
errMsg.append(validMainDraftingUser(mainDraftingUser, listDict));
|
||||||
|
errMsg.append(validMainDraftingUnit(mainDraftingUnit, listDict));
|
||||||
|
errMsg.append(validMainDraftingUnitResponsiblePerson(mainDraftingUnitResponsiblePerson, listDict));
|
||||||
|
errMsg.append(validStandardPromoter(standardPromoter, listDict));
|
||||||
|
errMsg.append(validWorkGroup(workGroup, listDict));
|
||||||
|
// 如果数据有问题,则将提示信息添加到 errorMsgs 中
|
||||||
|
if (errMsg.length() > 0) {
|
||||||
|
errorMsgs.add(errMsgHeader.append(errMsg).toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return errorMsgs;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String validAuthDept(String value, List<SysDictItemCore> listDict) {
|
||||||
|
// 非空检查
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'授权部门'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查授权部门
|
||||||
|
if (!excelUtils.validDict("depart_name", value, "sys_depart", "id", false, listDict)) {
|
||||||
|
return "'授权部门'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validStandardCode(String value, List<SysDictItemCore> listDict) {
|
||||||
|
// 检查企业标准代号
|
||||||
|
if (!excelUtils.validDict("enterprise_standard_code", value, null, null, true, listDict)) {
|
||||||
|
return "'企业标准代号'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validCooperateUnit(String value, List<SysDictItemCore> listDict) { // 非空检查
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'配合单位'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查配合单位
|
||||||
|
if (!excelUtils.validDict("depart_name", value, "sys_depart", "id", false, listDict)) {
|
||||||
|
return "'配合单位'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validMainDraftingUser(String value, List<SysDictItemCore> listDict) {
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'主起草人'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查主起草人
|
||||||
|
if (!excelUtils.validDict("username", value, "sys_user", "id", true, listDict)) {
|
||||||
|
return "'主起草人'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validMainDraftingUnit(String value, List<SysDictItemCore> listDict) {
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'主起草单位'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查主起草单位
|
||||||
|
if (!excelUtils.validDict("depart_name", value, "sys_depart", "id", true, listDict)) {
|
||||||
|
return "'主起草单位'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validMainDraftingUnitResponsiblePerson(String value, List<SysDictItemCore> listDict) {
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'主起草单位负责人'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查主起草单位负责人
|
||||||
|
if (!excelUtils.validDict("username", value, "sys_user", "id", true, listDict)) {
|
||||||
|
return "'主起草单位负责人'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validStandardPromoter(String value, List<SysDictItemCore> listDict) {
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return "'标准推进人'不能为空。";
|
||||||
|
}
|
||||||
|
// 检查标准推进人
|
||||||
|
if (!excelUtils.validDict("username", value, "sys_user", "id", true, listDict)) {
|
||||||
|
return "'标准推进人'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
private String validWorkGroup(String value, List<SysDictItemCore> listDict) {
|
||||||
|
// 检查工作组
|
||||||
|
if (!excelUtils.validDict("name", value, "laws_working_group", "id", true, listDict)) {
|
||||||
|
return "'工作组'无效。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
private String validProjectType(ProcessEsAnnualReport plan, List<SysDictItemCore> listDict, List<LawsEnterpriseStandard> esList) {
|
||||||
|
String projectType = plan.getProjectType();
|
||||||
|
String originEnStandardNo = plan.getProjectType();
|
||||||
|
String newEnStandardName = plan.getNewEnStandardName();
|
||||||
|
if (StrUtil.isBlank(projectType)) {
|
||||||
|
return "'制修订类型'不能为空。";
|
||||||
|
}
|
||||||
|
if (!excelUtils.validDict("esp_revision_type", projectType, null, null, true, listDict)) {
|
||||||
|
return "'制修订类型'无效。";
|
||||||
|
}
|
||||||
|
// 修订
|
||||||
|
if (projectType.equals(ESPProjectType.MODIFY.getValue())) {
|
||||||
|
// 检查企标编号是否有效
|
||||||
|
if (StrUtil.isBlank(originEnStandardNo)) {
|
||||||
|
return "'原企标编号'不能为空。";
|
||||||
|
}
|
||||||
|
if (!esList.stream().map(LawsEnterpriseStandard::getStandardNumber).collect(Collectors.toList()).contains(originEnStandardNo)) {
|
||||||
|
return "'原企标编号'无效。";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (newEnStandardName.length() > 50) {
|
||||||
|
return "'新企标名称'过长(最多50字)。";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+112
-68
@@ -8,7 +8,7 @@ import java.io.Serializable;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
|
|||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企标计划
|
* 企标立项变更计划
|
||||||
* @TableName process_es_init_change
|
* @TableName process_es_init_change
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@@ -33,86 +33,109 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/** 企标计划ID */
|
/** 企标计划ID */
|
||||||
|
@ApiModelProperty(value = "企标计划ID")
|
||||||
private String espId;
|
private String espId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准计划Id1(合并流程字段)
|
* 标准计划Id1(合并流程字段)
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "标准计划Id1(合并流程字段)")
|
||||||
private String standardIdOne;
|
private String standardIdOne;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准编号1(合并流程字段)
|
* 标准编号1(合并流程字段)
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "标准编号1(合并流程字段)")
|
||||||
private String standardNoOne;
|
private String standardNoOne;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准名称1(合并流程字段)
|
* 标准名称1(合并流程字段)
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "标准名称1(合并流程字段)")
|
||||||
private String standardNameOne;
|
private String standardNameOne;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 制修订类型1(合并流程字段)
|
* 制修订类型1(合并流程字段)
|
||||||
*/
|
*/
|
||||||
|
@Dict(dicCode = "esp_project_type")
|
||||||
|
@ApiModelProperty(value = "制修订类型1(合并流程字段)")
|
||||||
private String projectTypeOne;
|
private String projectTypeOne;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 制修订类型2(合并流程字段)
|
||||||
|
*/
|
||||||
|
@Dict(dicCode = "esp_project_type")
|
||||||
|
@ApiModelProperty(value = "制修订类型2(合并流程字段)")
|
||||||
|
private String projectTypeTwo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准计划Id2(合并流程字段)
|
* 标准计划Id2(合并流程字段)
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "标准计划Id2(合并流程字段)")
|
||||||
private String standardIdTwo;
|
private String standardIdTwo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准编号2(合并流程字段)
|
* 标准编号2(合并流程字段)
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "标准编号2(合并流程字段)")
|
||||||
private String standardNoTwo;
|
private String standardNoTwo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准名称2(合并流程字段)
|
* 标准名称2(合并流程字段)
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "标准名称2(合并流程字段)")
|
||||||
private String standardNameTwo;
|
private String standardNameTwo;
|
||||||
|
|
||||||
/**
|
|
||||||
* 制修订类型2(合并流程字段)
|
|
||||||
*/
|
|
||||||
private String projectTypeTwo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新人
|
* 更新人
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属部门
|
* 所属部门
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
private String orgCode;
|
private String orgCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0表示未删除,1表示删除
|
* 0表示未删除,1表示删除
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "0表示未删除,1表示删除")
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程名称
|
* 流程名称
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "流程名称")
|
||||||
private String processName;
|
private String processName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程实例Id
|
* 流程实例Id
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "流程实例Id")
|
||||||
private String processInstanceId;
|
private String processInstanceId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,81 +143,99 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "截止日期")
|
||||||
private Date deadlineDate;
|
private Date deadlineDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程说明
|
* 流程说明
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "流程说明")
|
||||||
private String processDescription;
|
private String processDescription;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 申请类别
|
* 申请类别
|
||||||
*/
|
*/
|
||||||
|
@Dict(dicCode = "esp_application_category")
|
||||||
|
@ApiModelProperty(value = "申请类别")
|
||||||
private String applicationCategory;
|
private String applicationCategory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目类型
|
* 项目类型
|
||||||
*/
|
*/
|
||||||
|
@Dict(dicCode = "esp_project_type")
|
||||||
|
@ApiModelProperty(value = "项目类型")
|
||||||
private String projectType;
|
private String projectType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原企标编号
|
* 原企标编号
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "原企标编号")
|
||||||
private String originEnStandardNo;
|
private String originEnStandardNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新企标编号
|
* 新企标编号
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "新企标编号")
|
||||||
private String newEnStandardNo;
|
private String newEnStandardNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原企标名称
|
* 原企标名称
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "原企标名称")
|
||||||
private String originEnStandardName;
|
private String originEnStandardName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新企标名称
|
* 新企标名称
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "新企标名称")
|
||||||
private String newEnStandardName;
|
private String newEnStandardName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企标英文名称
|
* 企标英文名称
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "企标英文名称")
|
||||||
private String enStandardEnglishName;
|
private String enStandardEnglishName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企标体系
|
* 企标体系
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "企标体系")
|
||||||
private String enStandardSystem;
|
private String enStandardSystem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业标准代号
|
* 企业标准代号
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "企业标准代号")
|
||||||
private String enStandardCode;
|
private String enStandardCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业名称代号
|
* 企业名称代号
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "企业名称代号")
|
||||||
private String enNameCode;
|
private String enNameCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准类别代号
|
* 标准类别代号
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "标准类别代号")
|
||||||
private String standardCategoryCode;
|
private String standardCategoryCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年代号
|
* 年代号
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "年代号")
|
||||||
private String decadeCode;
|
private String decadeCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准类型
|
* 标准类型
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "标准类型")
|
||||||
private String standardType;
|
private String standardType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企标等级分类
|
* 企标等级分类
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "企标等级分类")
|
||||||
private String enStandardClassification;
|
private String enStandardClassification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -202,6 +243,7 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "原草稿计划完成日期")
|
||||||
private Date originDraftPlannedCompleteDate;
|
private Date originDraftPlannedCompleteDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -209,6 +251,7 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "原征求意见稿计划完成日期")
|
||||||
private Date originSolicitationDraftPlanCompleteDate;
|
private Date originSolicitationDraftPlanCompleteDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -216,14 +259,15 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "原计划报批日期")
|
||||||
private Date originPlanApprovalDate;
|
private Date originPlanApprovalDate;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 草稿计划完成日期
|
* 草稿计划完成日期
|
||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "草稿计划完成日期")
|
||||||
private Date draftPlannedCompleteDate;
|
private Date draftPlannedCompleteDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -231,6 +275,7 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "征求意见稿计划完成日期")
|
||||||
private Date solicitationDraftPlanCompleteDate;
|
private Date solicitationDraftPlanCompleteDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -238,82 +283,56 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "计划报批日期")
|
||||||
private Date planApprovalDate;
|
private Date planApprovalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目状态
|
* 项目状态
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "项目状态")
|
||||||
private String projectStatus;
|
private String projectStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编制说明
|
* 编制说明
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "编制说明")
|
||||||
private String compilationDescription;
|
private String compilationDescription;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 零部件名称
|
* 零部件名称
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "零部件名称")
|
||||||
private String componentName;
|
private String componentName;
|
||||||
|
|
||||||
/**
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
* 主起草人
|
@ApiModelProperty(value = "主起草人")
|
||||||
*/
|
|
||||||
private String mainDraftingUser;
|
private String mainDraftingUser;
|
||||||
|
|
||||||
/**
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
* 主起草人
|
@ApiModelProperty(value = "主起草单位")
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
@JsonProperty("mainDraftingUser_dictText")
|
|
||||||
private String mainDraftingUserDictText;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主起草单位
|
|
||||||
*/
|
|
||||||
private String mainDraftingUnit;
|
private String mainDraftingUnit;
|
||||||
|
|
||||||
/**
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
* 主起草单位
|
@ApiModelProperty(value = "主起草单位责任人")
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
@JsonProperty("mainDraftingUnit_dictText")
|
|
||||||
private String mainDraftingUnitDictText;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主起草单位责任人
|
|
||||||
*/
|
|
||||||
private String mainDraftingUnitResponsiblePerson;
|
private String mainDraftingUnitResponsiblePerson;
|
||||||
|
|
||||||
/**
|
|
||||||
* 主起草单位责任人
|
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
@JsonProperty("mainDraftingUnitResponsiblePerson_dictText")
|
|
||||||
private String mainDraftingUnitResponsiblePersonDictText;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新主起草单位负责人
|
* 新主起草单位负责人
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "新主起草单位负责人")
|
||||||
private String newMainDraftingUnitResponsiblePerson;
|
private String newMainDraftingUnitResponsiblePerson;
|
||||||
|
|
||||||
/**
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
* 标准推进人
|
@ApiModelProperty(value = "标准推进人")
|
||||||
*/
|
|
||||||
private String standardPromoter;
|
private String standardPromoter;
|
||||||
|
|
||||||
/**
|
|
||||||
* 标准推进人
|
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
@JsonProperty("standardPromoter_dictText")
|
|
||||||
private String standardPromoterDictText;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 草稿完成日期
|
* 草稿完成日期
|
||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "草稿完成日期")
|
||||||
private Date draftCompletionDate;
|
private Date draftCompletionDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -321,11 +340,13 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "提交草稿日期")
|
||||||
private Date draftSubmissionDate;
|
private Date draftSubmissionDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否征求意见
|
* 是否征求意见
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "是否征求意见")
|
||||||
private String solicitationOpinionEnabled;
|
private String solicitationOpinionEnabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -333,6 +354,7 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "征求意见稿完成日期")
|
||||||
private Date solicitationDraftCompletionDate;
|
private Date solicitationDraftCompletionDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -340,6 +362,7 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "评审日期")
|
||||||
private Date reviewDate;
|
private Date reviewDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -347,6 +370,7 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "报批日期")
|
||||||
private Date approvalDate;
|
private Date approvalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -354,140 +378,160 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "发布日期")
|
||||||
private Date releaseDate;
|
private Date releaseDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 变更状态
|
* 变更状态
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "变更状态")
|
||||||
private String changeStatus;
|
private String changeStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 立项背景、立项依据
|
* 立项背景、立项依据
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "立项背景、立项依据")
|
||||||
private String projectBackground;
|
private String projectBackground;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际、国家及行业同类标准分析
|
* 国际、国家及行业同类标准分析
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "国家及行业同类标准分析")
|
||||||
private String similarNaStandardsAnalysis;
|
private String similarNaStandardsAnalysis;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业同类标准对比分析
|
* 企业同类标准对比分析
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "企业同类标准对比分析")
|
||||||
private String similarEnStandardsAnalysis;
|
private String similarEnStandardsAnalysis;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 立项标准的领先性与必要性
|
* 立项标准的领先性与必要性
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "立项标准的领先性与必要性")
|
||||||
private String standardLeadingNecessity;
|
private String standardLeadingNecessity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 立项目的及预期效果等
|
* 立项目的及预期效果等
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "立项目的及预期效果等")
|
||||||
private String projectExpectedEffects;
|
private String projectExpectedEffects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传附件
|
* 上传附件
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
|
@ApiModelProperty(value = "上传附件")
|
||||||
private String uploadAttachment;
|
private String uploadAttachment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件
|
* 附件
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
|
@ApiModelProperty(value = "附件")
|
||||||
private String attachment;
|
private String attachment;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否为优质标准
|
|
||||||
*/
|
|
||||||
private String qualityFlag;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 变更原因
|
* 变更原因
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "变更原因")
|
||||||
private String changeReason;
|
private String changeReason;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新主起草人
|
* 新主起草人
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "新主起草人")
|
||||||
private String newMainDraftingUser;
|
private String newMainDraftingUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新主起草单位
|
* 新主起草单位
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@ApiModelProperty(value = "新主起草单位")
|
||||||
private String newMainDraftingUnit;
|
private String newMainDraftingUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部所联络人
|
* 部所联络人
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "部所联络人")
|
||||||
private String contactUser;
|
private String contactUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准专家
|
* 标准专家
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "标准专家")
|
||||||
private String standardExpert;
|
private String standardExpert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主起草人主管级领导
|
* 主起草人主管级领导
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "主起草人主管级领导")
|
||||||
private String mainDraftUserLeader;
|
private String mainDraftUserLeader;
|
||||||
|
|
||||||
/**
|
|
||||||
* 主起草人主管级领导
|
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
@JsonProperty("mainDraftingUserLeader_dictText")
|
|
||||||
private String mainDraftUserLeaderDictText;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主起草人主管级领导上级领导
|
* 主起草人主管级领导上级领导
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "主起草人主管级领导上级领导")
|
||||||
private String mainDraftUserLeaderLeader;
|
private String mainDraftUserLeaderLeader;
|
||||||
|
|
||||||
/**
|
|
||||||
* 主起草人主管级领导上级领导
|
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
@JsonProperty("mainDraftingUserLeaderLeader_dictText")
|
|
||||||
private String mainDraftUserLeaderLeaderDictText;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准化审批人
|
* 标准化审批人
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "标准化审批人")
|
||||||
private String standardizationApprovalUser;
|
private String standardizationApprovalUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新主起草部门领导的领导
|
* 新主起草部门领导的领导
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "新主起草部门领导的领导")
|
||||||
private String newMainDraftUserLeaderLeader;
|
private String newMainDraftUserLeaderLeader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新主起草部门领导
|
* 新主起草部门领导
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "新主起草部门领导")
|
||||||
private String newMainDraftUserLeader;
|
private String newMainDraftUserLeader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 相关人员
|
* 相关人员
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "相关人员")
|
||||||
private String relatedUser;
|
private String relatedUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 抄送人
|
* 抄送人
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "抄送人")
|
||||||
private String copyUser;
|
private String copyUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 授权部门
|
* 授权部门
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@ApiModelProperty(value = "授权部门")
|
||||||
private String authDept;
|
private String authDept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配合单位
|
* 配合单位
|
||||||
*/
|
*/
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@ApiModelProperty(value = "配合单位")
|
||||||
private String cooperationUnit;
|
private String cooperationUnit;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|||||||
+1
-61
@@ -97,67 +97,7 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
|||||||
LambdaQueryWrapper<ProcessEsInitChange> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ProcessEsInitChange> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.eq(ProcessEsInitChange::getProcessInstanceId, processInstanceId);
|
lambdaQueryWrapper.eq(ProcessEsInitChange::getProcessInstanceId, processInstanceId);
|
||||||
lambdaQueryWrapper.eq(ProcessEsInitChange::getDelFlag, YesOrNoEnum.NO.getValue());
|
lambdaQueryWrapper.eq(ProcessEsInitChange::getDelFlag, YesOrNoEnum.NO.getValue());
|
||||||
return translateData(list(lambdaQueryWrapper));
|
return list(lambdaQueryWrapper);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 手动翻译数据
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private List<ProcessEsInitChange> translateData(List<ProcessEsInitChange> initChangeList) {
|
|
||||||
List<String> userIdList = new ArrayList<>();
|
|
||||||
List<String> departIdList = new ArrayList<>();
|
|
||||||
|
|
||||||
// 制作需要的Id集合
|
|
||||||
for (ProcessEsInitChange initChange : initChangeList) {
|
|
||||||
userIdList.add(initChange.getMainDraftingUser());
|
|
||||||
userIdList.add(initChange.getMainDraftingUnitResponsiblePerson());
|
|
||||||
userIdList.add(initChange.getStandardPromoter());
|
|
||||||
userIdList.add(initChange.getMainDraftUserLeader());
|
|
||||||
userIdList.add(initChange.getMainDraftUserLeaderLeader());
|
|
||||||
departIdList.add(initChange.getMainDraftingUnit());
|
|
||||||
}
|
|
||||||
// 根据Id集合获取所需数据
|
|
||||||
LambdaQueryWrapper<SysUser> userLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
userLambdaQueryWrapper.in(SysUser::getId, userIdList);
|
|
||||||
List<SysUser> userList = sysUserService.list(userLambdaQueryWrapper);
|
|
||||||
// 转成Map
|
|
||||||
Map<String, SysUser> userMap = userList.stream().collect(Collectors.toMap(SysUser::getId, sysUser -> sysUser));
|
|
||||||
|
|
||||||
LambdaQueryWrapper<SysDepart> deptLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
deptLambdaQueryWrapper.in(SysDepart::getId, departIdList);
|
|
||||||
List<SysDepart> departList = sysDepartService.list(deptLambdaQueryWrapper);
|
|
||||||
// 转成Map
|
|
||||||
Map<String, SysDepart> departMap = departList.stream().collect(Collectors.toMap(SysDepart::getId, sysDepart -> sysDepart));
|
|
||||||
|
|
||||||
// 翻译数据
|
|
||||||
for (ProcessEsInitChange initChange : initChangeList) {
|
|
||||||
// 主起草人
|
|
||||||
if (userMap.get(initChange.getMainDraftingUser()) != null) {
|
|
||||||
initChange.setMainDraftingUserDictText(userMap.get(initChange.getMainDraftingUser()).getUsername());
|
|
||||||
}
|
|
||||||
// 起草单位负责人
|
|
||||||
if (userMap.get(initChange.getMainDraftingUnitResponsiblePerson()) != null) {
|
|
||||||
initChange.setMainDraftingUnitResponsiblePersonDictText(userMap.get(initChange.getMainDraftingUnitResponsiblePerson()).getUsername());
|
|
||||||
}
|
|
||||||
// 标准推进人
|
|
||||||
if (userMap.get(initChange.getStandardPromoter()) != null) {
|
|
||||||
initChange.setStandardPromoterDictText(userMap.get(initChange.getStandardPromoter()).getUsername());
|
|
||||||
}
|
|
||||||
// 主起草人上级领导
|
|
||||||
if (userMap.get(initChange.getMainDraftUserLeader()) != null) {
|
|
||||||
initChange.setMainDraftUserLeaderDictText(userMap.get(initChange.getMainDraftUserLeader()).getUsername());
|
|
||||||
}
|
|
||||||
// 主起草用户领导的领导
|
|
||||||
if (userMap.get(initChange.getMainDraftUserLeaderLeader()) != null) {
|
|
||||||
initChange.setMainDraftUserLeaderLeaderDictText(userMap.get(initChange.getMainDraftUserLeaderLeader()).getUsername());
|
|
||||||
}
|
|
||||||
// 主起草单位
|
|
||||||
if (departMap.get(initChange.getMainDraftingUnit()) != null) {
|
|
||||||
initChange.setMainDraftingUnitDictText(departMap.get(initChange.getMainDraftingUnit()).getDepartName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return initChangeList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+22
-5
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.jero.modules.activiti.entity.ProcessApprovalRecord;
|
import com.jero.modules.activiti.entity.ProcessApprovalRecord;
|
||||||
|
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||||
import com.jero.modules.activiti.mapper.ProcessApprovalRecordMapper;
|
import com.jero.modules.activiti.mapper.ProcessApprovalRecordMapper;
|
||||||
import org.activiti.engine.RuntimeService;
|
import org.activiti.engine.RuntimeService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -46,13 +47,29 @@ public class ProcessAllService extends ServiceImpl<ProcessAllMapper, ProcessAll>
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void delete(String processInstanceId) {
|
public void delete(String processInstanceId) {
|
||||||
runtimeService.deleteProcessInstance(processInstanceId,"撤销");
|
//activiti撤销
|
||||||
LambdaQueryWrapper<ProcessAll> wrapper = new LambdaQueryWrapper<>();
|
runtimeService.deleteProcessInstance(processInstanceId,"强制撤销");
|
||||||
wrapper.eq(ProcessAll::getProcessInstanceId,processInstanceId);
|
//获得流程总表
|
||||||
this.remove(wrapper);
|
ProcessAll processAll = getByProcessInstanceId(processInstanceId);
|
||||||
|
//删除流程总表
|
||||||
|
this.removeById(processAll.getId());
|
||||||
|
//删除审批表
|
||||||
LambdaQueryWrapper<ProcessApprovalRecord> wrapper1 = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ProcessApprovalRecord> wrapper1 = new LambdaQueryWrapper<>();
|
||||||
wrapper1.eq(ProcessApprovalRecord::getProcessInstanceId,processInstanceId);
|
wrapper1.eq(ProcessApprovalRecord::getProcessInstanceId,processInstanceId);
|
||||||
processApprovalRecordMapper.delete(wrapper1);
|
processApprovalRecordMapper.delete(wrapper1);
|
||||||
|
//业务表修改为草稿
|
||||||
|
Integer prcType = processAll.getPrcType();
|
||||||
|
WorkCenterService classByValue = null;
|
||||||
|
try {
|
||||||
|
classByValue = (WorkCenterService) Class.forName(ProcessTypeEnum.getClassByValue(prcType)).newInstance();
|
||||||
|
}catch (Exception e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
}
|
||||||
|
classByValue.changeToDraft(processAll.getProjectId());
|
||||||
|
//todo 同步删除操作到统一待办
|
||||||
|
}
|
||||||
|
|
||||||
|
public IPage<ProcessAll> getAllList(Page<ProcessAll> page, QueryWrapper<ProcessAll> queryWrapper) {
|
||||||
|
return processAllMapper.getAllList(page,queryWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.jero.modules.activiti.service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author liJiaRao
|
||||||
|
* @date 2023-10-19 15:22
|
||||||
|
*/
|
||||||
|
public interface WorkCenterService {
|
||||||
|
/**
|
||||||
|
* 更改业务表为草稿
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
void changeToDraft(String id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,209 @@
|
|||||||
|
package com.jero.modules.activiti.util;
|
||||||
|
|
||||||
|
import com.jero.common.api.CommonAPI;
|
||||||
|
import com.jero.common.system.vo.SysDictItemCore;
|
||||||
|
import com.jero.common.util.oConvertUtils;
|
||||||
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
|
import org.apache.poi.ss.usermodel.Cell;
|
||||||
|
import org.apache.poi.ss.usermodel.Row;
|
||||||
|
import org.apache.poi.ss.usermodel.Sheet;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: Mzaxd
|
||||||
|
* @Date: 2023/8/18 15:50
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class ExcelUtils {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CommonAPI commonAPI;
|
||||||
|
|
||||||
|
public static Date excelSerialDateToJavaDate(double serialDate) {
|
||||||
|
// 首先,我们定义数据库支持的最早和最晚的日期。
|
||||||
|
Calendar minDate = Calendar.getInstance();
|
||||||
|
minDate.set(1000, Calendar.JANUARY, 1); // 这是MySQL的最小日期,可以根据需要修改
|
||||||
|
|
||||||
|
Calendar maxDate = Calendar.getInstance();
|
||||||
|
maxDate.set(9999, Calendar.DECEMBER, 31); // 这是MySQL的最大日期,可以根据需要修改
|
||||||
|
|
||||||
|
Calendar baseDate = Calendar.getInstance();
|
||||||
|
baseDate.set(1900, Calendar.JANUARY, 1); // Excel起始日期是1900-01-01
|
||||||
|
baseDate.add(Calendar.DATE, (int) serialDate - 2); // 减2是因为Excel中1900年被错误地视为闰年
|
||||||
|
|
||||||
|
// 现在我们比较日期是否在有效范围内
|
||||||
|
if (baseDate.before(minDate) || baseDate.after(maxDate)) {
|
||||||
|
throw new IllegalArgumentException("日期超出了有效范围: " + baseDate.getTime());
|
||||||
|
}
|
||||||
|
return baseDate.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取HeadRow的文本内容
|
||||||
|
*
|
||||||
|
* @param is 文件输入流
|
||||||
|
* @return HeadRow的List
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static List<String> getHeaderFromExcel(InputStream is) throws Exception {
|
||||||
|
List<String> headers = new ArrayList<>();
|
||||||
|
|
||||||
|
Workbook workbook = new XSSFWorkbook(is);
|
||||||
|
Sheet sheet = workbook.getSheetAt(0);
|
||||||
|
|
||||||
|
// HeadRow在index 1
|
||||||
|
for (int rowIndex = 1; rowIndex <= 1; rowIndex++) {
|
||||||
|
Row row = sheet.getRow(rowIndex);
|
||||||
|
for (Cell cell : row) {
|
||||||
|
headers.add(cell.getStringCellValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取一个类的所有带@Excel注解的字段的name属性值,并按照orderNum正序排序。
|
||||||
|
*
|
||||||
|
* @param clazz 要检查的类
|
||||||
|
* @return 包含所有带@Excel注解字段的name属性值的列表
|
||||||
|
*/
|
||||||
|
public static List<String> getSortedHeadersFromClass(Class<?> clazz) {
|
||||||
|
List<Field> annotatedFields = new ArrayList<>();
|
||||||
|
Field[] fields = clazz.getDeclaredFields();
|
||||||
|
|
||||||
|
for (Field field : fields) {
|
||||||
|
if (field.isAnnotationPresent(Excel.class)) {
|
||||||
|
annotatedFields.add(field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据orderNum正序排序
|
||||||
|
annotatedFields.sort(new Comparator<Field>() {
|
||||||
|
@Override
|
||||||
|
public int compare(Field o1, Field o2) {
|
||||||
|
Excel excel1 = o1.getAnnotation(Excel.class);
|
||||||
|
Excel excel2 = o2.getAnnotation(Excel.class);
|
||||||
|
return Integer.compare(Integer.parseInt(excel1.orderNum()), Integer.parseInt(excel2.orderNum()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 提取排序后字段的name属性值
|
||||||
|
List<String> sortedHeaders = new ArrayList<>();
|
||||||
|
for (Field field : annotatedFields) {
|
||||||
|
Excel excel = field.getAnnotation(Excel.class);
|
||||||
|
sortedHeaders.add(excel.name());
|
||||||
|
}
|
||||||
|
return sortedHeaders;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查一个对象的所有带@Excel注解的字段是否为空。
|
||||||
|
*
|
||||||
|
* @param obj 要检查的对象
|
||||||
|
* @return 如果所有带@Excel注解的字段都为空,则返回true,否则返回false。
|
||||||
|
*/
|
||||||
|
public static boolean isEmptyRow(Object obj) {
|
||||||
|
boolean isEmpty = true; // 假设行是空的
|
||||||
|
Field[] fields = obj.getClass().getDeclaredFields(); // 获取类的所有字段
|
||||||
|
|
||||||
|
for (Field field : fields) {
|
||||||
|
if (field.isAnnotationPresent(Excel.class)) { // 检查字段是否有@Excel注解
|
||||||
|
field.setAccessible(true); // 允许访问私有字段
|
||||||
|
try {
|
||||||
|
Object value = field.get(obj); // 获取字段的值
|
||||||
|
if (value != null) { // 如果字段不为空
|
||||||
|
isEmpty = false; // 行不是空的
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return isEmpty;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 校验数据字典
|
||||||
|
public boolean validDict(String dictCode, String dictValue, String dicTable, String dicText, boolean isSingle, List<SysDictItemCore> listDict) {
|
||||||
|
if (isSingle && dictValue.contains(",")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int count = dictValue.split(",").length;
|
||||||
|
String value = this.translateDictValue(dictCode, dicText, dicTable, dictValue, listDict);
|
||||||
|
return value != null && value.split(",").length == count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 翻译字典文本
|
||||||
|
*
|
||||||
|
* @param code 编码
|
||||||
|
* @param text 值
|
||||||
|
* @param listDict 字典集合
|
||||||
|
*/
|
||||||
|
public String translateDictValue(String code, String text, List<SysDictItemCore> listDict) {
|
||||||
|
StringBuilder textValue = new StringBuilder();
|
||||||
|
String tmpValue = null;
|
||||||
|
List<SysDictItemCore> listNew = listDict.stream().filter(o -> Objects.equals(o.getDictCode(), code) && Objects.equals(o.getItemText(), text.trim())).collect(Collectors.toList());
|
||||||
|
if (!CollectionUtils.isEmpty(listNew)) {
|
||||||
|
tmpValue = listNew.get(0).getItemValue();
|
||||||
|
}
|
||||||
|
if (tmpValue != null) {
|
||||||
|
if (!"".contentEquals(textValue)) {
|
||||||
|
textValue.append(",");
|
||||||
|
}
|
||||||
|
textValue.append(tmpValue);
|
||||||
|
}
|
||||||
|
return textValue.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 翻译字典文本
|
||||||
|
*
|
||||||
|
* @param code 编码
|
||||||
|
* @param text 值
|
||||||
|
* @param table 表名
|
||||||
|
* @param key 键
|
||||||
|
* @param listDict 字典集合
|
||||||
|
*/
|
||||||
|
public String translateDictValue(String code, String text, String table, String key, List<SysDictItemCore> listDict) {
|
||||||
|
if (oConvertUtils.isEmpty(key)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
StringBuilder textValue = new StringBuilder();
|
||||||
|
String[] keys = key.split(",");
|
||||||
|
for (String k : keys) {
|
||||||
|
String tmpValue = null;
|
||||||
|
if (k.trim().length() == 0) {
|
||||||
|
continue; //跳过循环
|
||||||
|
}
|
||||||
|
if (!StringUtils.isEmpty(table)) {
|
||||||
|
tmpValue = commonAPI.queryTableDictTextByKey(table, text, code, k.trim());
|
||||||
|
} else {
|
||||||
|
List<SysDictItemCore> listNew = listDict.stream().filter(o -> Objects.equals(o.getDictCode(), code) && Objects.equals(o.getItemValue(), k.trim())).collect(Collectors.toList());
|
||||||
|
if (!CollectionUtils.isEmpty(listNew)) {
|
||||||
|
tmpValue = listNew.get(0).getItemText();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tmpValue != null) {
|
||||||
|
if (!"".contentEquals(textValue)) {
|
||||||
|
textValue.append(",");
|
||||||
|
}
|
||||||
|
textValue.append(tmpValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return textValue.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
-2
@@ -125,8 +125,8 @@ public class SarFileCompareInfoController extends JeroController<SarFileCompareI
|
|||||||
|
|
||||||
for (SarFileCompareInfo info : pageList.getRecords()) {
|
for (SarFileCompareInfo info : pageList.getRecords()) {
|
||||||
info.setReleaseStateTitle(ReleaseConditionEnum.getTextByValue(info.getReleaseState(), cut));
|
info.setReleaseStateTitle(ReleaseConditionEnum.getTextByValue(info.getReleaseState(), cut));
|
||||||
info.setFileTypeLeft(getFileTypeText(info.getFileTypeLeft(), cut));
|
// info.setFileTypeLeft(getFileTypeText(info.getFileTypeLeft(), cut));
|
||||||
info.setFileTypeRight(getFileTypeText(info.getFileTypeRight(), cut));
|
// info.setFileTypeRight(getFileTypeText(info.getFileTypeRight(), cut));
|
||||||
// 根据编号赋值标准ID、标准来源、补充创建人
|
// 根据编号赋值标准ID、标准来源、补充创建人
|
||||||
setProperty(info, lawsDomesticStandards, lawsOverseasStandards, lawsEnterpriseStandards);
|
setProperty(info, lawsDomesticStandards, lawsOverseasStandards, lawsEnterpriseStandards);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ public class SarFileCompareInfo implements Serializable {
|
|||||||
/**文本状态1*/
|
/**文本状态1*/
|
||||||
@Excel(name = "文本状态1", width = 15)
|
@Excel(name = "文本状态1", width = 15)
|
||||||
@ApiModelProperty(value = "文本状态1")
|
@ApiModelProperty(value = "文本状态1")
|
||||||
|
@Dict(dicCode = "process_manuscript")
|
||||||
private String fileTypeLeft;
|
private String fileTypeLeft;
|
||||||
|
|
||||||
/**文件名称1*/
|
/**文件名称1*/
|
||||||
@@ -113,6 +114,7 @@ public class SarFileCompareInfo implements Serializable {
|
|||||||
/**文本状态2*/
|
/**文本状态2*/
|
||||||
@Excel(name = "文本状态2", width = 15)
|
@Excel(name = "文本状态2", width = 15)
|
||||||
@ApiModelProperty(value = "文本状态2")
|
@ApiModelProperty(value = "文本状态2")
|
||||||
|
@Dict(dicCode = "process_manuscript")
|
||||||
private String fileTypeRight;
|
private String fileTypeRight;
|
||||||
|
|
||||||
/**文件名称2*/
|
/**文件名称2*/
|
||||||
|
|||||||
+14
-14
@@ -1,15 +1,14 @@
|
|||||||
package com.jero.modules.compare.service.impl;
|
package com.jero.modules.compare.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.modules.compare.entity.*;
|
import com.jero.modules.compare.entity.*;
|
||||||
|
import com.jero.modules.compare.enums.ReleaseConditionEnum;
|
||||||
import com.jero.modules.compare.mapper.SarFileCompareInfoMapper;
|
import com.jero.modules.compare.mapper.SarFileCompareInfoMapper;
|
||||||
import com.jero.modules.compare.service.ISarFileCompareInfoService;
|
import com.jero.modules.compare.service.ISarFileCompareInfoService;
|
||||||
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
||||||
import com.jero.modules.compare.service.ISarFileCompareMenuService;
|
import com.jero.modules.compare.service.ISarFileCompareMenuService;
|
||||||
import com.jero.modules.compare.utils.CompHanLPUtils;
|
import com.jero.modules.compare.utils.CompHanLPUtils;
|
||||||
import com.jero.modules.compare.utils.CompareConst;
|
import com.jero.modules.compare.utils.CompareConst;
|
||||||
import com.jero.modules.compare.enums.ReleaseConditionEnum;
|
|
||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
||||||
@@ -207,10 +206,10 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
|
|||||||
for (SarFileSplitItemsEO itemsEO : list) {
|
for (SarFileSplitItemsEO itemsEO : list) {
|
||||||
SarFileCompareItem item = new SarFileCompareItem();
|
SarFileCompareItem item = new SarFileCompareItem();
|
||||||
item.setInfoId(infoId);
|
item.setInfoId(infoId);
|
||||||
item.setItemsName(itemsEO.getItemsName());
|
item.setItemsName(itemsEO.getItemTitle());
|
||||||
item.setMenuId(itemsEO.getMenuId());
|
item.setMenuId(itemsEO.getMenuId());
|
||||||
item.setItemsNum(itemsEO.getItemsNum());
|
item.setItemsNum(itemsEO.getItemNum());
|
||||||
item.setItemsText(itemsEO.getItermsConditions());
|
item.setItemsText(itemsEO.getItemContent());
|
||||||
SarFileCompareMenu menu = menuMap.get(itemsEO.getMenuId());
|
SarFileCompareMenu menu = menuMap.get(itemsEO.getMenuId());
|
||||||
if (menu != null) {
|
if (menu != null) {
|
||||||
item.setItemsDisplayNum(menu.getDisplaySeq());
|
item.setItemsDisplayNum(menu.getDisplaySeq());
|
||||||
@@ -241,10 +240,11 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
|
|||||||
sarFileCompareInfo.setId(id);
|
sarFileCompareInfo.setId(id);
|
||||||
sarFileCompareInfo.setFileIdLeft(leftInfo.getFileId());
|
sarFileCompareInfo.setFileIdLeft(leftInfo.getFileId());
|
||||||
// 处理文档库id字段 根据编号和标题查询
|
// 处理文档库id字段 根据编号和标题查询
|
||||||
List<Map<String, Object>> bussDocumentLibraryEOList = bussDocumentLibraryEOService.getListBySerialNumber(leftInfo.getSerialNumber());
|
// List<Map<String, Object>> bussDocumentLibraryEOList = bussDocumentLibraryEOService.getListBySerialNumber(leftInfo.getSerialNumber());
|
||||||
if (CollectionUtil.isNotEmpty(bussDocumentLibraryEOList)) {
|
// if (CollectionUtil.isNotEmpty(bussDocumentLibraryEOList)) {
|
||||||
sarFileCompareInfo.setFileKeyLeft(bussDocumentLibraryEOList.get(0).get("id").toString());
|
// sarFileCompareInfo.setFileKeyLeft(bussDocumentLibraryEOList.get(0).get("id").toString());
|
||||||
}
|
// }
|
||||||
|
sarFileCompareInfo.setFileKeyLeft(leftInfo.getStandardId());
|
||||||
sarFileCompareInfo.setFileNameLeft(leftInfo.getFileName());
|
sarFileCompareInfo.setFileNameLeft(leftInfo.getFileName());
|
||||||
sarFileCompareInfo.setTitleLeft(leftInfo.getTitle());
|
sarFileCompareInfo.setTitleLeft(leftInfo.getTitle());
|
||||||
sarFileCompareInfo.setFileTypeLeft(leftInfo.getFileType());
|
sarFileCompareInfo.setFileTypeLeft(leftInfo.getFileType());
|
||||||
@@ -252,11 +252,11 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
|
|||||||
|
|
||||||
sarFileCompareInfo.setFileIdRight(rightInfo.getFileId());
|
sarFileCompareInfo.setFileIdRight(rightInfo.getFileId());
|
||||||
// 处理文档库id字段 根据编号和标题查询
|
// 处理文档库id字段 根据编号和标题查询
|
||||||
List<Map<String, Object>> bussDocumentLibraryEOList1 = bussDocumentLibraryEOService.getListBySerialNumber(rightInfo.getSerialNumber());
|
// List<Map<String, Object>> bussDocumentLibraryEOList1 = bussDocumentLibraryEOService.getListBySerialNumber(rightInfo.getSerialNumber());
|
||||||
if (CollectionUtil.isNotEmpty(bussDocumentLibraryEOList1)) {
|
// if (CollectionUtil.isNotEmpty(bussDocumentLibraryEOList1)) {
|
||||||
sarFileCompareInfo.setFileKeyRight(bussDocumentLibraryEOList1.get(0).get("id").toString());
|
// sarFileCompareInfo.setFileKeyRight(bussDocumentLibraryEOList1.get(0).get("id").toString());
|
||||||
}
|
// }
|
||||||
sarFileCompareInfo.setFileKeyRight(rightInfo.getConnectId());
|
sarFileCompareInfo.setFileKeyRight(rightInfo.getStandardId());
|
||||||
sarFileCompareInfo.setFileNameRight(rightInfo.getFileName());
|
sarFileCompareInfo.setFileNameRight(rightInfo.getFileName());
|
||||||
sarFileCompareInfo.setFileTypeRight(rightInfo.getFileType());
|
sarFileCompareInfo.setFileTypeRight(rightInfo.getFileType());
|
||||||
sarFileCompareInfo.setTitleRight(rightInfo.getTitle());
|
sarFileCompareInfo.setTitleRight(rightInfo.getTitle());
|
||||||
|
|||||||
@@ -115,4 +115,17 @@ public class FieldCommon {
|
|||||||
// 稽查内容
|
// 稽查内容
|
||||||
public static final String CHECK_LIST = "checkList";
|
public static final String CHECK_LIST = "checkList";
|
||||||
|
|
||||||
|
// 发布稿(原文)
|
||||||
|
public static final String FILE_PUBLISH_OF_ORIGINAL = "publish_of_original";
|
||||||
|
// 修改单
|
||||||
|
public static final String FILE_MODIFICATION_LIST = "modification_list";
|
||||||
|
// 报批稿
|
||||||
|
public static final String FILE_DRAFT_FOR_REVIEW = "draft_for_review";
|
||||||
|
// 送审稿
|
||||||
|
public static final String FILE_DRAFT_FOR_APPROVAL = "draft_for_approval";
|
||||||
|
// 征求意见稿
|
||||||
|
public static final String FILE_DRAFT_FOR_COMMENT = "draft_for_comment";
|
||||||
|
// 草案
|
||||||
|
public static final String FILE_DRAFT = "draft";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+41
@@ -34,6 +34,8 @@ import com.jero.modules.personal.entity.LawsBrowsingHistory;
|
|||||||
import com.jero.modules.personal.entity.LawsStandardCollection;
|
import com.jero.modules.personal.entity.LawsStandardCollection;
|
||||||
import com.jero.modules.personal.service.ILawsBrowsingHistoryService;
|
import com.jero.modules.personal.service.ILawsBrowsingHistoryService;
|
||||||
import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
||||||
|
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||||
|
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||||
import com.jero.modules.system.entity.SysDepart;
|
import com.jero.modules.system.entity.SysDepart;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
import com.jero.modules.system.entity.SysUser;
|
import com.jero.modules.system.entity.SysUser;
|
||||||
@@ -123,6 +125,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
private EnterpriseStandardAuthUserService esAuthUserService;
|
private EnterpriseStandardAuthUserService esAuthUserService;
|
||||||
@Resource
|
@Resource
|
||||||
private WaterMarkUtil waterMarkUtil;
|
private WaterMarkUtil waterMarkUtil;
|
||||||
|
@Autowired
|
||||||
|
private ISarFileSplitInfoService sarFileSplitInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
@@ -170,6 +174,41 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
return infoPage;
|
return infoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/10/19 15:36
|
||||||
|
* @Description: 标准拆分标识
|
||||||
|
**/
|
||||||
|
private void splitFlag(Map<String, Object> map) {
|
||||||
|
String id = (String) map.get("id");
|
||||||
|
// 查询标准拆分表
|
||||||
|
LambdaQueryWrapper<SarFileSplitInfoEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
// 标准id
|
||||||
|
queryWrapper.eq(SarFileSplitInfoEO::getStandardId, id);
|
||||||
|
// 拆分表发布标识
|
||||||
|
queryWrapper.isNotNull(SarFileSplitInfoEO::getPublishBeforeId);
|
||||||
|
// 文件字段标识
|
||||||
|
queryWrapper.isNotNull(SarFileSplitInfoEO::getFileType);
|
||||||
|
List<SarFileSplitInfoEO> sarFileSplitInfoEOList = sarFileSplitInfoService.list(queryWrapper);
|
||||||
|
|
||||||
|
Map<String, String> flagMap = new HashMap<>();
|
||||||
|
sarFileSplitInfoEOList.forEach(e -> flagMap.put(e.getFileType(), e.getId() + "," + e.getPublishBeforeId()));
|
||||||
|
|
||||||
|
// 拆分的标识
|
||||||
|
map.put(FieldCommon.FILE_PUBLISH_OF_ORIGINAL + FieldCommon._STANDARD_SPLIT,
|
||||||
|
flagMap.get(FieldCommon.FILE_PUBLISH_OF_ORIGINAL));
|
||||||
|
map.put(FieldCommon.FILE_MODIFICATION_LIST + FieldCommon._STANDARD_SPLIT,
|
||||||
|
flagMap.get(FieldCommon.FILE_MODIFICATION_LIST));
|
||||||
|
map.put(FieldCommon.FILE_DRAFT_FOR_REVIEW + FieldCommon._STANDARD_SPLIT,
|
||||||
|
flagMap.get(FieldCommon.FILE_DRAFT_FOR_REVIEW));
|
||||||
|
map.put(FieldCommon.FILE_DRAFT_FOR_APPROVAL + FieldCommon._STANDARD_SPLIT,
|
||||||
|
flagMap.get(FieldCommon.FILE_DRAFT_FOR_APPROVAL));
|
||||||
|
map.put(FieldCommon.FILE_DRAFT_FOR_COMMENT + FieldCommon._STANDARD_SPLIT,
|
||||||
|
flagMap.get(FieldCommon.FILE_DRAFT_FOR_COMMENT));
|
||||||
|
map.put(FieldCommon.FILE_DRAFT + FieldCommon._STANDARD_SPLIT,
|
||||||
|
flagMap.get(FieldCommon.FILE_DRAFT));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<Map<String, Object>> getExportData(Map<String, Object> parameterMap, List<LawsTag> fieldList) {
|
public IPage<Map<String, Object>> getExportData(Map<String, Object> parameterMap, List<LawsTag> fieldList) {
|
||||||
// 获取操作模块
|
// 获取操作模块
|
||||||
@@ -994,6 +1033,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
stringObjectMap.put("checkList", list);
|
stringObjectMap.put("checkList", list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 标准拆分标识
|
||||||
|
splitFlag(stringObjectMap);
|
||||||
// 对返回的字段做处理
|
// 对返回的字段做处理
|
||||||
return stringObjectMap;
|
return stringObjectMap;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-3
@@ -25,13 +25,21 @@ public class DocumentSplitCommon {
|
|||||||
*/
|
*/
|
||||||
public static final String DATE_FORMAT_END = " , '%Y-%m-%d') ";
|
public static final String DATE_FORMAT_END = " , '%Y-%m-%d') ";
|
||||||
/**
|
/**
|
||||||
* 模糊匹配
|
* between
|
||||||
*/
|
*/
|
||||||
public static final String CONCAT_LIKE_BEGIN = " concat('%', ' ";
|
public static final String BETWEEN = "between ";
|
||||||
/**
|
/**
|
||||||
* 模糊匹配
|
* 模糊匹配
|
||||||
*/
|
*/
|
||||||
public static final String CONCAT_LIKE_END = " ', '%') ";
|
public static final String CONCAT_LIKE_BEGIN = " concat('%', '";
|
||||||
|
/**
|
||||||
|
* 模糊匹配
|
||||||
|
*/
|
||||||
|
public static final String CONCAT_LIKE_END = "', '%') ";
|
||||||
|
/**
|
||||||
|
* 包含
|
||||||
|
*/
|
||||||
|
public static final String INSTR_BEGIN = " instr(";
|
||||||
/**
|
/**
|
||||||
* and
|
* and
|
||||||
*/
|
*/
|
||||||
|
|||||||
+13
-1
@@ -224,7 +224,7 @@ public class DocumentSplitController {
|
|||||||
@PostMapping("/editBatchDocumentSplitDetail")
|
@PostMapping("/editBatchDocumentSplitDetail")
|
||||||
public Result<T> editBatchDocumentSplitDetail(@RequestBody Map<String, Object> parameter) {
|
public Result<T> editBatchDocumentSplitDetail(@RequestBody Map<String, Object> parameter) {
|
||||||
documentSplitService.editBatchDocumentSplitDetail(parameter);
|
documentSplitService.editBatchDocumentSplitDetail(parameter);
|
||||||
return Result.OK(DocumentSplitCommon.MEG_DEL_BATCH);
|
return Result.OK("批量编辑成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -303,4 +303,16 @@ public class DocumentSplitController {
|
|||||||
public void downloadImportTemplate(HttpServletRequest request, HttpServletResponse response) {
|
public void downloadImportTemplate(HttpServletRequest request, HttpServletResponse response) {
|
||||||
documentSplitService.downloadImportTemplate(request, response);
|
documentSplitService.downloadImportTemplate(request, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文档拆分详情-导出
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档拆分详情-导出")
|
||||||
|
@ApiOperation(value = "文档拆分详情-导出")
|
||||||
|
@GetMapping("/exportDocumentSplitDetail")
|
||||||
|
public void exportDocumentSplitDetail(@RequestBody Map<String, Object> parameter, HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
documentSplitService.exportDocumentSplitDetail(parameter, request, response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+35
-15
@@ -17,31 +17,51 @@ import javax.annotation.PostConstruct;
|
|||||||
@Component
|
@Component
|
||||||
public class DateManyConditionImpl extends AbstractConditionBase {
|
public class DateManyConditionImpl extends AbstractConditionBase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实现逻辑,多日期字符串字段(存储时前端从小到大排好序(必须))
|
||||||
|
* 逗号拆分获取首位和末尾日期,来分别匹配是否符合查询参数的两个日期区间
|
||||||
|
* 实现sql参考:(代码拼接中加入了date_format来格式化日期)
|
||||||
|
* select
|
||||||
|
* epr.*
|
||||||
|
* from
|
||||||
|
* event_plan_record epr
|
||||||
|
* where
|
||||||
|
* substring_index('epr.realStartTime', ',', 1) BETWEEN #{startDate} AND #{endDate}
|
||||||
|
* or substring_index('epr.realStartTime', ',', -1) BETWEEN #{startDate} AND #{endDate}
|
||||||
|
* or #{startDate} BETWEEN substring_index('epr.realStartTime', ',', 1) AND substring_index('epr.realStartTime', ',', -1)
|
||||||
|
* or #{endDate} BETWEEN substring_index('epr.realStartTime', ',', 1) AND substring_index('epr.realStartTime', ',', -1)
|
||||||
|
* @param fieldName
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String buildCondition(String fieldName, String value){
|
public String buildCondition(String fieldName, String value){
|
||||||
// 多日期查询
|
// 多日期查询
|
||||||
String substringBegin = "SUBSTRING_INDEX(";
|
String substringBegin = "SUBSTRING_INDEX(";
|
||||||
String substringEnd = ", ',', 1)";
|
String substringEndFirst = ", ',', 1)";
|
||||||
|
String substringEndLast = ", ',', -1)";
|
||||||
String dateMany = DocumentSplitCommon.AND;
|
String dateMany = DocumentSplitCommon.AND;
|
||||||
if (value.contains(",")) {
|
if (value.contains(",")) {
|
||||||
// 范围查询
|
// 范围查询
|
||||||
String[] split = value.split(",");
|
String[] split = value.split(",");
|
||||||
dateMany += "((";
|
dateMany += "(";
|
||||||
String startDate = DocumentSplitCommon.DATE_FORMAT_BEGIN + "'" + split[0] + "'" + DocumentSplitCommon.DATE_FORMAT_END;
|
String startDate = DocumentSplitCommon.DATE_FORMAT_BEGIN + "'" + split[0] + "'" + DocumentSplitCommon.DATE_FORMAT_END;
|
||||||
String endDate = DocumentSplitCommon.DATE_FORMAT_BEGIN + "'" + split[1] + "'" + DocumentSplitCommon.DATE_FORMAT_END;
|
String endDate = DocumentSplitCommon.DATE_FORMAT_BEGIN + "'" + split[1] + "'" + DocumentSplitCommon.DATE_FORMAT_END;
|
||||||
dateMany +=
|
dateMany += "(" +
|
||||||
DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEnd + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.GT + startDate +
|
DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEndFirst + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.BETWEEN + startDate + DocumentSplitCommon.AND + endDate +
|
||||||
DocumentSplitCommon.AND +
|
")" +
|
||||||
DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEnd + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.LT + endDate + ")" +
|
DocumentSplitCommon.OR +
|
||||||
DocumentSplitCommon.OR + "(" +
|
"(" +
|
||||||
DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEnd + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.GT + startDate +
|
DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEndLast + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.BETWEEN + startDate + DocumentSplitCommon.AND + endDate +
|
||||||
DocumentSplitCommon.AND +
|
")" +
|
||||||
DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEnd + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.LT + endDate + ")" +
|
DocumentSplitCommon.OR +
|
||||||
DocumentSplitCommon.OR + "(" +
|
"(" +
|
||||||
DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + ", ',', -1)" + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.GT + startDate +
|
startDate + DocumentSplitCommon.BETWEEN + DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEndFirst + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.AND + DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEndLast + DocumentSplitCommon.DATE_FORMAT_END +
|
||||||
DocumentSplitCommon.AND +
|
")" +
|
||||||
DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + ", ',', -1)" + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.LT + endDate + "))";
|
DocumentSplitCommon.OR +
|
||||||
|
"(" +
|
||||||
|
endDate + DocumentSplitCommon.BETWEEN + DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEndFirst + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.AND + DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEndLast + DocumentSplitCommon.DATE_FORMAT_END +
|
||||||
|
")" + ")";
|
||||||
} else {
|
} else {
|
||||||
dateMany += fieldName + DocumentSplitCommon.LIKE + DocumentSplitCommon.CONCAT_LIKE_BEGIN + value + DocumentSplitCommon.CONCAT_LIKE_END;
|
dateMany += fieldName + DocumentSplitCommon.LIKE + DocumentSplitCommon.CONCAT_LIKE_BEGIN + value + DocumentSplitCommon.CONCAT_LIKE_END;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-8
@@ -7,11 +7,13 @@ import com.jero.modules.laws.documenttool.handler.AbstractConditionBase;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: yjz
|
* @Author: yjz
|
||||||
* @Date: 2023/10/13/17:05
|
* @Date: 2023/10/13/17:05
|
||||||
* @Description: in查询
|
* @Description: 下拉框查询
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@@ -19,16 +21,17 @@ public class InConditionImpl extends AbstractConditionBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String buildCondition(String fieldName, String value){
|
public String buildCondition(String fieldName, String value){
|
||||||
// in查询
|
// 下拉框查询
|
||||||
StringBuilder in = new StringBuilder();
|
StringBuilder in = new StringBuilder();
|
||||||
in.append(DocumentSplitCommon.AND).append(fieldName).append(DocumentSplitCommon.IN).append("(");
|
in.append(DocumentSplitCommon.AND).append("((");
|
||||||
for (String s : value.split(",")) {
|
List<String> list = Arrays.asList(value.split(","));
|
||||||
in.append("'").append(s).append("'");
|
for (String s : list) {
|
||||||
if (value.indexOf(s) != value.length() -1){
|
in.append(DocumentSplitCommon.INSTR_BEGIN).append(fieldName).append(",").append("'").append(s).append("'").append(")");
|
||||||
in.append(",");
|
if (list.indexOf(s) != list.size() -1){
|
||||||
|
in.append(DocumentSplitCommon.OR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
in.append(")");
|
in.append("))");
|
||||||
return in.toString();
|
return in.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
@@ -112,6 +112,12 @@ public interface DocumentSplitMapper {
|
|||||||
*/
|
*/
|
||||||
Map<String, Object> queryLawsDocumentSplitById(@Param("id") String id);
|
Map<String, Object> queryLawsDocumentSplitById(@Param("id") String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文档拆分详情通过id范围查询
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
Map<String, Object> queryLawsDocumentSplitInId(@Param("idList") String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文档拆分详情-新增
|
* 文档拆分详情-新增
|
||||||
* @param insertField
|
* @param insertField
|
||||||
|
|||||||
+12
-3
@@ -24,8 +24,8 @@
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertDocumentSplitInfo">
|
<insert id="insertDocumentSplitInfo">
|
||||||
insert into sar_file_split_info(id, create_by, create_time, update_by, update_time, sys_org_code, serial_number, title, file_type, file_name, split_result, file_id, connect_id, title_en, author, split_status, standard_id, del_flag)
|
insert into sar_file_split_info(id, create_by, create_time, update_by, update_time, sys_org_code, serial_number, title, file_type, file_name, split_result, file_id, connect_id, title_en, author, split_status, standard_id, del_flag, publish_before_id)
|
||||||
values (#{id}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{sysOrgCode}, #{serialNumber}, #{title}, #{fileType}, #{fileName}, #{splitResult}, #{fileId}, #{connectId}, #{titleEn}, #{author}, #{splitStatus}, #{standardId}, #{delFlag})
|
values (#{id}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{sysOrgCode}, #{serialNumber}, #{title}, #{fileType}, #{fileName}, #{splitResult}, #{fileId}, #{connectId}, #{titleEn}, #{author}, #{splitStatus}, #{standardId}, #{delFlag}, #{publishBeforeId})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertBatchSarFileSplitMenuByInfoId">
|
<insert id="insertBatchSarFileSplitMenuByInfoId">
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
<delete id="deleteItemsValByItemIds">
|
<delete id="deleteItemsValByItemIds">
|
||||||
delete from sar_file_split_items_val
|
delete from sar_file_split_items_val
|
||||||
where item_id in
|
where item_id in
|
||||||
<foreach collection="itemIds.split(',')" item="item" separator="or" open="(" close=")">
|
<foreach collection="itemIds.split(',')" item="item" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
||||||
@@ -189,6 +189,15 @@
|
|||||||
where valid_flag = 0 and item_id = #{itemId}
|
where valid_flag = 0 and item_id = #{itemId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryLawsDocumentSplitInId" resultType="java.util.Map">
|
||||||
|
select *
|
||||||
|
from laws_document_split
|
||||||
|
where id in
|
||||||
|
<foreach collection="idList.split(',')" item="item" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="editDocumentSplitDetail">
|
<update id="editDocumentSplitDetail">
|
||||||
UPDATE laws_document_split
|
UPDATE laws_document_split
|
||||||
SET ${updateSet}
|
SET ${updateSet}
|
||||||
|
|||||||
+7
@@ -149,4 +149,11 @@ public interface IDocumentSplitService {
|
|||||||
* @param parameter
|
* @param parameter
|
||||||
*/
|
*/
|
||||||
void revocation(Map<String, Object> parameter);
|
void revocation(Map<String, Object> parameter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文档拆分详情-导出
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
void exportDocumentSplitDetail(Map<String, Object> parameter, HttpServletRequest request, HttpServletResponse response);
|
||||||
}
|
}
|
||||||
|
|||||||
+137
-20
@@ -10,8 +10,10 @@ import com.jero.common.constant.enums.LanguageEnum;
|
|||||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.common.util.FileUtils;
|
||||||
import com.jero.common.util.MessageUtils;
|
import com.jero.common.util.MessageUtils;
|
||||||
import com.jero.common.util.UUIDUtils;
|
import com.jero.common.util.UUIDUtils;
|
||||||
|
import com.jero.common.util.ZipUtil;
|
||||||
import com.jero.modules.laws.common.constant.FieldCommon;
|
import com.jero.modules.laws.common.constant.FieldCommon;
|
||||||
import com.jero.modules.laws.common.mapper.LawsCommonMapper;
|
import com.jero.modules.laws.common.mapper.LawsCommonMapper;
|
||||||
import com.jero.modules.laws.documenttool.common.DocumentSplitCommon;
|
import com.jero.modules.laws.documenttool.common.DocumentSplitCommon;
|
||||||
@@ -53,19 +55,20 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.OutputStream;
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static java.net.URLEncoder.encode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: yjz
|
* @Author: yjz
|
||||||
* @Date: 2023/10/12/23:03
|
* @Date: 2023/10/12/23:03
|
||||||
@@ -113,6 +116,9 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
this.sysDictItemService = sysDictItemService;
|
this.sysDictItemService = sysDictItemService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Value("${jero.path.exportExcelTempPath}")
|
||||||
|
private String exportExcelTempPath;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<DocumentSplitInfo> queryByPage(DocumentSplitInfo documentSplitInfo, Integer pageNo, Integer pageSize) {
|
public IPage<DocumentSplitInfo> queryByPage(DocumentSplitInfo documentSplitInfo, Integer pageNo, Integer pageSize) {
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
@@ -410,7 +416,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
|
|
||||||
// 条文解读更新
|
// 条文解读更新
|
||||||
// 删除旧数据
|
// 删除旧数据
|
||||||
documentSplitMapper.deleteItemsValByItemIds((String) parameter.get(ID), DocumentSplitCommon.INTERPRETATION);
|
documentSplitMapper.deleteItemsValByItemIds((String) parameter.get("ids"), DocumentSplitCommon.INTERPRETATION);
|
||||||
if (!Objects.isNull(articlesList) && !articlesList.isEmpty()){
|
if (!Objects.isNull(articlesList) && !articlesList.isEmpty()){
|
||||||
// 添加新数据
|
// 添加新数据
|
||||||
documentSplitMapper.addBatchItemsVal(articlesList);
|
documentSplitMapper.addBatchItemsVal(articlesList);
|
||||||
@@ -560,6 +566,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
@Override
|
@Override
|
||||||
public void downloadImportTemplate(HttpServletRequest request, HttpServletResponse response) {
|
public void downloadImportTemplate(HttpServletRequest request, HttpServletResponse response) {
|
||||||
try (Workbook workbook = new XSSFWorkbook()){
|
try (Workbook workbook = new XSSFWorkbook()){
|
||||||
|
String fileName = "拆分导入模版下载.xlsx";
|
||||||
// sheet页
|
// sheet页
|
||||||
XSSFSheet sheet = (XSSFSheet) workbook.createSheet("拆分导入模版");
|
XSSFSheet sheet = (XSSFSheet) workbook.createSheet("拆分导入模版");
|
||||||
// 列宽
|
// 列宽
|
||||||
@@ -574,7 +581,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
// 水平、垂直居中
|
// 水平、垂直居中
|
||||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||||
// 问本格式
|
// 文本格式
|
||||||
cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("@"));
|
cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("@"));
|
||||||
|
|
||||||
for (int i = 0; i < titleArr.length; i++) {
|
for (int i = 0; i < titleArr.length; i++) {
|
||||||
@@ -602,20 +609,69 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
CellRangeAddress region = new CellRangeAddress(1, 1, 0, 2);
|
CellRangeAddress region = new CellRangeAddress(1, 1, 0, 2);
|
||||||
sheet.addMergedRegion(region);
|
sheet.addMergedRegion(region);
|
||||||
|
|
||||||
// 返回流
|
// excel临时保存到本地并在同级创建文件夹
|
||||||
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
generateExcel(workbook, fileName);
|
||||||
response.setCharacterEncoding("UTF-8");
|
|
||||||
response.setHeader("Content-Disposition", "attachment;fileName=" +
|
// 生成zip文件返回文件流
|
||||||
encode("拆分导入模版下载.xlsx", "UTF-8"));
|
ZipUtil.toZip(exportExcelTempPath, response.getOutputStream(), response, true);
|
||||||
OutputStream outputStream = response.getOutputStream();
|
|
||||||
workbook.write(outputStream);
|
//删除指定文件夹
|
||||||
outputStream.flush();
|
FileUtils.deleteFolders(exportExcelTempPath);
|
||||||
outputStream.close();
|
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
throw new JeroBootException("下载文件失败!");
|
throw new JeroBootException("下载文件失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* private static void returnOutPutStream(HttpServletResponse response, String fileName, String zipPath) throws IOException {
|
||||||
|
* ServletOutputStream outputStream = null;
|
||||||
|
* try (InputStream in = Files.newInputStream(Paths.get(zipPath));){
|
||||||
|
* response.reset();
|
||||||
|
* response.setContentType("application/ostet-stream");
|
||||||
|
* response.setHeader("content-type", "application/octet-stream");
|
||||||
|
* response.setContentType("application/octet-stream");
|
||||||
|
* response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + new String((fileName + ".zip").getBytes("GB2312"), StandardCharsets.ISO_8859_1));
|
||||||
|
* response.setCharacterEncoding("UTF-8");
|
||||||
|
* outputStream = response.getOutputStream();
|
||||||
|
* //创建存放文件内容的数组
|
||||||
|
* byte[] buff = new byte[1024];
|
||||||
|
* //所读取的内容使用n来接收
|
||||||
|
* int n;
|
||||||
|
* //当没有读取完时,继续读取,循环
|
||||||
|
* while ((n = in.read(buff)) != -1) {
|
||||||
|
* //将字节数组的数据全部写入到输出流中
|
||||||
|
* outputStream.write(buff, 0, n);
|
||||||
|
* }
|
||||||
|
* //强制将缓存区的数据进行输出
|
||||||
|
* outputStream.println();
|
||||||
|
* }
|
||||||
|
* outputStream.close();
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
private void generateExcel(Workbook workbook, String fileName) throws IOException {
|
||||||
|
File saveFile = new File(exportExcelTempPath);
|
||||||
|
// 导出路径 没有则创建
|
||||||
|
if (!saveFile.exists()) {
|
||||||
|
saveFile.mkdirs();
|
||||||
|
}
|
||||||
|
// 生成excel文件路径
|
||||||
|
String excelPath = exportExcelTempPath + File.separator + fileName;
|
||||||
|
// 写出excel文件
|
||||||
|
try (FileOutputStream fos = new FileOutputStream(excelPath)){
|
||||||
|
workbook.write(fos);
|
||||||
|
|
||||||
|
// 同级创建文件夹
|
||||||
|
File savePaperFile = new File(exportExcelTempPath+ File.separator + "外部资源");
|
||||||
|
if (!savePaperFile.exists()) {
|
||||||
|
savePaperFile.mkdirs();
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
throw new JeroBootException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SarFileSplitItemsValEO> queryInterpretationArticlesList(String itemId) {
|
public List<SarFileSplitItemsValEO> queryInterpretationArticlesList(String itemId) {
|
||||||
return documentSplitMapper.queryItemsValByItemId(itemId, DocumentSplitCommon.INTERPRETATION);
|
return documentSplitMapper.queryItemsValByItemId(itemId, DocumentSplitCommon.INTERPRETATION);
|
||||||
@@ -640,7 +696,8 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
splitMenuEOPage.setOrderBy("display_seq");
|
splitMenuEOPage.setOrderBy("display_seq");
|
||||||
splitMenuEOPage.setInfoId(id);
|
splitMenuEOPage.setInfoId(id);
|
||||||
List<SarFileSplitMenuEO> sarFileSplitMenuEOS = sarFileSplitMenuEOService.queryByList(splitMenuEOPage);
|
List<SarFileSplitMenuEO> sarFileSplitMenuEOS = sarFileSplitMenuEOService.queryByList(splitMenuEOPage);
|
||||||
lawsDocumentSplitView.setSarFileSplitMenuEO(sarFileSplitMenuEOS);
|
// 不需要总目录层级
|
||||||
|
lawsDocumentSplitView.setSarFileSplitMenuEO(sarFileSplitMenuEOS.get(0).getChildren());
|
||||||
|
|
||||||
// 文档拆分详情
|
// 文档拆分详情
|
||||||
parameter.remove(ID);
|
parameter.remove(ID);
|
||||||
@@ -655,6 +712,15 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
String id = (String) parameter.get(ID);
|
String id = (String) parameter.get(ID);
|
||||||
// 文档拆分信息(旧)
|
// 文档拆分信息(旧)
|
||||||
DocumentSplitInfo oldInfo = documentSplitMapper.queryDocumentSplitInfoById(id);
|
DocumentSplitInfo oldInfo = documentSplitMapper.queryDocumentSplitInfoById(id);
|
||||||
|
// 判断是否发布过
|
||||||
|
SarFileSplitInfoEO sarFileSplitInfoEO = sarFileSplitInfoService.getOne(
|
||||||
|
new QueryWrapper<SarFileSplitInfoEO>().lambda()
|
||||||
|
.eq(SarFileSplitInfoEO::getPublishBeforeId, id));
|
||||||
|
if (!Objects.isNull(sarFileSplitInfoEO)){
|
||||||
|
// 删除旧发布数据
|
||||||
|
sarFileSplitInfoService.deleteById(sarFileSplitInfoEO.getId());
|
||||||
|
}
|
||||||
|
|
||||||
// 修改发布状态
|
// 修改发布状态
|
||||||
LambdaUpdateWrapper<SarFileSplitInfoEO> updateWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<SarFileSplitInfoEO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
updateWrapper.eq(SarFileSplitInfoEO::getId, oldInfo.getId());
|
updateWrapper.eq(SarFileSplitInfoEO::getId, oldInfo.getId());
|
||||||
@@ -678,8 +744,6 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
oldMenuIdList.add(sarFileSplitMenu.getId());
|
oldMenuIdList.add(sarFileSplitMenu.getId());
|
||||||
String newId = UUID.randomUUID().toString().replace("-", "");
|
String newId = UUID.randomUUID().toString().replace("-", "");
|
||||||
newMenuIdList.add(newId);
|
newMenuIdList.add(newId);
|
||||||
sarFileSplitMenu.setId(newId);
|
|
||||||
sarFileSplitMenu.setInfoId(newInfo.getId());
|
|
||||||
|
|
||||||
// 父子级关系处理
|
// 父子级关系处理
|
||||||
oldMenuList.stream()
|
oldMenuList.stream()
|
||||||
@@ -689,6 +753,9 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
return v;
|
return v;
|
||||||
})
|
})
|
||||||
.forEach(v -> log.info(v.getParentId()));
|
.forEach(v -> log.info(v.getParentId()));
|
||||||
|
|
||||||
|
sarFileSplitMenu.setId(newId);
|
||||||
|
sarFileSplitMenu.setInfoId(newInfo.getId());
|
||||||
}
|
}
|
||||||
// 新增数据
|
// 新增数据
|
||||||
documentSplitMapper.insertBatchSarFileSplitMenuByInfoId(oldMenuList);
|
documentSplitMapper.insertBatchSarFileSplitMenuByInfoId(oldMenuList);
|
||||||
@@ -741,7 +808,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
@Override
|
@Override
|
||||||
public void revocation(Map<String, Object> parameter) {
|
public void revocation(Map<String, Object> parameter) {
|
||||||
String id = (String) parameter.get(ID);
|
String id = (String) parameter.get(ID);
|
||||||
// 文档拆分信息(旧)
|
// 文档拆分信息
|
||||||
DocumentSplitInfo oldInfo = documentSplitMapper.queryDocumentSplitInfoById(id);
|
DocumentSplitInfo oldInfo = documentSplitMapper.queryDocumentSplitInfoById(id);
|
||||||
// 修改发布状态
|
// 修改发布状态
|
||||||
LambdaUpdateWrapper<SarFileSplitInfoEO> updateWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<SarFileSplitInfoEO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
@@ -750,6 +817,56 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
sarFileSplitInfoService.update(updateWrapper);
|
sarFileSplitInfoService.update(updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportDocumentSplitDetail(Map<String, Object> parameter, HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
try (Workbook workbook = new XSSFWorkbook()){
|
||||||
|
// 文档拆分详情数据
|
||||||
|
List<Map<String, Object>> mapList = queryDocumentSplitDetailByList(parameter);
|
||||||
|
// 创建工作簿
|
||||||
|
|
||||||
|
// 创建sheet页
|
||||||
|
Sheet sheet = workbook.createSheet("条款内容");
|
||||||
|
// 字段名
|
||||||
|
List<String> keyList = new ArrayList<>();
|
||||||
|
if(!Objects.isNull(mapList) && !mapList.isEmpty()){
|
||||||
|
Map<String, Object> map = mapList.get(0);
|
||||||
|
keyList = map.entrySet().stream().map(Map.Entry::getKey).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 样式1
|
||||||
|
CellStyle cellStyleOne = workbook.createCellStyle();
|
||||||
|
cellStyleOne.setWrapText(true);
|
||||||
|
cellStyleOne.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||||
|
// 样式2
|
||||||
|
CellStyle cellStyleTwo = workbook.createCellStyle();
|
||||||
|
cellStyleTwo.setWrapText(true);
|
||||||
|
cellStyleTwo.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
// 样式3
|
||||||
|
CellStyle cellStyleThree = workbook.createCellStyle();
|
||||||
|
Font font = workbook.createFont();
|
||||||
|
font.setColor(IndexedColors.LIGHT_BLUE.getIndex());
|
||||||
|
cellStyleThree.setWrapText(true);
|
||||||
|
cellStyleThree.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||||
|
|
||||||
|
// 设置表头
|
||||||
|
Row row = sheet.createRow(0);
|
||||||
|
for (int i = 0; i < keyList.size(); i++) {
|
||||||
|
// 创建列,应用样式
|
||||||
|
Cell cell = row.createCell(i);
|
||||||
|
cell.setCellValue(new XSSFRichTextString(keyList.get(i)));
|
||||||
|
cell.setCellStyle(cellStyleOne);
|
||||||
|
|
||||||
|
if("条文内容".equals(keyList.get(i))) {
|
||||||
|
sheet.setColumnWidth(i, 80 * 256);
|
||||||
|
} else {
|
||||||
|
sheet.setColumnWidth(i, 20 * 256);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
throw new JeroBootException("导出失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void manageData(Map<String, Object> resultMap, StringBuilder fieldsBuilder, StringBuilder valuesBuilder) {
|
private void manageData(Map<String, Object> resultMap, StringBuilder fieldsBuilder, StringBuilder valuesBuilder) {
|
||||||
// 所有key(字段名)
|
// 所有key(字段名)
|
||||||
resultMap.forEach((k, v) -> {
|
resultMap.forEach((k, v) -> {
|
||||||
@@ -843,7 +960,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
Optional<LawsTag> lawsTag = fieldListCondition.stream().filter(o -> k.equals(o.getDbFieldName())).findFirst();
|
Optional<LawsTag> lawsTag = fieldListCondition.stream().filter(o -> k.equals(o.getDbFieldName())).findFirst();
|
||||||
lawsTag.ifPresent(l -> {
|
lawsTag.ifPresent(l -> {
|
||||||
// 构建查询条件 (工厂 + 策略 设计模式)
|
// 构建查询条件 (工厂 + 策略 设计模式)
|
||||||
String sqlCondition = ConditionMapFactory.getInvokeStrategy(l.getDbFieldName()).buildCondition(l.getDbFieldName(), (String) v);
|
String sqlCondition = ConditionMapFactory.getInvokeStrategy(l.getFieldShowType()).buildCondition(l.getDbFieldName(), (String) v);
|
||||||
selectCondition.append(sqlCondition);
|
selectCondition.append(sqlCondition);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -918,7 +1035,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
// 拆分状态
|
// 拆分状态
|
||||||
queryWrapper.eq(StringUtils.isNotBlank(documentSplitInfo.getSplitStatus()), "split_status", documentSplitInfo.getSplitStatus());
|
queryWrapper.eq(StringUtils.isNotBlank(documentSplitInfo.getSplitStatus()), "split_status", documentSplitInfo.getSplitStatus());
|
||||||
// 编辑人
|
// 编辑人
|
||||||
queryWrapper.eq(StringUtils.isNotBlank(documentSplitInfo.getAuthor()), "username", documentSplitInfo.getAuthor());
|
queryWrapper.like(StringUtils.isNotBlank(documentSplitInfo.getAuthor()), "username", documentSplitInfo.getAuthor());
|
||||||
// 发布前id
|
// 发布前id
|
||||||
if (StringUtils.isNotBlank(documentSplitInfo.getPublishBeforeId())){
|
if (StringUtils.isNotBlank(documentSplitInfo.getPublishBeforeId())){
|
||||||
queryWrapper.eq("publish_before_id", documentSplitInfo.getPublishBeforeId());
|
queryWrapper.eq("publish_before_id", documentSplitInfo.getPublishBeforeId());
|
||||||
|
|||||||
+11
-29
@@ -1,12 +1,9 @@
|
|||||||
package com.jero.modules.laws.enterprise.entity;
|
package com.jero.modules.laws.enterprise.entity;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -93,6 +90,7 @@ public class EnterpriseStandardPlan implements Serializable {
|
|||||||
@ApiModelProperty(value = "企标英文名称")
|
@ApiModelProperty(value = "企标英文名称")
|
||||||
private String enStandardEnglishName;
|
private String enStandardEnglishName;
|
||||||
|
|
||||||
|
@Dict(dictTable = "laws_tree_node", dicCode = "id", dicText = "node_name")
|
||||||
@ApiModelProperty(value = "企标体系")
|
@ApiModelProperty(value = "企标体系")
|
||||||
private String enStandardSystem;
|
private String enStandardSystem;
|
||||||
|
|
||||||
@@ -134,46 +132,32 @@ public class EnterpriseStandardPlan implements Serializable {
|
|||||||
@ApiModelProperty(value = "项目状态")
|
@ApiModelProperty(value = "项目状态")
|
||||||
private String projectStatus;
|
private String projectStatus;
|
||||||
|
|
||||||
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
@ApiModelProperty(value = "编制说明")
|
@ApiModelProperty(value = "编制说明")
|
||||||
private String compilationDescription;
|
private String compilationDescription;
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@ApiModelProperty(value = "附件文件名")
|
|
||||||
private String compilationFileName;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "零部件名称")
|
@ApiModelProperty(value = "零部件名称")
|
||||||
private String componentName;
|
private String componentName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "授权部门")
|
@ApiModelProperty(value = "授权部门")
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
private String authDept;
|
private String authDept;
|
||||||
|
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
@ApiModelProperty(value = "主起草人")
|
@ApiModelProperty(value = "主起草人")
|
||||||
private String mainDraftingUser;
|
private String mainDraftingUser;
|
||||||
@TableField(exist = false)
|
|
||||||
@ApiModelProperty(value = "主起草人用户名")
|
|
||||||
@JsonProperty("mainDraftingUser_dictText")
|
|
||||||
private String mainDraftingUserDictText;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "主起草单位Id")
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
private String mainDraftingUnit;
|
|
||||||
@ApiModelProperty(value = "主起草单位")
|
@ApiModelProperty(value = "主起草单位")
|
||||||
@TableField(exist = false)
|
private String mainDraftingUnit;
|
||||||
@JsonProperty("mainDraftingUnit_dictText")
|
|
||||||
private String mainDraftingUnitDictText;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "主起草单位责任人Id")
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
|
@ApiModelProperty(value = "主起草单位责任人")
|
||||||
private String mainDraftingUnitResponsiblePerson;
|
private String mainDraftingUnitResponsiblePerson;
|
||||||
@TableField(exist = false)
|
|
||||||
@ApiModelProperty(value = "主起草单位责任人用户名")
|
|
||||||
@JsonProperty("mainDraftingUnitResponsiblePerson_dictText")
|
|
||||||
private String mainDraftingUnitResponsiblePersonDictText;
|
|
||||||
|
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
@ApiModelProperty(value = "标准推进人")
|
@ApiModelProperty(value = "标准推进人")
|
||||||
private String standardPromoter;
|
private String standardPromoter;
|
||||||
@TableField(exist = false)
|
|
||||||
@ApiModelProperty(value = "标准推进人")
|
|
||||||
@JsonProperty("standardPromoter_dictText")
|
|
||||||
private String standardPromoterDictText;
|
|
||||||
|
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@@ -231,17 +215,15 @@ public class EnterpriseStandardPlan implements Serializable {
|
|||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
@ApiModelProperty(value = "上传附件")
|
@ApiModelProperty(value = "上传附件")
|
||||||
private String uploadAttachment;
|
private String uploadAttachment;
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@ApiModelProperty(value = "附件文件名")
|
|
||||||
private String attachmentFileName;
|
|
||||||
|
|
||||||
@Dict(dicCode = "yn")
|
@Dict(dicCode = "yn")
|
||||||
@ApiModelProperty(value = "是否为优质标准")
|
@ApiModelProperty(value = "是否为优质标准")
|
||||||
private String qualityFlag;
|
private String qualityFlag;
|
||||||
|
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
@ApiModelProperty(value = "配合单位")
|
@ApiModelProperty(value = "配合单位")
|
||||||
private String cooperationUnit;
|
private String cooperationUnit;
|
||||||
|
|
||||||
|
|||||||
+18
-5
@@ -10,6 +10,7 @@ import lombok.NoArgsConstructor;
|
|||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -93,15 +94,27 @@ public class ESPlanQueryDTO {
|
|||||||
@ApiModelProperty(value = "项目状态列表,流程中用")
|
@ApiModelProperty(value = "项目状态列表,流程中用")
|
||||||
private List<String> projectStatusList;
|
private List<String> projectStatusList;
|
||||||
|
|
||||||
public void transIdsToList() {
|
@ApiModelProperty(value = "排除Id列表,流程中用")
|
||||||
if (StrUtil.isBlank(this.selections)) {
|
private String excludeIds;
|
||||||
return;
|
|
||||||
|
@JSONField(serialize = false)
|
||||||
|
@ApiModelProperty(value = "排除Id列表,流程中用")
|
||||||
|
private List<String> excludeIdList;
|
||||||
|
|
||||||
|
public List<String> transIdsToList(String values) {
|
||||||
|
if (StrUtil.isBlank(values)) {
|
||||||
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.idList = StrUtil.split(this.selections, StrUtil.COMMA);
|
return StrUtil.split(values, StrUtil.COMMA);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSelections(String selections) {
|
public void setSelections(String selections) {
|
||||||
this.selections = selections;
|
this.selections = selections;
|
||||||
this.transIdsToList();
|
this.idList = transIdsToList(selections);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExcludeIds(String excludeIds) {
|
||||||
|
this.excludeIds = excludeIds;
|
||||||
|
this.excludeIdList = transIdsToList(excludeIds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+37
-47
@@ -46,77 +46,67 @@ public class EnterpriseStandardPlanVo {
|
|||||||
@ApiModelProperty(value = "新企标名称")
|
@ApiModelProperty(value = "新企标名称")
|
||||||
private String newEnStandardName;
|
private String newEnStandardName;
|
||||||
|
|
||||||
@Excel(name = "授权部门", width = 15, orderNum = "1")
|
@Excel(name = "授权部门", width = 15, orderNum = "1", dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
@ApiModelProperty(value = "授权部门")
|
@ApiModelProperty(value = "授权部门")
|
||||||
private String authDeparts;
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
private String authDept;
|
||||||
|
|
||||||
|
@Excel(name = "配合单位", width = 15, orderNum = "1", dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@ApiModelProperty(value = "配合单位")
|
||||||
|
private String cooperationUnit;
|
||||||
|
|
||||||
@Excel(name = "企业标准代号", width = 15, orderNum = "1")
|
@Excel(name = "企业标准代号", width = 15, orderNum = "1")
|
||||||
@ApiModelProperty(value = "企业标准代号")
|
@ApiModelProperty(value = "企业标准代号")
|
||||||
private String enStandardCode;
|
private String enStandardCode;
|
||||||
|
|
||||||
@Excel(name = "配合单位", width = 15, orderNum = "1")
|
@Excel(name = "主起草人", width = 15, orderNum = "1", dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
@ApiModelProperty(value = "配合单位")
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
private String cooperateDeparts;
|
@ApiModelProperty(value = "主起草人")
|
||||||
|
|
||||||
@ApiModelProperty(value = "主起草人Id")
|
|
||||||
private String mainDraftingUser;
|
private String mainDraftingUser;
|
||||||
|
|
||||||
@Excel(name = "主起草人", width = 15, orderNum = "1")
|
@Excel(name = "主起草单位", width = 15, orderNum = "1")
|
||||||
@ApiModelProperty(value = "主起草人用户名")
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
@JsonProperty("mainDraftingUser_dictText")
|
@ApiModelProperty(value = "主起草单位")
|
||||||
private String mainDraftingUserDictText;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "主起草单位Id")
|
|
||||||
private String mainDraftingUnit;
|
private String mainDraftingUnit;
|
||||||
|
|
||||||
@Excel(name = "主起草单位", width = 15, orderNum = "1")
|
@Excel(name = "主起草单位责任人", width = 15, orderNum = "1", dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
@ApiModelProperty(value = "主起草单位名")
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
@JsonProperty("mainDraftingUnit_dictText")
|
|
||||||
private String mainDraftingUnitDictText;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "主起草单位责任人")
|
@ApiModelProperty(value = "主起草单位责任人")
|
||||||
private String mainDraftingUnitResponsiblePerson;
|
private String mainDraftingUnitResponsiblePerson;
|
||||||
|
|
||||||
@Excel(name = "主起草单位责任人", width = 15, orderNum = "1")
|
@Excel(name = "标准推进人", width = 15, orderNum = "1", dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
@ApiModelProperty(value = "主起草单位责任人用户名")
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||||
@JsonProperty("mainDraftingUnitResponsiblePerson_dictText")
|
@ApiModelProperty(value = "标准推进人")
|
||||||
private String mainDraftingUnitResponsiblePersonDictText;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "标准推进人Id")
|
|
||||||
private String standardPromoter;
|
private String standardPromoter;
|
||||||
|
|
||||||
@Excel(name = "标准推进人", width = 15, orderNum = "1")
|
|
||||||
@ApiModelProperty(value = "标准推进人用户名")
|
|
||||||
@JsonProperty("standardPromoter_dictText")
|
|
||||||
private String standardPromoterDictText;
|
|
||||||
|
|
||||||
@Excel(name = "草稿计划完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
@Excel(name = "草稿计划完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "草稿计划完成日期")
|
@ApiModelProperty(value = "草稿计划完成日期")
|
||||||
private Date draftPlannedCompleteDate;
|
private Date draftPlannedCompleteDate;
|
||||||
|
|
||||||
@Excel(name = "征求意见稿计划完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
@Excel(name = "征求意见稿计划完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "征求意见稿计划完成日期")
|
@ApiModelProperty(value = "征求意见稿计划完成日期")
|
||||||
private Date solicitationDraftPlanCompleteDate;
|
private Date solicitationDraftPlanCompleteDate;
|
||||||
|
|
||||||
@Excel(name = "计划报批日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
@Excel(name = "计划报批日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "计划报批日期")
|
@ApiModelProperty(value = "计划报批日期")
|
||||||
private Date planApprovalDate;
|
private Date planApprovalDate;
|
||||||
|
|
||||||
@Excel(name = "草稿完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
@Excel(name = "草稿完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "草稿完成日期")
|
@ApiModelProperty(value = "草稿完成日期")
|
||||||
private Date draftCompletionDate;
|
private Date draftCompletionDate;
|
||||||
|
|
||||||
@Excel(name = "提交草稿日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
@Excel(name = "提交草稿日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "提交草稿日期")
|
@ApiModelProperty(value = "提交草稿日期")
|
||||||
private Date draftSubmissionDate;
|
private Date draftSubmissionDate;
|
||||||
|
|
||||||
@@ -126,26 +116,26 @@ public class EnterpriseStandardPlanVo {
|
|||||||
private String solicitationOpinionEnabled;
|
private String solicitationOpinionEnabled;
|
||||||
|
|
||||||
@Excel(name = "征求意见稿完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
@Excel(name = "征求意见稿完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "征求意见稿完成日期")
|
@ApiModelProperty(value = "征求意见稿完成日期")
|
||||||
private Date solicitationDraftCompletionDate;
|
private Date solicitationDraftCompletionDate;
|
||||||
|
|
||||||
@Excel(name = "评审日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
@Excel(name = "评审日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "评审日期")
|
@ApiModelProperty(value = "评审日期")
|
||||||
private Date reviewDate;
|
private Date reviewDate;
|
||||||
|
|
||||||
@Excel(name = "报批日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
@Excel(name = "报批日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "报批日期")
|
@ApiModelProperty(value = "报批日期")
|
||||||
private Date approvalDate;
|
private Date approvalDate;
|
||||||
|
|
||||||
@Excel(name = "发布日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
@Excel(name = "发布日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "发布日期")
|
@ApiModelProperty(value = "发布日期")
|
||||||
private Date releaseDate;
|
private Date releaseDate;
|
||||||
|
|
||||||
|
|||||||
+16
-54
@@ -87,17 +87,13 @@
|
|||||||
p.origin_en_standard_name,
|
p.origin_en_standard_name,
|
||||||
p.new_en_standard_no,
|
p.new_en_standard_no,
|
||||||
p.new_en_standard_name,
|
p.new_en_standard_name,
|
||||||
ad.authDeparts,
|
p.auth_dept,
|
||||||
p.en_standard_code,
|
p.en_standard_code,
|
||||||
cu.cooperateDeparts,
|
p.cooperation_unit,
|
||||||
u1.id AS mainDraftingUser,
|
p.main_drafting_user,
|
||||||
u1.username AS mainDraftingUserDictText,
|
p.main_drafting_unit,
|
||||||
d.id AS mainDraftingUnit,
|
p.main_drafting_unit_responsible_person,
|
||||||
d.depart_name AS mainDraftingUnitDictText,
|
p.standard_promoter,
|
||||||
u2.id AS mainDraftingUnitResponsiblePerson,
|
|
||||||
u2.username AS mainDraftingUnitResponsiblePersonDictText,
|
|
||||||
u3.id AS standardPromoter,
|
|
||||||
u3.username AS standardPromoterDictText,
|
|
||||||
p.draft_planned_complete_date,
|
p.draft_planned_complete_date,
|
||||||
p.solicitation_draft_plan_complete_date,
|
p.solicitation_draft_plan_complete_date,
|
||||||
p.plan_approval_date,
|
p.plan_approval_date,
|
||||||
@@ -116,20 +112,6 @@
|
|||||||
LEFT JOIN sys_user AS u2 ON u2.id = p.main_drafting_unit_responsible_person
|
LEFT JOIN sys_user AS u2 ON u2.id = p.main_drafting_unit_responsible_person
|
||||||
LEFT JOIN sys_user AS u3 ON u3.id = p.standard_promoter
|
LEFT JOIN sys_user AS u3 ON u3.id = p.standard_promoter
|
||||||
LEFT JOIN sys_depart AS d ON d.id = p.main_drafting_unit
|
LEFT JOIN sys_depart AS d ON d.id = p.main_drafting_unit
|
||||||
LEFT JOIN
|
|
||||||
(SELECT
|
|
||||||
ad.plan_id as id,
|
|
||||||
GROUP_CONCAT((d.depart_name) SEPARATOR ',') AS authDeparts
|
|
||||||
FROM
|
|
||||||
laws_enterprise_standard_plan_auth_dept AS ad
|
|
||||||
LEFT JOIN sys_depart AS d ON d.id = ad.dept_id) AS ad ON ad.id = p.id
|
|
||||||
LEFT JOIN
|
|
||||||
(SELECT
|
|
||||||
cu.plan_id as id,
|
|
||||||
GROUP_CONCAT((d.depart_name) SEPARATOR ',') AS cooperateDeparts
|
|
||||||
FROM
|
|
||||||
laws_enterprise_standard_plan_cooperate_unit AS cu
|
|
||||||
LEFT JOIN sys_depart AS d ON d.id = cu.dept_id) AS cu ON cu.id = p.id
|
|
||||||
WHERE p.del_flag = 0
|
WHERE p.del_flag = 0
|
||||||
<!--原企标编号判断-->
|
<!--原企标编号判断-->
|
||||||
<if test="param.originEnStandardNo != null and param.originEnStandardNo != ''">
|
<if test="param.originEnStandardNo != null and param.originEnStandardNo != ''">
|
||||||
@@ -203,6 +185,12 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.excludeIdList != null and param.excludeIdList.size() > 0">
|
||||||
|
AND p.id NOT IN
|
||||||
|
<foreach item="item" index="index" collection="param.excludeIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDetailById" resultType="com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan">
|
<select id="getDetailById" resultType="com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan">
|
||||||
@@ -230,16 +218,11 @@
|
|||||||
p.plan_approval_date,
|
p.plan_approval_date,
|
||||||
p.project_status,
|
p.project_status,
|
||||||
p.compilation_description,
|
p.compilation_description,
|
||||||
o1.file_name AS compilationFileName,
|
|
||||||
p.component_name,
|
p.component_name,
|
||||||
u1.id as mainDraftingUser,
|
p.main_drafting_user,
|
||||||
u1.username as mainDraftingUserDictText,
|
p.main_drafting_unit,
|
||||||
d.id as mainDraftingUnit,
|
p.main_drafting_unit_responsible_person,
|
||||||
d.depart_name as mainDraftingUnitDictText,
|
p.standard_promoter,
|
||||||
u2.id as mainDraftingUnitResponsiblePerson,
|
|
||||||
u2.username as mainDraftingUnitResponsiblePersonDictText,
|
|
||||||
u3.id as promoter,
|
|
||||||
u3.username as standardPromoterDictText,
|
|
||||||
p.draft_completion_date,
|
p.draft_completion_date,
|
||||||
p.draft_submission_date,
|
p.draft_submission_date,
|
||||||
p.solicitation_opinion_enabled,
|
p.solicitation_opinion_enabled,
|
||||||
@@ -255,30 +238,9 @@
|
|||||||
p.project_expected_effects,
|
p.project_expected_effects,
|
||||||
p.remarks,
|
p.remarks,
|
||||||
p.upload_attachment,
|
p.upload_attachment,
|
||||||
o2.file_name AS attachmentFileName,
|
|
||||||
p.quality_flag
|
p.quality_flag
|
||||||
FROM
|
FROM
|
||||||
`laws_enterprise_standard_plan` AS p
|
`laws_enterprise_standard_plan` AS p
|
||||||
LEFT JOIN sys_user AS u1 ON u1.id = p.main_drafting_user
|
|
||||||
LEFT JOIN sys_user AS u2 ON u2.id = p.main_drafting_unit_responsible_person
|
|
||||||
LEFT JOIN sys_user AS u3 ON u3.id = p.standard_promoter
|
|
||||||
LEFT JOIN sys_depart AS d ON d.id = p.main_drafting_unit
|
|
||||||
LEFt JOIN oss_file AS o1 ON o1.id = p.compilation_description
|
|
||||||
LEFt JOIN oss_file AS o2 ON o2.id = p.upload_attachment
|
|
||||||
LEFT JOIN
|
|
||||||
(SELECT
|
|
||||||
ad.plan_id as id,
|
|
||||||
GROUP_CONCAT((d.depart_name) SEPARATOR ',') AS authDeparts
|
|
||||||
FROM
|
|
||||||
laws_enterprise_standard_plan_auth_dept AS ad
|
|
||||||
LEFT JOIN sys_depart AS d ON d.id = ad.dept_id) AS ad ON ad.id = p.id
|
|
||||||
LEFT JOIN
|
|
||||||
(SELECT
|
|
||||||
cu.plan_id as id,
|
|
||||||
GROUP_CONCAT((d.depart_name) SEPARATOR ',') AS cooperateDeparts
|
|
||||||
FROM
|
|
||||||
laws_enterprise_standard_plan_cooperate_unit AS cu
|
|
||||||
LEFT JOIN sys_depart AS d ON d.id = cu.dept_id) AS cu ON cu.id = p.id
|
|
||||||
WHERE p.id = #{id}
|
WHERE p.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -24,13 +24,13 @@ public class SarFileSplitItemsEO implements Serializable {
|
|||||||
private String infoId;
|
private String infoId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "条款号")
|
@ApiModelProperty(value = "条款号")
|
||||||
private String itemsNum;
|
private String itemNum;
|
||||||
|
|
||||||
@ApiModelProperty(value = "条款名称")
|
@ApiModelProperty(value = "条款名称")
|
||||||
private String itemsName;
|
private String itemTitle;
|
||||||
|
|
||||||
@ApiModelProperty(value = "条款内容")
|
@ApiModelProperty(value = "条款内容")
|
||||||
private String itermsConditions;
|
private String itemContent;
|
||||||
|
|
||||||
@ApiModelProperty(value = "拆分目录id")
|
@ApiModelProperty(value = "拆分目录id")
|
||||||
private String menuId;
|
private String menuId;
|
||||||
|
|||||||
+10
-10
@@ -238,7 +238,7 @@ public class FileSpiltService {
|
|||||||
String numberParent = p.getNumLevelText().substring(0, p.getNumLevelText().lastIndexOf("."));
|
String numberParent = p.getNumLevelText().substring(0, p.getNumLevelText().lastIndexOf("."));
|
||||||
if (numberMap.containsKey(numberParent)) {
|
if (numberMap.containsKey(numberParent)) {
|
||||||
Integer numbernow = (Integer) numberMap.get(numberParent) + 1;
|
Integer numbernow = (Integer) numberMap.get(numberParent) + 1;
|
||||||
if (messageList != null && !messageList.isEmpty() && messageList.get(messageList.size() - 1).getItemsNum().equals(numberParent + "." + String.valueOf(numbernow))) {
|
if (messageList != null && !messageList.isEmpty() && messageList.get(messageList.size() - 1).getItemNum().equals(numberParent + "." + String.valueOf(numbernow))) {
|
||||||
numberMap.put(numberParent, numbernow + 1);
|
numberMap.put(numberParent, numbernow + 1);
|
||||||
paragraphString = numberParent + "." + String.valueOf(numbernow + 1) + paragraphString;
|
paragraphString = numberParent + "." + String.valueOf(numbernow + 1) + paragraphString;
|
||||||
} else {
|
} else {
|
||||||
@@ -265,7 +265,7 @@ public class FileSpiltService {
|
|||||||
documentTreeEO1.setPId(generalCatalogueId);
|
documentTreeEO1.setPId(generalCatalogueId);
|
||||||
documentTreeEO1.setInfoId(sarFileSplitInfoEO.getId());
|
documentTreeEO1.setInfoId(sarFileSplitInfoEO.getId());
|
||||||
documentTreeEO1.setDisplaySeq(treeListDisplay++);
|
documentTreeEO1.setDisplaySeq(treeListDisplay++);
|
||||||
documentTreeEO1.setName(message.getItemsNum());
|
documentTreeEO1.setName(message.getItemNum());
|
||||||
documentTreeEO1.setValidFlag(0);
|
documentTreeEO1.setValidFlag(0);
|
||||||
// treeList.add(documentTreeEO1);
|
// treeList.add(documentTreeEO1);
|
||||||
|
|
||||||
@@ -346,8 +346,8 @@ public class FileSpiltService {
|
|||||||
ptest = Pattern.compile("^附录\\s{0,3}[A-Z]{1}");
|
ptest = Pattern.compile("^附录\\s{0,3}[A-Z]{1}");
|
||||||
matcher = ptest.matcher(paragraphString);
|
matcher = ptest.matcher(paragraphString);
|
||||||
// 获取当前最后一项num
|
// 获取当前最后一项num
|
||||||
String appendixNum = messageList.get(messageList.size() - 1).getItemsNum().split("\\.")[0];
|
String appendixNum = messageList.get(messageList.size() - 1).getItemNum().split("\\.")[0];
|
||||||
if (matcher.find()&& !messageList.get(messageList.size() - 1).getItemsNum().equals("附录")) {
|
if (matcher.find()&& !messageList.get(messageList.size() - 1).getItemNum().equals("附录")) {
|
||||||
if (Integer.valueOf(appendixNum) + 1 <= sarFileSplitInfoEO.getStopNumber()) {
|
if (Integer.valueOf(appendixNum) + 1 <= sarFileSplitInfoEO.getStopNumber()) {
|
||||||
String itemName = "附录";
|
String itemName = "附录";
|
||||||
List<String> clauseContent = new ArrayList<>();
|
List<String> clauseContent = new ArrayList<>();
|
||||||
@@ -789,10 +789,10 @@ public class FileSpiltService {
|
|||||||
public static SarFileSplitItemsEO getSarFileSplitItemsEO(String infoId, String itemsNum, String itemsName, List<String> itemsCondi) {
|
public static SarFileSplitItemsEO getSarFileSplitItemsEO(String infoId, String itemsNum, String itemsName, List<String> itemsCondi) {
|
||||||
SarFileSplitItemsEO sarFileSplitItemsEO = new SarFileSplitItemsEO();
|
SarFileSplitItemsEO sarFileSplitItemsEO = new SarFileSplitItemsEO();
|
||||||
sarFileSplitItemsEO.setInfoId(infoId);
|
sarFileSplitItemsEO.setInfoId(infoId);
|
||||||
sarFileSplitItemsEO.setItemsNum(itemsNum);
|
sarFileSplitItemsEO.setItemNum(itemsNum);
|
||||||
sarFileSplitItemsEO.setItemsName(itemsName);
|
sarFileSplitItemsEO.setItemTitle(itemsName);
|
||||||
sarFileSplitItemsEO.setItemsCondi(itemsCondi);
|
sarFileSplitItemsEO.setItemsCondi(itemsCondi);
|
||||||
sarFileSplitItemsEO.setItermsConditions("");
|
sarFileSplitItemsEO.setItemContent("");
|
||||||
sarFileSplitItemsEO.setId(UUIDUtils.randomUUID20());
|
sarFileSplitItemsEO.setId(UUIDUtils.randomUUID20());
|
||||||
sarFileSplitItemsEO.setValidFlag(0);
|
sarFileSplitItemsEO.setValidFlag(0);
|
||||||
sarFileSplitItemsEO.setCreationTime(new Date());
|
sarFileSplitItemsEO.setCreationTime(new Date());
|
||||||
@@ -872,7 +872,7 @@ public class FileSpiltService {
|
|||||||
// 像每个条款中依次插入每一段的内容
|
// 像每个条款中依次插入每一段的内容
|
||||||
public static void addItermsConditionsText(SarFileSplitItemsEO message, List<SarFileSplitItemsValEO> itemsValList, String p) {
|
public static void addItermsConditionsText(SarFileSplitItemsEO message, List<SarFileSplitItemsValEO> itemsValList, String p) {
|
||||||
message.getItemsCondi().add(p);
|
message.getItemsCondi().add(p);
|
||||||
message.setItermsConditions(message.getItermsConditions() + "<p>" + p + "</p>");
|
message.setItemTitle(message.getItemContent() + "<p>" + p + "</p>");
|
||||||
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.TEXT.getValue(), p, message.getItemsCondi().size(), null));
|
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.TEXT.getValue(), p, message.getItemsCondi().size(), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -911,7 +911,7 @@ public class FileSpiltService {
|
|||||||
rowNum++;
|
rowNum++;
|
||||||
}*/
|
}*/
|
||||||
message.getItemsCondi().add(table.getText());
|
message.getItemsCondi().add(table.getText());
|
||||||
message.setItermsConditions(message.getItermsConditions() + tabaleStringNew);
|
message.setItemContent(message.getItemContent() + tabaleStringNew);
|
||||||
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.TABLE.getValue(), tabaleStringNew.toString(), message.getItemsCondi().size(), null));
|
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.TABLE.getValue(), tabaleStringNew.toString(), message.getItemsCondi().size(), null));
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -929,7 +929,7 @@ public class FileSpiltService {
|
|||||||
String imgCon = path;
|
String imgCon = path;
|
||||||
String imgConVal = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\"" + path + "\">";
|
String imgConVal = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\"" + path + "\">";
|
||||||
message.getItemsCondi().add(imgConVal);
|
message.getItemsCondi().add(imgConVal);
|
||||||
message.setItermsConditions(message.getItermsConditions() + imgConVal);
|
message.setItemContent(message.getItemContent() + imgConVal);
|
||||||
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.IMG.getValue(), imgCon, message.getItemsCondi().size(), null));
|
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.IMG.getValue(), imgCon, message.getItemsCondi().size(), null));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -230,7 +230,9 @@ jero:
|
|||||||
webapp: D://opt//webapp
|
webapp: D://opt//webapp
|
||||||
uploadCos: 1
|
uploadCos: 1
|
||||||
#导出pdf临时文件路径 设置
|
#导出pdf临时文件路径 设置
|
||||||
exportPdfTempPath: D://opt//exportPdfTemp/
|
exportPdfTempPath: D://opt//exportTemp/
|
||||||
|
#导出excel临时文件路径 设置
|
||||||
|
exportExcelTempPath: D://opt//exportExcelTemp
|
||||||
#仿宋体字体文件路径 设置
|
#仿宋体字体文件路径 设置
|
||||||
simfangFontFilePath: D://opt//simfangFontFilePath//simfang.ttf
|
simfangFontFilePath: D://opt//simfangFontFilePath//simfang.ttf
|
||||||
shiro:
|
shiro:
|
||||||
|
|||||||
Reference in New Issue
Block a user