Merge remote-tracking branch 'origin/develop_master' into develop_master
This commit is contained in:
@@ -37,6 +37,12 @@
|
|||||||
<artifactId>UserAgentUtils</artifactId>
|
<artifactId>UserAgentUtils</artifactId>
|
||||||
<version>1.21</version>
|
<version>1.21</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.itextpdf</groupId>
|
||||||
|
<artifactId>itextpdf</artifactId>
|
||||||
|
<version>5.5.13</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
package com.adc.da.util;
|
package com.adc.da.util;
|
||||||
|
|
||||||
|
import com.itextpdf.text.BaseColor;
|
||||||
|
import com.itextpdf.text.Element;
|
||||||
|
import com.itextpdf.text.Rectangle;
|
||||||
|
import com.itextpdf.text.pdf.*;
|
||||||
|
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description:水印
|
* @Description:水印
|
||||||
* @Author: super_liu
|
* @Author: super_liu
|
||||||
@@ -15,7 +23,7 @@ public class WaterMarkUtil {
|
|||||||
*/
|
*/
|
||||||
public static boolean waterMark(String inputFile,
|
public static boolean waterMark(String inputFile,
|
||||||
String outputFile, String waterMarkName) {
|
String outputFile, String waterMarkName) {
|
||||||
/* try {
|
try {
|
||||||
PdfReader reader = new PdfReader(inputFile);
|
PdfReader reader = new PdfReader(inputFile);
|
||||||
Field f = PdfReader.class.getDeclaredField("encrypted");
|
Field f = PdfReader.class.getDeclaredField("encrypted");
|
||||||
f.setAccessible(true);
|
f.setAccessible(true);
|
||||||
@@ -65,8 +73,7 @@ public class WaterMarkUtil {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
}*/
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.adc.da.main.file;
|
||||||
|
|
||||||
|
import org.springframework.boot.web.servlet.MultipartConfigFactory;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.util.unit.DataSize;
|
||||||
|
|
||||||
|
import javax.servlet.MultipartConfigElement;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class FileUploadConfiuration {
|
||||||
|
@Bean
|
||||||
|
public MultipartConfigElement multipartConfigElement() {
|
||||||
|
MultipartConfigFactory factory = new MultipartConfigFactory();
|
||||||
|
//单个文件大小200mb
|
||||||
|
factory.setMaxFileSize(DataSize.ofMegabytes(200L));
|
||||||
|
//设置总上传数据大小10GB
|
||||||
|
factory.setMaxRequestSize(DataSize.ofGigabytes(10L));
|
||||||
|
|
||||||
|
return factory.createMultipartConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -146,4 +146,4 @@ elasticsearch.clustername=elasticsearch
|
|||||||
elasticsearch.ip=192.168.10.47
|
elasticsearch.ip=192.168.10.47
|
||||||
elasticsearch.port=9300
|
elasticsearch.port=9300
|
||||||
elasticsearch.poolSize=5
|
elasticsearch.poolSize=5
|
||||||
elas.flag=true
|
elas.flag=false
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ public class TsInstitution extends BaseEntity {
|
|||||||
private String hasChild;
|
private String hasChild;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
@ApiModelProperty("用户")
|
@ApiModelProperty("用户")
|
||||||
private TsUserVO tsUserVO;
|
private TsUserVO tsUserVO;
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -52,9 +52,6 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Page 页数
|
|
||||||
* @param Size 大小
|
|
||||||
* @param id 清单id
|
|
||||||
* @return ResponseMessage
|
* @return ResponseMessage
|
||||||
* @author zzy
|
* @author zzy
|
||||||
* date 2021-06-17
|
* date 2021-06-17
|
||||||
@@ -104,7 +101,7 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
|||||||
@ApiOperation(value = "根据标准查询时间")
|
@ApiOperation(value = "根据标准查询时间")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ResponseMessage selectTimes(String id){
|
public ResponseMessage selectTimes(String id){
|
||||||
Map<String ,List<StandTimeDto>> map = iSarLawsAttrDetailedList.selectTimes(id);
|
Map<String ,List<String>> map = iSarLawsAttrDetailedList.selectTimes(id);
|
||||||
return Result.success("200",map);
|
return Result.success("200",map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+19
-17
@@ -26,64 +26,66 @@ import lombok.NoArgsConstructor;
|
|||||||
public class LawsDto {
|
public class LawsDto {
|
||||||
@ApiModelProperty(value = "主键")
|
@ApiModelProperty(value = "主键")
|
||||||
private String id;
|
private String id;
|
||||||
@ExcelProperty(value = "标准编号", index = 0)
|
@ExcelProperty(value = "标准编号")
|
||||||
@ApiModelProperty(value = "标准编号")
|
@ApiModelProperty(value = "标准编号")
|
||||||
private String standNumber;
|
private String standNumber;
|
||||||
@ExcelProperty(value = "中文名称", index = 1)
|
@ExcelProperty(value = "中文名称")
|
||||||
@ApiModelProperty(value = "中文名称")
|
@ApiModelProperty(value = "中文名称")
|
||||||
private String standName;
|
private String standName;
|
||||||
@ExcelProperty(value = "英文名称", index = 2)
|
@ExcelProperty(value = "英文名称")
|
||||||
@ApiModelProperty(value = "英文名称")
|
@ApiModelProperty(value = "英文名称")
|
||||||
private String standEnName;
|
private String standEnName;
|
||||||
@ExcelProperty(value = "适用车型", index = 3)
|
@ExcelProperty(value = "适用车型")
|
||||||
@ApiModelProperty(value = "适用车型")
|
@ApiModelProperty(value = "适用车型")
|
||||||
private String typeApplicable;
|
private String typeApplicable;
|
||||||
@ExcelProperty(value = "能源类型", index = 4)
|
@ExcelProperty(value = "能源类型")
|
||||||
@ApiModelProperty(value = "能源类型")
|
@ApiModelProperty(value = "能源类型")
|
||||||
private String NYLX;
|
private String NYLX;
|
||||||
@ExcelProperty(value = "标准年份", index = 5)
|
@ExcelProperty(value = "标准年份")
|
||||||
private String standYear;
|
private String standYear;
|
||||||
@ExcelProperty(value = "标准类别", index = 6)
|
@ExcelProperty(value = "标准类别")
|
||||||
private String standSortShow;
|
private String standSortShow;
|
||||||
|
private String issueTime;
|
||||||
@ColumnWidth(16)
|
@ColumnWidth(16)
|
||||||
@ExcelProperty(value = "标准实施日期", index = 7)
|
@ExcelProperty(value = "标准实施日期")
|
||||||
@ApiModelProperty(value = "标准实施日期")
|
@ApiModelProperty(value = "标准实施日期")
|
||||||
@DateTimeFormat("yyyy年MM月dd日")
|
@DateTimeFormat("yyyy年MM月dd日")
|
||||||
private String putTime;
|
private String putTime;
|
||||||
@ColumnWidth(16)
|
@ColumnWidth(16)
|
||||||
@ExcelProperty(value = "新车型实施日期", index = 8)
|
@ExcelProperty(value = "新车型实施日期")
|
||||||
@ApiModelProperty(value = "新车型实施日期")
|
@ApiModelProperty(value = "新车型实施日期")
|
||||||
@DateTimeFormat("yyyy年MM月dd日")
|
@DateTimeFormat("yyyy年MM月dd日")
|
||||||
private String XCXSSRQGJ;
|
private String XCXSSRQGJ;
|
||||||
@ColumnWidth(16)
|
@ColumnWidth(16)
|
||||||
@ExcelProperty(value = "在产车实施日期", index = 8)
|
@ExcelProperty(value = "在产车实施日期")
|
||||||
@ApiModelProperty(value = "在产车实施日期")
|
@ApiModelProperty(value = "在产车实施日期")
|
||||||
@DateTimeFormat("yyyy年MM月dd日")
|
@DateTimeFormat("yyyy年MM月dd日")
|
||||||
private String ZCCSSRQGJ;
|
private String ZCCSSRQGJ;
|
||||||
@ExcelProperty(value = "责任部门", index = 9)
|
@ExcelProperty(value = "责任部门")
|
||||||
@ApiModelProperty(value = "责任部门")
|
@ApiModelProperty(value = "责任部门")
|
||||||
private String ZRBM;
|
private String ZRBM;
|
||||||
@ColumnWidth(14)
|
@ColumnWidth(14)
|
||||||
@ExcelProperty(value = "适用产品线", index = 10)
|
@ExcelProperty(value = "适用产品线")
|
||||||
@ApiModelProperty(value = "适用产品线")
|
@ApiModelProperty(value = "适用产品线")
|
||||||
private String SYCPX;
|
private String SYCPX;
|
||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
@ExcelProperty(value = "乘用车VPPS编码", index = 11)
|
@ExcelProperty(value = "乘用车VPPS编码")
|
||||||
@ApiModelProperty(value = "乘用车VPPS编码")
|
@ApiModelProperty(value = "乘用车VPPS编码")
|
||||||
private String CYCVPPSBM;
|
private String CYCVPPSBM;
|
||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
@ExcelProperty(value = "乘用车vpps中文名称", index = 12)
|
@ExcelProperty(value = "乘用车vpps中文名称")
|
||||||
@ApiModelProperty(value = "乘用车vpps中文名称")
|
@ApiModelProperty(value = "乘用车vpps中文名称")
|
||||||
private String CYCVPPSCN;
|
private String CYCVPPSCN;
|
||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
@ExcelProperty(value = "卡车VPPS编码", index = 13)
|
@ExcelProperty(value = "卡车VPPS编码")
|
||||||
@ApiModelProperty(value = "卡车VPPS编码")
|
@ApiModelProperty(value = "卡车VPPS编码")
|
||||||
private String KCCVPPSBM;
|
private String KCCVPPSBM;
|
||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
@ExcelProperty(value = "卡车vpps中文名称", index = 14)
|
@ExcelProperty(value = "卡车vpps中文名称")
|
||||||
@ApiModelProperty(value = "卡车vpps中文名称")
|
@ApiModelProperty(value = "卡车vpps中文名称")
|
||||||
private String KCCVPPSCN;
|
private String KCCVPPSCN;
|
||||||
@ApiModelProperty(value = "责任工程师")
|
@ApiModelProperty(value = "责任工程师")
|
||||||
@ExcelProperty(value = "责任工程师", index = 15)
|
@ExcelProperty(value = "责任工程师")
|
||||||
private String responsibleEngineer;
|
private String responsibleEngineer;
|
||||||
|
private String standType;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
|
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
@@ -8,7 +7,7 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //导出类
|
||||||
*用于导出标准数据信息
|
*用于导出标准数据信息
|
||||||
* 需要后期修改
|
* 需要后期修改
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import lombok.Data;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //接收所导出的文件名
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-06-24
|
* @date 2021-06-24
|
||||||
|
|||||||
+17
-4
@@ -1,10 +1,14 @@
|
|||||||
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
|
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //新增清单进行时间的添加
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-07-21
|
* @date 2021-07-21
|
||||||
@@ -13,10 +17,19 @@ import lombok.Data;
|
|||||||
public class StandRegionalTimeDto {
|
public class StandRegionalTimeDto {
|
||||||
@ApiModelProperty(value = "国家")
|
@ApiModelProperty(value = "国家")
|
||||||
private String country;
|
private String country;
|
||||||
|
|
||||||
@ApiModelProperty(value = "实施日期")
|
@ApiModelProperty(value = "实施日期")
|
||||||
private String putTime;
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
private Date putTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "在产车实施日期")
|
@ApiModelProperty(value = "在产车实施日期")
|
||||||
private String zccssrq;
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
private Date zccssrq;
|
||||||
|
|
||||||
@ApiModelProperty(value = "新车型实施日期")
|
@ApiModelProperty(value = "新车型实施日期")
|
||||||
private String xcxssrq;
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
private Date xcxssrq;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //标准时间
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-07-21
|
* @date 2021-07-21
|
||||||
|
|||||||
+1
-1
@@ -23,5 +23,5 @@ public interface ISarLawsAttrDetailedListService extends IService<SarLawsAttrDet
|
|||||||
Boolean updateDetailedLaws(String id,List<TimeDto> timeDtos);
|
Boolean updateDetailedLaws(String id,List<TimeDto> timeDtos);
|
||||||
void exportExcel(HttpServletResponse response, StandExcelVo standExcelVo);
|
void exportExcel(HttpServletResponse response, StandExcelVo standExcelVo);
|
||||||
int setTimes(SarLawsAttrDetailedList sarLawsAttrDetailedList);
|
int setTimes(SarLawsAttrDetailedList sarLawsAttrDetailedList);
|
||||||
Map<String ,List<StandTimeDto>> selectTimes(String id);
|
Map<String ,List<String>> selectTimes(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
+50
-18
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarLawsAttrDetailedList.service.impl;
|
|||||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.*;
|
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.*;
|
||||||
import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListService;
|
import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListService;
|
||||||
|
import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList;
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
|
import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
|
||||||
import com.adc.da.sys.service.IDicTypeEOService;
|
import com.adc.da.sys.service.IDicTypeEOService;
|
||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
@@ -15,10 +16,8 @@ import org.springframework.util.CollectionUtils;
|
|||||||
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.ArrayList;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -58,6 +57,8 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
|||||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getZccssrq())){
|
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getZccssrq())){
|
||||||
lawsDto.setZCCSSRQGJ(sarLawsAttrDetailedLists.get(0).getZccssrq());
|
lawsDto.setZCCSSRQGJ(sarLawsAttrDetailedLists.get(0).getZccssrq());
|
||||||
}
|
}
|
||||||
|
if ("INLAND".equals(lawsDto.getStandType()))lawsDto.setStandType("INLAND_STAND");
|
||||||
|
if ("FOREIGN".equals(lawsDto.getStandType()))lawsDto.setStandType("FOREIGN_STAND");
|
||||||
}
|
}
|
||||||
//适用车型
|
//适用车型
|
||||||
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
|
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
|
||||||
@@ -225,25 +226,56 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, List<StandTimeDto>> selectTimes(String id) {
|
public Map<String, List<String>> selectTimes(String id) {
|
||||||
List<StandRegionalTimeDto> standRegionalTimeDto= sarLawsAttrDetailedListDao.selectTimes(id);
|
List<StandRegionalTimeDto> standRegionalTimeDto= sarLawsAttrDetailedListDao.selectTimes(id);
|
||||||
Map<String, List<StandTimeDto>> mapList = new HashMap<String, List<StandTimeDto>>();
|
Map<String, Object> map = iDicTypeEOService.getDicTypeListCode();
|
||||||
for (StandRegionalTimeDto s:standRegionalTimeDto){
|
List<Map<String, String>> arr = (List<Map<String, String>>) map.get("COUNTRY");
|
||||||
List<StandTimeDto> list;
|
for (StandRegionalTimeDto list1 : standRegionalTimeDto) {
|
||||||
if (mapList.containsKey(s.getCountry())){
|
if (StringUtils.isNotBlank(list1.getCountry()) && list1.getCountry().contains(",")) {
|
||||||
list = mapList.get(s.getCountry());
|
String[] split = list1.getCountry().split(",");
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
for (String s : split) {
|
||||||
|
for (Map<String, String> map1 : arr) {
|
||||||
|
if (map1.get("value").equals(s)) {
|
||||||
|
s = map1.get("label");
|
||||||
|
builder.append(s + ",");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String completedString = builder.delete(builder.length() - 1, builder.length()).toString();
|
||||||
|
list1.setCountry(completedString);
|
||||||
}else {
|
}else {
|
||||||
list = new ArrayList<>();
|
for (Map<String,String> map1:arr) {
|
||||||
|
if (map1.get("value").equals(list1.getCountry())){
|
||||||
|
list1.setCountry(map1.get("label"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
StandTimeDto standTimeDto = new StandTimeDto();
|
}
|
||||||
standTimeDto.setPutTime(s.getPutTime());
|
LinkedHashMap<String, List<String>> mapList = new LinkedHashMap<String, List<String>>();
|
||||||
standTimeDto.setXcxssrq(s.getXcxssrq());
|
List<String> putTime = new ArrayList<>();
|
||||||
standTimeDto.setZccssrq(s.getZccssrq());
|
List<String> xcx = new ArrayList<>();
|
||||||
list.add(standTimeDto);
|
List<String> zcc= new ArrayList<>();
|
||||||
mapList.put(s.getCountry(),list);
|
for (StandRegionalTimeDto s:standRegionalTimeDto){
|
||||||
|
if (mapList.containsKey("实施日期("+s.getCountry()+")")||mapList.containsKey("新车型实施日期("+s.getCountry()+")")||mapList.containsKey("在产车实施日期("+s.getCountry()+")")){
|
||||||
|
putTime = mapList.get("实施日期("+s.getCountry()+")");
|
||||||
|
xcx = mapList.get("新车型实施日期("+s.getCountry()+")");
|
||||||
|
zcc = mapList.get("在产车实施日期("+s.getCountry()+")");
|
||||||
|
|
||||||
|
}
|
||||||
|
dateTime(mapList, putTime, xcx, zcc, s);
|
||||||
}
|
}
|
||||||
return mapList;
|
return mapList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void dateTime(LinkedHashMap<String, List<String>> mapList, List<String> putTime, List<String> xcx, List<String> zcc, StandRegionalTimeDto s) {
|
||||||
|
putTime.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime()));
|
||||||
|
xcx.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq()));
|
||||||
|
zcc.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq()));
|
||||||
|
mapList.put("实施日期("+s.getCountry()+")",putTime);
|
||||||
|
mapList.put("新车型实施日期("+s.getCountry()+")",xcx);
|
||||||
|
mapList.put("在产车实施日期("+s.getCountry()+")",zcc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ import java.util.List;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //继承类的数据转移
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-07-26
|
* @date 2021-07-26
|
||||||
|
|||||||
-1
@@ -149,7 +149,6 @@ public class SarLawsDetailedListController extends BaseController<SarLawsDetaile
|
|||||||
@ApiOperation(value = "修改清单")
|
@ApiOperation(value = "修改清单")
|
||||||
@PutMapping("/updateList")
|
@PutMapping("/updateList")
|
||||||
public ResponseMessage updateList(@RequestBody DetailedUpDto detailedUpDto) {
|
public ResponseMessage updateList(@RequestBody DetailedUpDto detailedUpDto) {
|
||||||
|
|
||||||
String src = sarLawsDetailedListService.updateList(detailedUpDto);
|
String src = sarLawsDetailedListService.updateList(detailedUpDto);
|
||||||
return Result.success("200",src,true);
|
return Result.success("200",src,true);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //新增dto
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-06-24
|
* @date 2021-06-24
|
||||||
|
|||||||
+1
-4
@@ -1,15 +1,12 @@
|
|||||||
package com.adc.da.slrs.sarLawsDetailedList.entity;
|
package com.adc.da.slrs.sarLawsDetailedList.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //修改dto
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-06-25
|
* @date 2021-06-25
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ package com.adc.da.slrs.sarLawsDetailedList.entity;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //文件名回显
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-07-26
|
* @date 2021-07-26
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import lombok.Data;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //导出标准信息进行接收ids
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-06-22
|
* @date 2021-06-22
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
package com.adc.da.slrs.sarLawsDetailedList.entity;
|
package com.adc.da.slrs.sarLawsDetailedList.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //用于新增清单的三个时间
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-07-21
|
* @date 2021-07-21
|
||||||
|
|||||||
+48
-74
@@ -61,6 +61,9 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
@Override
|
@Override
|
||||||
public String add(AddDetailedDto addDetailedDto) {
|
public String add(AddDetailedDto addDetailedDto) {
|
||||||
addDetailedDto.setInforlist(addDetailedDto.getInforlist().substring(1, addDetailedDto.getInforlist().length() -1));
|
addDetailedDto.setInforlist(addDetailedDto.getInforlist().substring(1, addDetailedDto.getInforlist().length() -1));
|
||||||
|
addDetailedDto.setInforlist1(addDetailedDto.getInforlist1().substring(1, addDetailedDto.getInforlist1().length() -1));
|
||||||
|
addDetailedDto.setInforlist2(addDetailedDto.getInforlist2().substring(1, addDetailedDto.getInforlist2().length() -1));
|
||||||
|
addDetailedDto.setInforlist3(addDetailedDto.getInforlist3().substring(1, addDetailedDto.getInforlist3().length() -1));
|
||||||
try {
|
try {
|
||||||
SarLawsDetailedList sarLawsDetailedList = SarLawsDetailedList.builder()
|
SarLawsDetailedList sarLawsDetailedList = SarLawsDetailedList.builder()
|
||||||
.id(UUIDUtils.randomUUID20())
|
.id(UUIDUtils.randomUUID20())
|
||||||
@@ -79,89 +82,60 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
switch (addDetailedDto.getSortKey()) {
|
switch (addDetailedDto.getSortKey()) {
|
||||||
case "1":
|
case "1":
|
||||||
sarLawsDetailedList.setCountryArea(addDetailedDto.getCountryArea());
|
sarLawsDetailedList.setCountryArea(addDetailedDto.getCountryArea());
|
||||||
if (addDetailedDto.getInforlist()!=null){
|
|
||||||
if (addDetailedDto.getInforlist().contains(",")){
|
|
||||||
String[] id = addDetailedDto.getInforlist().split(",");
|
|
||||||
String[] putTime = addDetailedDto.getInforlist1().split(",");
|
|
||||||
String[] zcc = addDetailedDto.getInforlist2().split(",");
|
|
||||||
String[] xcx = addDetailedDto.getInforlist3().split(",");
|
|
||||||
for (int a =0;a< id.length;a++){
|
|
||||||
TimeDto dto = new TimeDto();
|
|
||||||
dto.setStandId(id[a]);
|
|
||||||
if ("\"".equals(putTime[a])){
|
|
||||||
dto.setPutTime(null);
|
|
||||||
}else {
|
|
||||||
dto.setPutTime(putTime[a]);
|
|
||||||
}
|
|
||||||
if ("\"".equals(putTime[a])){
|
|
||||||
dto.setXcxssrqgj(null);
|
|
||||||
}else {
|
|
||||||
dto.setXcxssrqgj(xcx[a]);
|
|
||||||
}
|
|
||||||
if ("\"".equals(putTime[a])){
|
|
||||||
dto.setZccssrqgj(null);
|
|
||||||
}else {
|
|
||||||
dto.setZccssrqgj(zcc[a]);
|
|
||||||
}
|
|
||||||
timeDto.add(dto);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
TimeDto dto = new TimeDto();
|
|
||||||
dto.setStandId(addDetailedDto.getInforlist());
|
|
||||||
dto.setPutTime(addDetailedDto.getInforlist1());
|
|
||||||
dto.setXcxssrqgj(addDetailedDto.getInforlist2());
|
|
||||||
dto.setZccssrqgj(addDetailedDto.getInforlist3());
|
|
||||||
timeDto.add(dto);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
timeDto=null;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
sarLawsDetailedList.setProjectName(addDetailedDto.getProjectName());
|
sarLawsDetailedList.setProjectName(addDetailedDto.getProjectName());
|
||||||
if (addDetailedDto.getInforlist() != null){
|
|
||||||
if (addDetailedDto.getInforlist().contains(",")){
|
|
||||||
String[] id = addDetailedDto.getInforlist().split(",");
|
|
||||||
for (String standId:id){
|
|
||||||
TimeDto dto = new TimeDto();
|
|
||||||
dto.setStandId(standId);
|
|
||||||
timeDto.add(dto);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
TimeDto dto = new TimeDto();
|
|
||||||
dto.setStandId(addDetailedDto.getInforlist());
|
|
||||||
timeDto.add(dto);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
timeDto=null;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
sarLawsDetailedList.setDetailedList(addDetailedDto.getDetailedList());
|
sarLawsDetailedList.setDetailedList(addDetailedDto.getDetailedList());
|
||||||
if (addDetailedDto.getInforlist() != null){
|
|
||||||
if (addDetailedDto.getInforlist().contains(",")){
|
|
||||||
String[] id = addDetailedDto.getInforlist().split(",");
|
|
||||||
for (String standId:id){
|
|
||||||
TimeDto dto = new TimeDto();
|
|
||||||
dto.setStandId(standId);
|
|
||||||
timeDto.add(dto);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
TimeDto dto = new TimeDto();
|
|
||||||
dto.setStandId(addDetailedDto.getInforlist());
|
|
||||||
timeDto.add(dto);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
timeDto=null;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ("admin".equals(getUserName()))sarLawsDetailedList.setUpdatePeople("管理员");
|
if ("admin".equals(getUserName()))sarLawsDetailedList.setUpdatePeople("管理员");
|
||||||
else {sarLawsDetailedList.setUpdatePeople(getUserName());}
|
else {sarLawsDetailedList.setUpdatePeople(getUserName());}
|
||||||
|
|
||||||
|
if (addDetailedDto.getInforlist()!=null){
|
||||||
|
if (addDetailedDto.getInforlist().contains(",")){
|
||||||
|
String[] id = addDetailedDto.getInforlist().split(",");
|
||||||
|
String[] putTime = addDetailedDto.getInforlist1().split(",");
|
||||||
|
String[] zcc = addDetailedDto.getInforlist2().split(",");
|
||||||
|
String[] xcx = addDetailedDto.getInforlist3().split(",");
|
||||||
|
for (int a =0;a< id.length;a++){
|
||||||
|
TimeDto dto = new TimeDto();
|
||||||
|
dto.setStandId(id[a]);
|
||||||
|
if (null==putTime[a]){
|
||||||
|
dto.setPutTime(null);
|
||||||
|
}else {
|
||||||
|
dto.setPutTime(putTime[a]);
|
||||||
|
}
|
||||||
|
if (null == xcx[a]){
|
||||||
|
dto.setXcxssrqgj(null);
|
||||||
|
}else {
|
||||||
|
dto.setXcxssrqgj(xcx[a]);
|
||||||
|
}
|
||||||
|
if (null == zcc[a]){
|
||||||
|
dto.setZccssrqgj(null);
|
||||||
|
}else {
|
||||||
|
dto.setZccssrqgj(zcc[a]);
|
||||||
|
}
|
||||||
|
timeDto.add(dto);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
TimeDto dto = new TimeDto();
|
||||||
|
dto.setStandId(addDetailedDto.getInforlist());
|
||||||
|
dto.setPutTime(addDetailedDto.getInforlist1());
|
||||||
|
dto.setXcxssrqgj(addDetailedDto.getInforlist2());
|
||||||
|
dto.setZccssrqgj(addDetailedDto.getInforlist3());
|
||||||
|
timeDto.add(dto);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
timeDto=null;
|
||||||
|
}
|
||||||
sarLawsDetailedListDao.insert(sarLawsDetailedList);
|
sarLawsDetailedListDao.insert(sarLawsDetailedList);
|
||||||
service.insertDetailedList(sarLawsDetailedList.getId(),timeDto);
|
service.insertDetailedList(sarLawsDetailedList.getId(),timeDto);
|
||||||
|
|
||||||
@@ -185,7 +159,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
like(StringUtils.isNotEmpty(detailedListName), "detailed_list_name", detailedListName);
|
like(StringUtils.isNotEmpty(detailedListName), "detailed_list_name", detailedListName);
|
||||||
|
|
||||||
} else if ("3".equals(sortKey)) {
|
} else if ("3".equals(sortKey)) {
|
||||||
wrapper.like(StringUtils.isNotEmpty(detailedList), "detailed_list_state", detailedList).
|
wrapper.like(StringUtils.isNotEmpty(detailedList), "detailed_list", detailedList).
|
||||||
like(StringUtils.isNotEmpty(detailedListName), "detailed_list_name", detailedListName);
|
like(StringUtils.isNotEmpty(detailedListName), "detailed_list_name", detailedListName);
|
||||||
}
|
}
|
||||||
wrapper.eq("sort_key", sortKey);
|
wrapper.eq("sort_key", sortKey);
|
||||||
@@ -277,7 +251,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
if (null != detailedUpDto.getInforlist()) {
|
if (null != detailedUpDto.getInforlist()) {
|
||||||
detailedUpDto.setInforlist(detailedUpDto.getInforlist().substring(1, detailedUpDto.getInforlist().length() - 1));
|
detailedUpDto.setInforlist(detailedUpDto.getInforlist().substring(1, detailedUpDto.getInforlist().length() - 1));
|
||||||
List<TimeDto> timeDto = new ArrayList<>();
|
List<TimeDto> timeDto = new ArrayList<>();
|
||||||
if (detailedUpDto.getInforlist().indexOf(",") >= 0) {
|
if ("1".equals(detailedUpDto.getSortKey()) && detailedUpDto.getInforlist().contains(",")) {
|
||||||
String[] id = detailedUpDto.getInforlist().split(",");
|
String[] id = detailedUpDto.getInforlist().split(",");
|
||||||
String[] putTime = detailedUpDto.getInforlist1().split(",");
|
String[] putTime = detailedUpDto.getInforlist1().split(",");
|
||||||
String[] zcc = detailedUpDto.getInforlist2().split(",");
|
String[] zcc = detailedUpDto.getInforlist2().split(",");
|
||||||
@@ -285,17 +259,17 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
for (int a = 0; a < id.length; a++) {
|
for (int a = 0; a < id.length; a++) {
|
||||||
TimeDto dto = new TimeDto();
|
TimeDto dto = new TimeDto();
|
||||||
dto.setStandId(id[a]);
|
dto.setStandId(id[a]);
|
||||||
if ("\"".equals(putTime[a])) {
|
if (putTime[a]==null) {
|
||||||
dto.setPutTime(null);
|
dto.setPutTime(null);
|
||||||
} else {
|
} else {
|
||||||
dto.setPutTime(putTime[a]);
|
dto.setPutTime(putTime[a]);
|
||||||
}
|
}
|
||||||
if ("\"".equals(putTime[a])) {
|
if (putTime[a]==null) {
|
||||||
dto.setXcxssrqgj(null);
|
dto.setXcxssrqgj(null);
|
||||||
} else {
|
} else {
|
||||||
dto.setXcxssrqgj(xcx[a]);
|
dto.setXcxssrqgj(xcx[a]);
|
||||||
}
|
}
|
||||||
if ("\"".equals(putTime[a])) {
|
if (putTime[a]==null) {
|
||||||
dto.setZccssrqgj(null);
|
dto.setZccssrqgj(null);
|
||||||
} else {
|
} else {
|
||||||
dto.setZccssrqgj(zcc[a]);
|
dto.setZccssrqgj(zcc[a]);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarResource.dao;
|
|||||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,4 +20,6 @@ public interface TsResourceDao extends BaseMapper<TsResource> {
|
|||||||
|
|
||||||
List<TsResource> selectMenuByRole(TsResource sarMenuEO);
|
List<TsResource> selectMenuByRole(TsResource sarMenuEO);
|
||||||
|
|
||||||
|
int insertTsRoleResource(HashMap<String,Object> map);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+9
@@ -7,6 +7,7 @@ import com.adc.da.login.util.UserUtils;
|
|||||||
import com.adc.da.slrs.sarResource.dao.TsResourceDao;
|
import com.adc.da.slrs.sarResource.dao.TsResourceDao;
|
||||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||||
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.adc.da.utils.treetool.Tree;
|
import com.adc.da.utils.treetool.Tree;
|
||||||
import com.adc.da.utils.treetool.TreeNode;
|
import com.adc.da.utils.treetool.TreeNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -17,6 +18,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,6 +147,7 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
|||||||
tsResourceQueryWrapper.eq("sor_divide",tsResource.getSorDivide());
|
tsResourceQueryWrapper.eq("sor_divide",tsResource.getSorDivide());
|
||||||
}
|
}
|
||||||
tsResourceQueryWrapper.isNull("PARENT_ID");
|
tsResourceQueryWrapper.isNull("PARENT_ID");
|
||||||
|
tsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||||
List<TsResource> TsResources=dao.selectList(tsResourceQueryWrapper);
|
List<TsResource> TsResources=dao.selectList(tsResourceQueryWrapper);
|
||||||
for(TsResource TsResource:TsResources){
|
for(TsResource TsResource:TsResources){
|
||||||
TsResource.setChildren(recursionGetChildren((TsResource)));
|
TsResource.setChildren(recursionGetChildren((TsResource)));
|
||||||
@@ -166,6 +169,12 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dao.insert(TsResource);
|
dao.insert(TsResource);
|
||||||
|
// 把新生成的子目录加入用户的权限的下----插入ts_role_resource表
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
map.put("resourceId",TsResource.getId());
|
||||||
|
map.put("roleId",1);
|
||||||
|
dao.insertTsRoleResource(map);
|
||||||
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+15
@@ -22,6 +22,7 @@ import io.swagger.annotations.Api;
|
|||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -59,8 +60,22 @@ public class SarStandAttrDetailsController extends BaseController<SarStandAttrDe
|
|||||||
// 标准属性字段
|
// 标准属性字段
|
||||||
List<SarStandAttrDetails> getInlandStandList = InitStandAttrUtil.standInlandAttrFieldList;
|
List<SarStandAttrDetails> getInlandStandList = InitStandAttrUtil.standInlandAttrFieldList;
|
||||||
resultMap.put(SarTypeEnum.INLAND_STAND.getValue(),getInlandStandList);
|
resultMap.put(SarTypeEnum.INLAND_STAND.getValue(),getInlandStandList);
|
||||||
|
|
||||||
|
|
||||||
List<SarStandAttrDetails> getForeignStandList = InitStandAttrUtil.standForeignAttrFieldList;
|
List<SarStandAttrDetails> getForeignStandList = InitStandAttrUtil.standForeignAttrFieldList;
|
||||||
|
//新增字段
|
||||||
|
// Iterator<SarStandAttrDetails> iterator = getInlandStandList.iterator();
|
||||||
|
// while (iterator.hasNext()){
|
||||||
|
// SarStandAttrDetails next = iterator.next();
|
||||||
|
//
|
||||||
|
// if (next.getAttrName().matches("能源类型|适用产品线|适用认证|责任工程师|关联文件")){
|
||||||
|
// getForeignStandList.add(next);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
resultMap.put(SarTypeEnum.FOREIGN_STAND.getValue(),getForeignStandList);
|
resultMap.put(SarTypeEnum.FOREIGN_STAND.getValue(),getForeignStandList);
|
||||||
|
|
||||||
|
|
||||||
// 政策属性字段
|
// 政策属性字段
|
||||||
List<SarStandAttrDetails> getInlandLawsList = InitStandAttrUtil.lawsInlandAttrFieldList;
|
List<SarStandAttrDetails> getInlandLawsList = InitStandAttrUtil.lawsInlandAttrFieldList;
|
||||||
resultMap.put(SarTypeEnum.INLAND_LAWS.getValue(),getInlandLawsList);
|
resultMap.put(SarTypeEnum.INLAND_LAWS.getValue(),getInlandLawsList);
|
||||||
|
|||||||
+8
@@ -5,11 +5,13 @@ import java.time.LocalDateTime;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
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;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -60,10 +62,14 @@ public class SarStandAttrInfo extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "新车型实施日期(文本)")
|
@ApiModelProperty(value = "新车型实施日期(文本)")
|
||||||
@TableField("XCXSSRQ")
|
@TableField("XCXSSRQ")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
private String xcxssrq;
|
private String xcxssrq;
|
||||||
|
|
||||||
@ApiModelProperty(value = "在产车实施日期(文本)")
|
@ApiModelProperty(value = "在产车实施日期(文本)")
|
||||||
@TableField("ZCCSSRQ")
|
@TableField("ZCCSSRQ")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
private String zccssrq;
|
private String zccssrq;
|
||||||
|
|
||||||
@ApiModelProperty(value = "标签")
|
@ApiModelProperty(value = "标签")
|
||||||
@@ -148,6 +154,8 @@ public class SarStandAttrInfo extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "实施日期(标准文本)")
|
@ApiModelProperty(value = "实施日期(标准文本)")
|
||||||
@TableField("SSRQ")
|
@TableField("SSRQ")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
private String ssrq;
|
private String ssrq;
|
||||||
|
|
||||||
@ApiModelProperty(value = "实施日期(国际)")
|
@ApiModelProperty(value = "实施日期(国际)")
|
||||||
|
|||||||
+2
-5
@@ -4,9 +4,7 @@ package com.adc.da.slrs.sarStandIdea.controller;
|
|||||||
import com.adc.da.http.ResponseMessage;
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.*;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.GetExcelDto;
|
|
||||||
import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaAllServiceImpl;
|
import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaAllServiceImpl;
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
@@ -18,7 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
@@ -51,7 +48,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
|||||||
@ApiOperation(value = "查询全部意见")
|
@ApiOperation(value = "查询全部意见")
|
||||||
@GetMapping("/getAllStand")
|
@GetMapping("/getAllStand")
|
||||||
public ResponseMessage getAllStand(DetAllStandDto detAllStandDto){
|
public ResponseMessage getAllStand(DetAllStandDto detAllStandDto){
|
||||||
IPage<SarPublicIdeaAll> publicList =sarPublicIdeaAllImpl.selectAll(detAllStandDto);
|
IPage<SarPublicIdeaAllSUD> publicList =sarPublicIdeaAllImpl.selectAll(detAllStandDto);
|
||||||
return Result.success("200",publicList);
|
return Result.success("200",publicList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
@@ -64,5 +64,16 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
|
|||||||
return Result.success(publicList);
|
return Result.success(publicList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "发起标准征求意见流程后自动公开征求意见")
|
||||||
|
@PostMapping("/addSarPublicIdea")
|
||||||
|
public ResponseMessage addSarPublicIdea(@RequestBody SarPublicIdea sarPublicIdea){
|
||||||
|
try{
|
||||||
|
sarPublicIdeaService.save(sarPublicIdea);
|
||||||
|
}catch(Exception e){
|
||||||
|
return Result.error();
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,40 +1,12 @@
|
|||||||
package com.adc.da.slrs.sarStandIdea.entity;
|
package com.adc.da.slrs.sarStandIdea.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class DetAllStandDto {
|
public class DetAllStandDto {
|
||||||
Integer page;
|
Integer page;
|
||||||
Integer size;
|
Integer size;
|
||||||
String cid;
|
String cid;
|
||||||
String userId;
|
String userId;
|
||||||
|
String endTime;
|
||||||
public Integer getPage() {
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPage(Integer page) {
|
|
||||||
this.page = page;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getSize() {
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSize(Integer size) {
|
|
||||||
this.size = size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCid() {
|
|
||||||
return cid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCid(String cid) {
|
|
||||||
this.cid = cid;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,5 +57,8 @@ public class SarPublicIdea extends BaseEntity {
|
|||||||
@TableField("category_flag")
|
@TableField("category_flag")
|
||||||
private String categoryFlag;
|
private String categoryFlag;
|
||||||
|
|
||||||
|
@TableField("stand_id")
|
||||||
|
private String standId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package com.adc.da.slrs.sarStandIdea.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* //用于增删查改的判断
|
||||||
|
*
|
||||||
|
* @author ZhangZhiYuan
|
||||||
|
* @date 2021-07-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SarPublicIdeaAllSUD extends SarPublicIdeaAll{
|
||||||
|
public Integer ideaKey;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.adc.da.slrs.sarStandIdea.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* //用于查询标准关联信息
|
||||||
|
*
|
||||||
|
* @author ZhangZhiYuan
|
||||||
|
* @date 2021-07-27
|
||||||
|
*/
|
||||||
|
public class SarPublicIdeaDto {
|
||||||
|
private String id;
|
||||||
|
private String category;
|
||||||
|
private String cid;
|
||||||
|
private String cname;
|
||||||
|
private Date startTime;
|
||||||
|
private Date endTime;
|
||||||
|
private String categoryFlag;
|
||||||
|
private String standId;
|
||||||
|
// private String ;
|
||||||
|
}
|
||||||
+2
-1
@@ -4,6 +4,7 @@ package com.adc.da.slrs.sarStandIdea.service;
|
|||||||
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||||
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAllSUD;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
public interface ISarPublicIdeaAllService extends IService<SarPublicIdeaAll> {
|
public interface ISarPublicIdeaAllService extends IService<SarPublicIdeaAll> {
|
||||||
|
|
||||||
|
|
||||||
IPage<SarPublicIdeaAll> selectAll(DetAllStandDto detAllStandDto);
|
IPage<SarPublicIdeaAllSUD> selectAll(DetAllStandDto detAllStandDto);
|
||||||
String add(SarPublicIdeaAll sarPublicIdeaAll);
|
String add(SarPublicIdeaAll sarPublicIdeaAll);
|
||||||
String updateById(SarPublicIdeaAll sarPublicIdeaAll, String autUserid);
|
String updateById(SarPublicIdeaAll sarPublicIdeaAll, String autUserid);
|
||||||
String delete(DelStandDto delStandDto);
|
String delete(DelStandDto delStandDto);
|
||||||
|
|||||||
+58
-17
@@ -1,12 +1,12 @@
|
|||||||
package com.adc.da.slrs.sarStandIdea.service.Impl;
|
package com.adc.da.slrs.sarStandIdea.service.Impl;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.lang.Snowflake;
|
import com.adc.da.slrs.sarLawsDetailedList.Util.BeanConverUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
|
||||||
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||||
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAllSUD;
|
||||||
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaAllService;
|
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaAllService;
|
||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -14,17 +14,13 @@ 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.apache.poi.ss.usermodel.*;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.servlet.ServletOutputStream;
|
import java.text.ParseException;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.*;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,14 +40,59 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<SarPublicIdeaAll> selectAll(DetAllStandDto detAllStandDto){
|
public IPage<SarPublicIdeaAllSUD> selectAll(DetAllStandDto detAllStandDto){
|
||||||
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
if (detAllStandDto.getEndTime()!=null){
|
||||||
wrapper.eq("CID",detAllStandDto.getCid());
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(),detAllStandDto.getSize());
|
Date Time = null;
|
||||||
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
try {
|
||||||
System.out.println("总条数"+userIPage.getTotal());
|
Time = sdf.parse(detAllStandDto.getEndTime());
|
||||||
System.out.println("总页数"+userIPage.getPages());
|
} catch (ParseException e) {
|
||||||
return userIPage;
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("CID",detAllStandDto.getCid());
|
||||||
|
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(),detAllStandDto.getSize());
|
||||||
|
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
||||||
|
System.out.println("总条数"+userIPage.getTotal());
|
||||||
|
System.out.println("总页数"+userIPage.getPages());
|
||||||
|
List<SarPublicIdeaAll> list= userIPage.getRecords();
|
||||||
|
List<SarPublicIdeaAllSUD> list1 = new ArrayList<>();
|
||||||
|
list1 = BeanConverUtil.converList(list, SarPublicIdeaAllSUD.class);
|
||||||
|
for (SarPublicIdeaAllSUD sud:list1){
|
||||||
|
if (Time.compareTo(new Date())>=0)sud.setIdeaKey(0);
|
||||||
|
else {sud.setIdeaKey(1);}
|
||||||
|
}
|
||||||
|
IPage<SarPublicIdeaAllSUD> userIPage1 = new Page<>();
|
||||||
|
userIPage1.setPages(userIPage.getPages());
|
||||||
|
userIPage1.setSize(userIPage.getSize());
|
||||||
|
userIPage1.setTotal(userIPage.getTotal());
|
||||||
|
userIPage1.setCurrent(userIPage.getCurrent());
|
||||||
|
userIPage1.setRecords(list1);
|
||||||
|
return userIPage1;
|
||||||
|
}else {
|
||||||
|
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("CID",detAllStandDto.getCid());
|
||||||
|
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(),detAllStandDto.getSize());
|
||||||
|
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
||||||
|
System.out.println("总条数"+userIPage.getTotal());
|
||||||
|
System.out.println("总页数"+userIPage.getPages());
|
||||||
|
List<SarPublicIdeaAll> list= userIPage.getRecords();
|
||||||
|
List<SarPublicIdeaAllSUD> list1 = new ArrayList<>();
|
||||||
|
list1 = BeanConverUtil.converList(list, SarPublicIdeaAllSUD.class);
|
||||||
|
for (SarPublicIdeaAllSUD sud:list1){
|
||||||
|
sud.setIdeaKey(0);
|
||||||
|
}
|
||||||
|
IPage<SarPublicIdeaAllSUD> userIPage1 = new Page<>();
|
||||||
|
userIPage1.setPages(userIPage.getPages());
|
||||||
|
userIPage1.setSize(userIPage.getSize());
|
||||||
|
userIPage1.setTotal(userIPage.getTotal());
|
||||||
|
userIPage1.setCurrent(userIPage.getCurrent());
|
||||||
|
userIPage1.setRecords(list1);
|
||||||
|
return userIPage1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+2
-3
@@ -49,9 +49,8 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl<SarPublicIdeaDao, SarP
|
|||||||
QueryWrapper<SarPublicIdea> list = new QueryWrapper<>();
|
QueryWrapper<SarPublicIdea> list = new QueryWrapper<>();
|
||||||
list.like(StringUtils.isNotEmpty(category),"category",category)
|
list.like(StringUtils.isNotEmpty(category),"category",category)
|
||||||
.like(StringUtils.isNotEmpty(cname),"cname",cname)
|
.like(StringUtils.isNotEmpty(cname),"cname",cname)
|
||||||
.ge(start!=null,"start_time",start).
|
.ge(start!=null,"start_time",start)
|
||||||
le(end!=null,"end_time",end);
|
.le(end!=null,"end_time",end);
|
||||||
|
|
||||||
Page<SarPublicIdea> page = new Page<>(p,size);
|
Page<SarPublicIdea> page = new Page<>(p,size);
|
||||||
IPage<SarPublicIdea> userIPage = sarPublicIdeaDao.selectPage(page, list);
|
IPage<SarPublicIdea> userIPage = sarPublicIdeaDao.selectPage(page, list);
|
||||||
System.out.println("总条数"+userIPage.getTotal());
|
System.out.println("总条数"+userIPage.getTotal());
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.adc.da.slrs.sarStandItems.entity;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //查询dto
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-07-19
|
* @date 2021-07-19
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //分解单dto
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-07-14
|
* @date 2021-07-14
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-07-08
|
* @date 2021-07-08
|
||||||
@@ -31,11 +28,8 @@ public class SarStandItemsDto {
|
|||||||
@ApiModelProperty(value = "责任部门")
|
@ApiModelProperty(value = "责任部门")
|
||||||
private String responsibleUnit;
|
private String responsibleUnit;
|
||||||
|
|
||||||
|
|
||||||
private String responsibleEngineer;
|
private String responsibleEngineer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "SVPPS")
|
@ApiModelProperty(value = "SVPPS")
|
||||||
private String svpps;
|
private String svpps;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //TODO 添加类、接口描述
|
* //时间查询
|
||||||
*
|
*
|
||||||
* @author ZhangZhiYuan
|
* @author ZhangZhiYuan
|
||||||
* @date 2021-07-14
|
* @date 2021-07-14
|
||||||
|
|||||||
+22
-3
@@ -1,13 +1,15 @@
|
|||||||
package com.adc.da.slrs.sarStandItems.service.impl;
|
package com.adc.da.slrs.sarStandItems.service.impl;
|
||||||
|
|
||||||
import com.adc.da.http.Result;
|
|
||||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto;
|
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto;
|
||||||
import com.adc.da.slrs.sarStandItems.entity.*;
|
import com.adc.da.slrs.sarStandItems.entity.*;
|
||||||
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
|
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
|
||||||
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
|
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
|
||||||
import com.adc.da.slrs.sarStandItems.service.ISarStandItemsService;
|
import com.adc.da.slrs.sarStandItems.service.ISarStandItemsService;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.controller.SarStandardsInfoController;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.ActSarItemsEO;
|
import com.adc.da.slrs.sarStandardsInfo.entity.ActSarItemsEO;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||||
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;
|
||||||
@@ -32,11 +34,12 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SarStandItemsDao dao;
|
private SarStandItemsDao dao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysInfoEOService sysInfoEOService;
|
private SysInfoEOService sysInfoEOService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao;
|
private SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao;
|
||||||
|
@Autowired
|
||||||
|
private SarStandardsInfoController sarStandardsInfoController;
|
||||||
|
|
||||||
public List<ActSarItemsEO> queryItemsByList(SarStandItemsEOPage page, String resType){
|
public List<ActSarItemsEO> queryItemsByList(SarStandItemsEOPage page, String resType){
|
||||||
List<SarStandItems> itemsEOList = dao.queryItemsByList(page);
|
List<SarStandItems> itemsEOList = dao.queryItemsByList(page);
|
||||||
@@ -144,7 +147,23 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<LawsDto> selectLawDto(FindStandDto findStandDto) {
|
public IPage<LawsDto> selectLawDto(FindStandDto findStandDto) {
|
||||||
List<String> standId = dao.selectStandId((findStandDto.getPage())-1, findStandDto.getSize());
|
SarStandardsInfoEOPage page = new SarStandardsInfoEOPage();
|
||||||
|
page.setPage(findStandDto.getPage());
|
||||||
|
page.setPageSize(findStandDto.getSize());
|
||||||
|
page.setUserId(null);
|
||||||
|
List<SarStandardsInfo> pageInfo = null;
|
||||||
|
try {
|
||||||
|
pageInfo = sarStandardsInfoController.getSarStandardsInfoPage(page).getData().getList();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
List<String> standId = new ArrayList<>();
|
||||||
|
for (SarStandardsInfo standardsInfo : pageInfo){
|
||||||
|
if (standardsInfo.getAttrInfoCaseMap().get("fbgbjbd")!=null){
|
||||||
|
standId.add(standardsInfo.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<LawsDto> list=new ArrayList<>();
|
List<LawsDto> list=new ArrayList<>();
|
||||||
if (standId==null || standId.size()==0){
|
if (standId==null || standId.size()==0){
|
||||||
list = null;
|
list = null;
|
||||||
|
|||||||
+11
-11
@@ -109,14 +109,14 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
|||||||
@ApiOperation("查询标准信息")
|
@ApiOperation("查询标准信息")
|
||||||
public ResponseMessage queryStandInfo(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize,
|
public ResponseMessage queryStandInfo(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize,
|
||||||
String id){
|
String id){
|
||||||
List<SarStandProjectLibrary> list = sarStandProjectLibraryService.queryStandId(id);
|
// List<SarStandProjectLibrary> list = sarStandProjectLibraryService.queryStandId(id);
|
||||||
List<String> list1 = new ArrayList();
|
// List<String> list1 = new ArrayList();
|
||||||
for(SarStandProjectLibrary s:list){
|
// for(SarStandProjectLibrary s:list){
|
||||||
list1.add(s.getStandId());
|
// list1.add(s.getStandId());
|
||||||
}
|
// }
|
||||||
System.out.println(list1);
|
// System.out.println(list1);
|
||||||
IPage<StandAttrInfoDto> list2 = sarStandProjectLibraryService.queryStandInfo(current,pageSize,id);
|
IPage<StandAttrInfoDto> list = sarStandProjectLibraryService.queryStandInfo(current,pageSize,id);
|
||||||
return Result.success("200",list2);
|
return Result.success("200",list);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -156,7 +156,7 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
|||||||
**/
|
**/
|
||||||
@ApiOperation("导出Excel表")
|
@ApiOperation("导出Excel表")
|
||||||
@GetMapping(value = "/exportStandAttrInfoExcel")
|
@GetMapping(value = "/exportStandAttrInfoExcel")
|
||||||
public void exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto, HttpServletResponse response) throws Exception {
|
public void exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto, HttpServletResponse response,String id) throws Exception {
|
||||||
try {
|
try {
|
||||||
response.setContentType("application/vnd.ms-excel");
|
response.setContentType("application/vnd.ms-excel");
|
||||||
response.setCharacterEncoding("utf-8");
|
response.setCharacterEncoding("utf-8");
|
||||||
@@ -166,9 +166,9 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
|||||||
}
|
}
|
||||||
String fileName = URLEncoder.encode(standAttrInfoExcelDto.getExportName(), "UTF-8").replaceAll("\\+", "%20");
|
String fileName = URLEncoder.encode(standAttrInfoExcelDto.getExportName(), "UTF-8").replaceAll("\\+", "%20");
|
||||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||||
List<StandAttrInfoDto> data= sarStandProjectLibraryService.exportStandAttrInfoExcel(standAttrInfoExcelDto);
|
List<StandAttrInfoDto> data= sarStandProjectLibraryService.exportStandAttrInfoExcel(standAttrInfoExcelDto,id);
|
||||||
// 这里需要设置不关闭流
|
// 这里需要设置不关闭流
|
||||||
EasyExcel.write(response.getOutputStream(), StandAttrInfoDto.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
EasyExcel.write(response.getOutputStream(), StandAttrInfoDto.class).useDefaultStyle(false).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||||
.doWrite(data);
|
.doWrite(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e);
|
System.out.println(e);
|
||||||
|
|||||||
+5
-2
@@ -1,5 +1,6 @@
|
|||||||
package com.adc.da.slrs.sarStandProjectLibrary.entity;
|
package com.adc.da.slrs.sarStandProjectLibrary.entity;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
|
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
|
||||||
@@ -18,11 +19,13 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
@HeadRowHeight(35)
|
@HeadRowHeight(35)
|
||||||
@ColumnWidth(30)
|
@ColumnWidth(30)
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
public class StandAttrInfoDto {
|
public class StandAttrInfoDto {
|
||||||
|
|
||||||
//标准编号
|
|
||||||
@ExcelProperty("标准编号")
|
|
||||||
private String standId;
|
private String standId;
|
||||||
|
//标准编号
|
||||||
|
@ExcelProperty("标准号")
|
||||||
|
private String standNumber;
|
||||||
//中文名称
|
//中文名称
|
||||||
@ExcelProperty("中文名称")
|
@ExcelProperty("中文名称")
|
||||||
private String standName;
|
private String standName;
|
||||||
|
|||||||
+1
-1
@@ -16,6 +16,6 @@ public interface SarStandProjectLibraryService {
|
|||||||
IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId);
|
IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId);
|
||||||
void deleteByIds(List<String> ids);
|
void deleteByIds(List<String> ids);
|
||||||
void batchInsert(@Param("ids") List<StandProjectRelationDto> list);
|
void batchInsert(@Param("ids") List<StandProjectRelationDto> list);
|
||||||
List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto);
|
List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto,String standId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-40
@@ -165,7 +165,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
@Override
|
@Override
|
||||||
public IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId) {
|
public IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId) {
|
||||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||||
wrapper1.select("ID","STAND_NAME","STAND_EN_NAME");
|
wrapper1.select("ID","STAND_NUMBER","STAND_NAME","STAND_EN_NAME");
|
||||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='"+ standId+"'");
|
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='"+ standId+"'");
|
||||||
Page<SarStandardsInfo> page1 = new Page<>(current, pageSize);
|
Page<SarStandardsInfo> page1 = new Page<>(current, pageSize);
|
||||||
IPage<SarStandardsInfo> userIPage1 = SarStandardsInfoDao.selectPage(page1, wrapper1);
|
IPage<SarStandardsInfo> userIPage1 = SarStandardsInfoDao.selectPage(page1, wrapper1);
|
||||||
@@ -186,6 +186,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
for(SarStandardsInfo s:list1){
|
for(SarStandardsInfo s:list1){
|
||||||
StandAttrInfoDto p =new StandAttrInfoDto();
|
StandAttrInfoDto p =new StandAttrInfoDto();
|
||||||
p.setStandId(s.getId());
|
p.setStandId(s.getId());
|
||||||
|
p.setStandNumber(s.getStandNumber());
|
||||||
p.setStandName(s.getStandName());
|
p.setStandName(s.getStandName());
|
||||||
p.setStandEnName(s.getStandEnName());
|
p.setStandEnName(s.getStandEnName());
|
||||||
for (SarStandAttrInfo a:list2){
|
for (SarStandAttrInfo a:list2){
|
||||||
@@ -201,7 +202,6 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
list.add(p);
|
list.add(p);
|
||||||
System.out.println(list);
|
|
||||||
}
|
}
|
||||||
IPage<StandAttrInfoDto> userIPage = new Page<>();
|
IPage<StandAttrInfoDto> userIPage = new Page<>();
|
||||||
userIPage.setRecords(list);
|
userIPage.setRecords(list);
|
||||||
@@ -222,60 +222,37 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto) {
|
public List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto ,String id) {
|
||||||
List<String> ids = standAttrInfoExcelDto.getIds();
|
List<String> ids = standAttrInfoExcelDto.getIds();
|
||||||
List<StandAttrInfoDto> list = new ArrayList<>();
|
List<StandAttrInfoDto> list = new ArrayList<>();
|
||||||
if (ids==null||ids.size()==0){
|
|
||||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
|
||||||
wrapper1.select("ID","STAND_NAME","STAND_EN_NAME");
|
|
||||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID");
|
|
||||||
List<SarStandardsInfo> userList1 = SarStandardsInfoDao.selectList(wrapper1);
|
|
||||||
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
|
|
||||||
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQGJ","ZCCSSRQGJ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
|
|
||||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID");
|
|
||||||
List<SarStandAttrInfo> userList2 = sarStandAttrInfoDao.selectList(wrapper2);
|
|
||||||
for(SarStandardsInfo s:userList1){
|
|
||||||
StandAttrInfoDto p =new StandAttrInfoDto();
|
|
||||||
p.setStandId(s.getId());
|
|
||||||
p.setStandName(s.getStandName());
|
|
||||||
p.setStandEnName(s.getStandEnName());
|
|
||||||
for (SarStandAttrInfo a:userList2){
|
|
||||||
if(s.getId().equals(a.getStandId())){
|
|
||||||
p.setCYCVPPSBM(a.getCycvppsbm());
|
|
||||||
p.setCYCVPPSCN(a.getCycvppscn());
|
|
||||||
p.setSSRQ(a.getSsrq());
|
|
||||||
p.setXCXSSRQGJ(a.getXcxssrqgj());
|
|
||||||
p.setZCCSSRQGJ(a.getZccssrqgj());
|
|
||||||
p.setKCCVPPSBM(a.getKccvppsbm());
|
|
||||||
p.setKCCVPPSCN(a.getKccvppscn());
|
|
||||||
p.setZRBM(a.getZrbm());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
list.add(p);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
String idmis=String.join(",",ids);
|
String idmis=String.join(",",ids);
|
||||||
System.out.println(idmis);
|
System.out.println(idmis);
|
||||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||||
wrapper1.select("ID","STAND_NAME","STAND_EN_NAME");
|
wrapper1.select("ID","STAND_NUMBER","STAND_NAME","STAND_EN_NAME");
|
||||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.stand_id in ("+ idmis +")");
|
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.stand_id in ("+ idmis +") and r.project_id = '"+ id+"'");
|
||||||
List<SarStandardsInfo> userList1 = SarStandardsInfoDao.selectList(wrapper1);
|
List<SarStandardsInfo> userList1 = SarStandardsInfoDao.selectList(wrapper1);
|
||||||
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
|
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
|
||||||
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQGJ","ZCCSSRQGJ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
|
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQGJ","ZCCSSRQGJ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
|
||||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.stand_id in ("+ idmis +")");
|
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.stand_id in ("+ idmis +") and r.project_id = '"+ id+"'");
|
||||||
List<SarStandAttrInfo> userList2 = sarStandAttrInfoDao.selectList(wrapper2);
|
List<SarStandAttrInfo> userList2 = sarStandAttrInfoDao.selectList(wrapper2);
|
||||||
for(SarStandardsInfo s:userList1){
|
for(SarStandardsInfo s:userList1){
|
||||||
StandAttrInfoDto p =new StandAttrInfoDto();
|
StandAttrInfoDto p =new StandAttrInfoDto();
|
||||||
p.setStandId(s.getId());
|
p.setStandNumber(s.getStandNumber());
|
||||||
p.setStandName(s.getStandName());
|
p.setStandName(s.getStandName());
|
||||||
p.setStandEnName(s.getStandEnName());
|
p.setStandEnName(s.getStandEnName());
|
||||||
for (SarStandAttrInfo a:userList2){
|
for (SarStandAttrInfo a:userList2){
|
||||||
if(s.getId().equals(a.getStandId())){
|
if(s.getId().equals(a.getStandId())){
|
||||||
p.setCYCVPPSBM(a.getCycvppsbm());
|
p.setCYCVPPSBM(a.getCycvppsbm());
|
||||||
p.setCYCVPPSCN(a.getCycvppscn());
|
p.setCYCVPPSCN(a.getCycvppscn());
|
||||||
p.setSSRQ(a.getSsrq());
|
if (a.getSsrq()!=null){
|
||||||
p.setXCXSSRQGJ(a.getXcxssrqgj());
|
p.setSSRQ(a.getSsrq().substring(0,10));
|
||||||
p.setZCCSSRQGJ(a.getZccssrqgj());
|
}
|
||||||
|
if (a.getXcxssrqgj()!=null){
|
||||||
|
p.setXCXSSRQGJ(a.getXcxssrqgj().substring(0,10));
|
||||||
|
}
|
||||||
|
if (a.getZccssrqgj()!=null){
|
||||||
|
p.setZCCSSRQGJ(a.getZccssrqgj().substring(0,10));
|
||||||
|
}
|
||||||
p.setKCCVPPSBM(a.getKccvppsbm());
|
p.setKCCVPPSBM(a.getKccvppsbm());
|
||||||
p.setKCCVPPSCN(a.getKccvppscn());
|
p.setKCCVPPSCN(a.getKccvppscn());
|
||||||
p.setZRBM(a.getZrbm());
|
p.setZRBM(a.getZrbm());
|
||||||
@@ -283,7 +260,6 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
}
|
}
|
||||||
list.add(p);
|
list.add(p);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -151,7 +151,9 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
|||||||
page.setAdvanceSearchStr(null);
|
page.setAdvanceSearchStr(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
page.setUserId(LoginUserUtil.getUserId());
|
if(page.getUserId() == null || page.getUserId().equals("")){
|
||||||
|
page.setUserId(LoginUserUtil.getUserId());
|
||||||
|
}
|
||||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page);
|
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page);
|
||||||
return Result.success(getPageInfo(page.getPager(), rows));
|
return Result.success(getPageInfo(page.getPager(), rows));
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-10
@@ -185,16 +185,23 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
*/
|
*/
|
||||||
public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
|
public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
|
||||||
//查询当前登录人角色拥有权限的菜单
|
//查询当前登录人角色拥有权限的菜单
|
||||||
List<String> getMenuIdList=tsUserService.getResourceId(new TsResource());
|
if(page.getMenuId() != null ){
|
||||||
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
|
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
qw.eq("ID",page.getMenuId());
|
||||||
page.setMenuRoleList(getMenuIdList);
|
qw.isNull("PARENT_ID");
|
||||||
} else {
|
List<TsResource> children = iTsResourceService.list(qw);
|
||||||
page.setMenuRoleList(null);
|
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||||
}
|
List<String> getMenuIdList = tsUserService.getResourceId(new TsResource());
|
||||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||||
if (ids != null && !ids.isEmpty()) {
|
page.setMenuRoleList(getMenuIdList);
|
||||||
page.setMenuAllChildrenIdList(ids);
|
} else {
|
||||||
|
page.setMenuRoleList(null);
|
||||||
|
}
|
||||||
|
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||||
|
if (ids != null && !ids.isEmpty()) {
|
||||||
|
page.setMenuAllChildrenIdList(ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Integer rowCount = dao.getSarStandardsInfoCount(page);
|
Integer rowCount = dao.getSarStandardsInfoCount(page);
|
||||||
page.getPager().setRowCount(rowCount);
|
page.getPager().setRowCount(rowCount);
|
||||||
|
|||||||
@@ -30,8 +30,9 @@ public class FieldConvertUtil {
|
|||||||
public static String exportBaseFieldNames = "标准体系,是否纳入认证清单,标准性质,标准类别,标准编号,标准年份,中文名称,英文名称," +
|
public static String exportBaseFieldNames = "标准体系,是否纳入认证清单,标准性质,标准类别,标准编号,标准年份,中文名称,英文名称," +
|
||||||
"文本状态,发布日期"; // 导出基础表字段 //删除 实施日期 2021-05-28
|
"文本状态,发布日期"; // 导出基础表字段 //删除 实施日期 2021-05-28
|
||||||
|
|
||||||
public static String exportBaseFieldNamesForeign = "重要度,标准类别,标准编号,标准年份/系列,中文名称,英文名称," +
|
public static String exportBaseFieldNamesForeign = "标准类别,标准编号,标准年份,中文名称,英文名称," +
|
||||||
"标准状态,发布日期,文本说明"; // 导出基础表字段
|
"文本状态,发布日期,文本说明,是否纳入认证清单,体系类别,标签,适用产品线,适用认证,能源类型,责任工程师," +
|
||||||
|
"关联文件,发布稿,增补件,勘误件,草案"; // 导出基础表字段
|
||||||
|
|
||||||
public static String exportAttrFieldNamesInland = "归口管理部门,发布机构,工作组信息,我司参与深度,适用车辆类型,要求类型," +
|
public static String exportAttrFieldNamesInland = "归口管理部门,发布机构,工作组信息,我司参与深度,适用车辆类型,要求类型," +
|
||||||
"标签,发布稿(必读),增补件(必读),报批稿,送审稿,征求意见稿,草案,相关资料,新车型实施日期(文本),在产车实施日期(文本)," +
|
"标签,发布稿(必读),增补件(必读),报批稿,送审稿,征求意见稿,草案,相关资料,新车型实施日期(文本),在产车实施日期(文本)," +
|
||||||
|
|||||||
+8
-3
@@ -4,14 +4,17 @@
|
|||||||
|
|
||||||
<select id="selectLawsById" parameterType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarFindDto" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
<select id="selectLawsById" parameterType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarFindDto" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||||
SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,
|
SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,
|
||||||
b.CLLX as typeApplicable,dicstandSort.DIC_TYPE_NAME as standSortShow ,a.STAND_YEAR as standYear
|
b.CLLX as typeApplicable,dicstandSort.DIC_TYPE_NAME as standSortShow ,a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType
|
||||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||||
a.ID = b.STAND_ID left join TS_DICTYPE dicstandSort on (dicstandSort.dic_type_code = a.stand_sort and
|
a.ID = b.STAND_ID left join TS_DICTYPE dicstandSort on (dicstandSort.dic_type_code = a.stand_sort and
|
||||||
dicstandSort.dic_id is not null and dicstandSort.valid_flag = 0 and dicstandSort.PARENT_ID is null)
|
dicstandSort.dic_id is not null and dicstandSort.valid_flag = 0 and dicstandSort.PARENT_ID is null)
|
||||||
<where>
|
<where>
|
||||||
<if test="sarFindDto.standName != null">
|
<if test="sarFindDto.standName != null">
|
||||||
(a.STAND_NUMBER LIKE concat ('%',#{sarFindDto.standName,jdbcType=VARCHAR},'%')
|
(a.STAND_NUMBER LIKE concat ('%',#{sarFindDto.standName,jdbcType=VARCHAR},'%')
|
||||||
or a.STAND_NAME LIKE concat ('%',#{sarFindDto.standName,jdbcType=VARCHAR},'%'))
|
or a.STAND_NAME LIKE concat ('%',#{sarFindDto.standName,jdbcType=VARCHAR},'%')
|
||||||
|
or a.STAND_YEAR LIKE concat ('%',#{sarFindDto.standName,jdbcType=VARCHAR},'%')
|
||||||
|
or dicstandSort.DIC_TYPE_NAME LIKE concat ('%',#{sarFindDto.standName,jdbcType=VARCHAR},'%')
|
||||||
|
)
|
||||||
and
|
and
|
||||||
</if>
|
</if>
|
||||||
<if test="sarFindDto.standEnName != null">
|
<if test="sarFindDto.standEnName != null">
|
||||||
@@ -94,9 +97,11 @@
|
|||||||
WHERE
|
WHERE
|
||||||
b.sort_key = 1
|
b.sort_key = 1
|
||||||
AND a.stand_id = #{standId}
|
AND a.stand_id = #{standId}
|
||||||
|
AND (a.putTime is not NULL
|
||||||
|
AND a.xcxssrq is not NULL
|
||||||
|
AND a.zccssrq is not NULL)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertList">
|
<insert id="insertList">
|
||||||
INSERT INTO sar_laws_attr_detailed_list ( id, number, detailed_list_id, stand_id ,putTime,xcxssrq,zccssrq) VALUES
|
INSERT INTO sar_laws_attr_detailed_list ( id, number, detailed_list_id, stand_id ,putTime,xcxssrq,zccssrq) VALUES
|
||||||
<foreach collection ="sarLawsAttrDetailedLists" item="list" separator =",">
|
<foreach collection ="sarLawsAttrDetailedLists" item="list" separator =",">
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
<result column="remarks" property="remarks" />
|
<result column="remarks" property="remarks" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- SAR_MENU table all fields -->
|
<!-- SAR_MENU table all fields -->
|
||||||
<sql id="Base_Column_List" >
|
<sql id="Base_Column_List" >
|
||||||
parent_id, menu_name, sor_divide, id, modify_time, creation_time, valid_flag, display_seq, parent_ids, remarks
|
parent_id, menu_name, sor_divide, id, modify_time, creation_time, valid_flag, display_seq, parent_ids, remarks
|
||||||
@@ -69,6 +71,12 @@
|
|||||||
</trim>
|
</trim>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insertTsRoleResource" parameterType="java.util.Map">
|
||||||
|
INSERT INTO ts_role_resource
|
||||||
|
VALUES(#{roleId},#{resourceId} )
|
||||||
|
</insert>
|
||||||
|
|
||||||
<!-- 插入记录 -->
|
<!-- 插入记录 -->
|
||||||
<insert id="insert" parameterType="com.adc.da.slrs.sarResource.entity.TsResource" >
|
<insert id="insert" parameterType="com.adc.da.slrs.sarResource.entity.TsResource" >
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||||
|
|||||||
@@ -77,6 +77,28 @@
|
|||||||
<artifactId>dom4j</artifactId>
|
<artifactId>dom4j</artifactId>
|
||||||
<version>2.0.1</version>
|
<version>2.0.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- pdf -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.lowagie</groupId>
|
||||||
|
<artifactId>itext</artifactId>
|
||||||
|
<version>2.1.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.lowagie</groupId>
|
||||||
|
<artifactId>itextasian</artifactId>
|
||||||
|
<version>2.1.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.itextpdf</groupId>
|
||||||
|
<artifactId>itextpdf</artifactId>
|
||||||
|
<version>5.5.9</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.itextpdf</groupId>
|
||||||
|
<artifactId>itext-asian</artifactId>
|
||||||
|
<version>5.2.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
package com.adc.da.att.controller;
|
package com.adc.da.att.controller;
|
||||||
|
|
||||||
|
import com.adc.da.att.dao.UserDao;
|
||||||
import com.adc.da.att.entity.AttFileEO;
|
import com.adc.da.att.entity.AttFileEO;
|
||||||
|
import com.adc.da.att.entity.TsUser;
|
||||||
import com.adc.da.att.service.IAttFileEOService;
|
import com.adc.da.att.service.IAttFileEOService;
|
||||||
import com.adc.da.att.vo.AttFileVo;
|
import com.adc.da.att.vo.AttFileVo;
|
||||||
import com.adc.da.file.store.IFileStore;
|
import com.adc.da.file.store.IFileStore;
|
||||||
import com.adc.da.http.ResponseMessage;
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
|
import com.adc.da.sys.entity.UserEO;
|
||||||
import com.adc.da.util.MD5Util;
|
import com.adc.da.util.MD5Util;
|
||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
|
import com.adc.da.util.WaterMarkUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
@@ -46,6 +50,9 @@ public class AttFileEOController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IFileStore iFileStore;
|
private IFileStore iFileStore;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserDao userDao;
|
||||||
|
|
||||||
@Value("${file.path}")
|
@Value("${file.path}")
|
||||||
private String filePath;//文件存储路径
|
private String filePath;//文件存储路径
|
||||||
|
|
||||||
@@ -249,7 +256,7 @@ public class AttFileEOController {
|
|||||||
@ApiOperation(value = "|File|下载文件加水印")
|
@ApiOperation(value = "|File|下载文件加水印")
|
||||||
@GetMapping("/downloadFileForSarWaterMark")
|
@GetMapping("/downloadFileForSarWaterMark")
|
||||||
// @RequiresPermissions("sys:file:downloadFileForSar")
|
// @RequiresPermissions("sys:file:downloadFileForSar")
|
||||||
public void downloadFileForSarWaterMark(String fileId, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
public void downloadFileForSarWaterMark(String userId,String fileId, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||||
AttFileEO attFileEO = attFileEOService.getFileInfo(fileId);
|
AttFileEO attFileEO = attFileEOService.getFileInfo(fileId);
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
OutputStream os = null;
|
OutputStream os = null;
|
||||||
@@ -265,24 +272,35 @@ public class AttFileEOController {
|
|||||||
}
|
}
|
||||||
String waterFilePath = newFilePath + attFileEO.getOldFileName();
|
String waterFilePath = newFilePath + attFileEO.getOldFileName();
|
||||||
// 添加水印
|
// 添加水印
|
||||||
String waterContent = "";
|
String userMsg = "";
|
||||||
// String userId = LoginUserUtil.getUserId();
|
TsUser tsUser = userDao.selectById(userId);
|
||||||
// String userMsg = "";
|
if (tsUser != null) {
|
||||||
// UserEO userEO = userEOService.selectByPrimaryKey(userId);
|
userMsg = tsUser.getUname() + ",";
|
||||||
// if (userEO != null) {
|
if (StringUtils.isNotEmpty(tsUser.getWorkNum())) {
|
||||||
// userMsg = userEO.getUname() + ",";
|
userMsg += tsUser.getWorkNum() + ",";
|
||||||
// if (StringUtils.isNotEmpty(userEO.getWorkNum())) {
|
}
|
||||||
// userMsg += userEO.getWorkNum() + ",";
|
}
|
||||||
// }
|
// SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm");//设置日期格式
|
||||||
// }
|
// String date = df.format(new Date());
|
||||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm");//设置日期格式
|
String waterContent = userMsg ;
|
||||||
String date = df.format(new Date());
|
|
||||||
// waterContent = userMsg + date;
|
|
||||||
//2020年9月5日 去掉水印处理
|
//2020年9月5日 去掉水印处理
|
||||||
// WaterMarkUtil.waterMark(oldFilePath,waterFilePath,waterContent);
|
//2021年7月25日要求下载生成水印
|
||||||
|
WaterMarkUtil.waterMark(oldFilePath,waterFilePath,waterContent);
|
||||||
response.setHeader("Content-Disposition", "attachment;filename=\""+fileOldName+"\"");
|
response.setHeader("Content-Disposition", "attachment;filename=\""+fileOldName+"\"");
|
||||||
response.setContentType("application/octet-stream");
|
response.setContentType("application/octet-stream");
|
||||||
File file = new File(filePath+attFileEO.getFilePath()+attFileEO.getFileName());
|
|
||||||
|
String downloadFilePath="";
|
||||||
|
String fileName=attFileEO.getFileName();
|
||||||
|
String suffix=fileName.substring(fileName.lastIndexOf(".")+1);
|
||||||
|
//只能在pdf中添加水印,
|
||||||
|
//非pdf文件直接下载原文件
|
||||||
|
if (suffix.equals("pdf")){
|
||||||
|
downloadFilePath=waterFilePath;
|
||||||
|
}else {
|
||||||
|
downloadFilePath=oldFilePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
File file = new File(downloadFilePath);
|
||||||
is = new FileInputStream(file);
|
is = new FileInputStream(file);
|
||||||
os = response.getOutputStream();
|
os = response.getOutputStream();
|
||||||
IOUtils.copy(is, os);
|
IOUtils.copy(is, os);
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.adc.da.att.dao;
|
||||||
|
|
||||||
|
import com.adc.da.att.entity.TsUser;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
public interface UserDao extends BaseMapper<TsUser> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.adc.da.att.entity;
|
||||||
|
|
||||||
|
import com.adc.da.base.entity.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TsUser extends BaseEntity implements Serializable {
|
||||||
|
@TableId
|
||||||
|
private String usid;
|
||||||
|
@TableField
|
||||||
|
private String uname;
|
||||||
|
@TableField
|
||||||
|
private String workNum;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+1
-1
@@ -93,7 +93,7 @@ public class PersonCollectEOController extends BaseController<TsPersonCollect> {
|
|||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "|PersonCollectEO|修改")
|
@ApiOperation(value = "|PersonCollectEO|修改")
|
||||||
@PutMapping(consumes = APPLICATION_JSON_UTF8_VALUE)
|
@PutMapping(consumes = APPLICATION_JSON_UTF8_VALUE,value = "/updatePersonCollect")
|
||||||
// @RequiresPermissions("person:personCollect:update")
|
// @RequiresPermissions("person:personCollect:update")
|
||||||
public ResponseMessage<TsPersonCollect> update(@RequestBody TsPersonCollect tsPersonCollect) throws Exception {
|
public ResponseMessage<TsPersonCollect> update(@RequestBody TsPersonCollect tsPersonCollect) throws Exception {
|
||||||
tsPersonCollect.setModifyTime(new Date());
|
tsPersonCollect.setModifyTime(new Date());
|
||||||
|
|||||||
Reference in New Issue
Block a user