Merge branch 'develop_master' into 'dev_wangxiahui'
Develop master See merge request LiuChao/foton-slrs-system-rest!185
This commit is contained in:
@@ -17,6 +17,9 @@ import java.util.Set;
|
|||||||
//@FeignClient(value = "shan6")
|
//@FeignClient(value = "shan6")
|
||||||
public interface workFlowFeignClient {
|
public interface workFlowFeignClient {
|
||||||
|
|
||||||
|
@RequestMapping(value = "/bat-wkflow/task/get_verify_by_instance",method = RequestMethod.GET)
|
||||||
|
long get_verify_by_instance(@RequestParam("taskId") String taskId, @RequestParam("pId") String pId);
|
||||||
|
|
||||||
@RequestMapping(value = "/bat-wkflow/activiti_define_start_user",method = RequestMethod.GET)
|
@RequestMapping(value = "/bat-wkflow/activiti_define_start_user",method = RequestMethod.GET)
|
||||||
Wrapper<String> activiti_define_start(@RequestParam("id") String id, @RequestParam("userId") String userId, @RequestParam("bpnId") String bpnId);
|
Wrapper<String> activiti_define_start(@RequestParam("id") String id, @RequestParam("userId") String userId, @RequestParam("bpnId") String bpnId);
|
||||||
|
|
||||||
@@ -374,7 +377,7 @@ public interface workFlowFeignClient {
|
|||||||
Wrapper<String> findPrcNumByPid(@RequestParam("pId") String pId);
|
Wrapper<String> findPrcNumByPid(@RequestParam("pId") String pId);
|
||||||
|
|
||||||
@RequestMapping(value = "/bat-wkflow/findPrcNameByPrcNum",method = RequestMethod.GET)
|
@RequestMapping(value = "/bat-wkflow/findPrcNameByPrcNum",method = RequestMethod.GET)
|
||||||
Wrapper<String> findPrcNameByPrcNum(@RequestParam("prcNum") String prcNum);
|
Wrapper<String> findPrcNameByPrcNum(@RequestParam("prcNum") String prcNum);
|
||||||
|
|
||||||
@RequestMapping(value = "/bat-wkflow/getStandCode",method = RequestMethod.GET)
|
@RequestMapping(value = "/bat-wkflow/getStandCode",method = RequestMethod.GET)
|
||||||
Set<String> getStandCode();
|
Set<String> getStandCode();
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ public class workFlowFeignClientImpl {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IUserEOService userEOService;
|
private IUserEOService userEOService;
|
||||||
|
|
||||||
|
public long get_verify_by_instance(@RequestParam("taskId") String taskId, @RequestParam("pId") String pId){
|
||||||
|
long stringWrapper = workFlowFeignClient.get_verify_by_instance(taskId,pId);
|
||||||
|
return stringWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
public ResponseMessage activiti_define_start(@RequestParam("Id") String Id, @RequestParam("userId") String userId, @RequestParam("bpnId") String bpnId){
|
public ResponseMessage activiti_define_start(@RequestParam("Id") String Id, @RequestParam("userId") String userId, @RequestParam("bpnId") String bpnId){
|
||||||
Wrapper<String> stringWrapper = workFlowFeignClient.activiti_define_start(Id,userId,bpnId);
|
Wrapper<String> stringWrapper = workFlowFeignClient.activiti_define_start(Id,userId,bpnId);
|
||||||
return Result.success(stringWrapper.getResult());
|
return Result.success(stringWrapper.getResult());
|
||||||
|
|||||||
@@ -51,6 +51,12 @@ public class WorkFlowController {
|
|||||||
// @Autowired
|
// @Autowired
|
||||||
// private ExportExcelMapper exportExcelMapper;
|
// private ExportExcelMapper exportExcelMapper;
|
||||||
|
|
||||||
|
@ApiOperation(value = "流程实例明细验证是否完成")
|
||||||
|
@GetMapping("/get_verify_by_instance")
|
||||||
|
public long activiti_define_start1(@RequestParam("taskId") String taskId, @RequestParam("pId") String pId){
|
||||||
|
return workFlowFeignClient.get_verify_by_instance(taskId,pId);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "导出excel")
|
@ApiOperation(value = "导出excel")
|
||||||
@PostMapping("/export_excel")
|
@PostMapping("/export_excel")
|
||||||
public void exportExcel(@RequestBody ExportExcelEO exportExcelEO, HttpServletResponse response, HttpServletRequest request) throws IOException {
|
public void exportExcel(@RequestBody ExportExcelEO exportExcelEO, HttpServletResponse response, HttpServletRequest request) throws IOException {
|
||||||
|
|||||||
+11
-3
@@ -23,20 +23,28 @@
|
|||||||
<version>3.0.0</version>
|
<version>3.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- openOffice 和 jobconverter-->
|
<!-- openOffice 和 jobconverter-->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.artofsolving</groupId>
|
||||||
|
<artifactId>jodconverter</artifactId>
|
||||||
|
<scope>system</scope>
|
||||||
|
<version>2.2.2</version>
|
||||||
|
<systemPath>${basedir}/src/main/lib/jodconverter-2.2.2.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jodconverter</groupId>
|
<groupId>org.jodconverter</groupId>
|
||||||
<artifactId>jodconverter-core</artifactId>
|
<artifactId>jodconverter-core</artifactId>
|
||||||
<version>4.2.2</version>
|
<version>4.3.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jodconverter</groupId>
|
<groupId>org.jodconverter</groupId>
|
||||||
<artifactId>jodconverter-spring-boot-starter</artifactId>
|
<artifactId>jodconverter-spring-boot-starter</artifactId>
|
||||||
<version>4.2.2</version>
|
<version>4.3.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jodconverter</groupId>
|
<groupId>org.jodconverter</groupId>
|
||||||
<artifactId>jodconverter-local</artifactId>
|
<artifactId>jodconverter-local</artifactId>
|
||||||
<version>4.2.2</version>
|
<version>4.3.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- openOffice end-->
|
<!-- openOffice end-->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
package com.adc.da.convert.common;
|
package com.adc.da.convert.common;
|
||||||
|
|
||||||
|
import com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection;
|
||||||
|
import com.artofsolving.jodconverter.openoffice.converter.StreamOpenOfficeDocumentConverter;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.jodconverter.DocumentConverter;
|
import org.jodconverter.core.DocumentConverter;
|
||||||
import org.jodconverter.JodConverter;
|
import org.jodconverter.core.office.OfficeException;
|
||||||
import org.jodconverter.OfficeDocumentConverter;
|
import org.jodconverter.core.office.OfficeManager;
|
||||||
import org.jodconverter.document.DefaultDocumentFormatRegistry;
|
import org.jodconverter.core.office.OfficeUtils;
|
||||||
import org.jodconverter.office.*;
|
import org.jodconverter.local.JodConverter;
|
||||||
|
import org.jodconverter.local.office.LocalOfficeManager;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.net.ConnectException;
|
||||||
|
|
||||||
public class DocConverterPdf {
|
public class DocConverterPdf {
|
||||||
|
|
||||||
@@ -75,6 +79,35 @@ public class DocConverterPdf {
|
|||||||
*/
|
*/
|
||||||
private static final int openOfficePort = 8100;
|
private static final int openOfficePort = 8100;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param input 初始文件的路径,例:C:\Users\...\Desktop\test\1.doc
|
||||||
|
* @param output 转换后的存储路径,例:C:\Users\...\Desktop\test\
|
||||||
|
*/
|
||||||
|
public void convert(File input , File output){
|
||||||
|
|
||||||
|
if (!input.exists()){
|
||||||
|
System.out.println("源文件不存在");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SocketOpenOfficeConnection connection = new SocketOpenOfficeConnection("0.0.0.0", 8100);
|
||||||
|
// SocketOpenOfficeConnection connection = new SocketOpenOfficeConnection("10.10.66.176", 8100);
|
||||||
|
try {
|
||||||
|
connection.connect();
|
||||||
|
System.out.println("获取连接成功!");
|
||||||
|
} catch (ConnectException e) {
|
||||||
|
System.out.println("获取连接失败!");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
// OpenOfficeDocumentConverter converter = new OpenOfficeDocumentConverter(connection);
|
||||||
|
StreamOpenOfficeDocumentConverter converter = new StreamOpenOfficeDocumentConverter(connection);
|
||||||
|
System.out.println("开始转换!");
|
||||||
|
converter.convert(input, output);
|
||||||
|
System.out.println("转换成功!");
|
||||||
|
System.out.println("关闭连接!");
|
||||||
|
connection.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转化文档
|
* 转化文档
|
||||||
* @param input
|
* @param input
|
||||||
@@ -113,7 +146,7 @@ public class DocConverterPdf {
|
|||||||
try {
|
try {
|
||||||
// in = new FileInputStream(docFile);
|
// in = new FileInputStream(docFile);
|
||||||
// out = new FileOutputStream(convertPdfFile);
|
// out = new FileOutputStream(convertPdfFile);
|
||||||
convertFile(docFile,convertPdfFile);
|
convert(docFile,convertPdfFile);
|
||||||
// converter.convert(in).as(DefaultDocumentFormatRegistry.getFormatByMediaType(filesType)).
|
// converter.convert(in).as(DefaultDocumentFormatRegistry.getFormatByMediaType(filesType)).
|
||||||
// to(out).as(DefaultDocumentFormatRegistry.PDF);
|
// to(out).as(DefaultDocumentFormatRegistry.PDF);
|
||||||
// close the connection
|
// close the connection
|
||||||
|
|||||||
+2
-6
@@ -84,13 +84,9 @@ public class SearchCenterController extends BaseController<Map<String, Object>>
|
|||||||
if (StringUtils.isAlphanumericSpace(searchInfoEO.getSelectIndex())) {
|
if (StringUtils.isAlphanumericSpace(searchInfoEO.getSelectIndex())) {
|
||||||
if(elasticsearchService.isIndexExist(searchInfoEO.getSelectIndex())){
|
if(elasticsearchService.isIndexExist(searchInfoEO.getSelectIndex())){
|
||||||
if("fulltextserch".equals(searchInfoEO.getSelectIndex()) || "fulltextserch"== searchInfoEO.getSelectIndex()){
|
if("fulltextserch".equals(searchInfoEO.getSelectIndex()) || "fulltextserch"== searchInfoEO.getSelectIndex()){
|
||||||
Pattern pattern = Pattern.compile("^[a-zA-Z]+\\s[0-9a-zA-Z\\.\\(\\(\\)\\)\\-\\s]+$");
|
Pattern pattern = Pattern.compile("^[0-9a-zA-Z\\.\\(\\(\\)\\)\\s\\/\\-]+$");
|
||||||
if (null != searchInfoEO.getSelectValue() && StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
if (null != searchInfoEO.getSelectValue() && StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||||
if (pattern.matcher(searchInfoEO.getSelectValue()).matches()) {
|
result = searchCenterService.searchSarBykeyAndHighLight(searchInfoEO);
|
||||||
result = searchCenterService.searchSarBykeyAndHighLightNumber(searchInfoEO);
|
|
||||||
}else {
|
|
||||||
result = searchCenterService.searchSarBykeyAndHighLight(searchInfoEO);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
result = searchCenterService.searchSarBykeyAndHighLight(searchInfoEO);
|
result = searchCenterService.searchSarBykeyAndHighLight(searchInfoEO);
|
||||||
}
|
}
|
||||||
|
|||||||
+96
-23
@@ -156,7 +156,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
boolQueryShould.should(QueryBuilders.wildcardQuery("standSort.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
boolQueryShould.should(QueryBuilders.wildcardQuery("standSort.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
||||||
.should(QueryBuilders.wildcardQuery("stand_code.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
.should(QueryBuilders.wildcardQuery("stand_code.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
||||||
.should(QueryBuilders.wildcardQuery("standYear.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
.should(QueryBuilders.wildcardQuery("standYear.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
||||||
.should(QueryBuilders.wildcardQuery("standName.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
.should(QueryBuilders.wildcardQuery("stand_name.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
||||||
.should(QueryBuilders.wildcardQuery("standEnName.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
.should(QueryBuilders.wildcardQuery("standEnName.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
||||||
.should(QueryBuilders.wildcardQuery("textStatusBuss.keyword", "*"+searchInfoEO.getSelectValue()+"*"));
|
.should(QueryBuilders.wildcardQuery("textStatusBuss.keyword", "*"+searchInfoEO.getSelectValue()+"*"));
|
||||||
if (isRqFormat(searchInfoEO.getSelectValue())) {
|
if (isRqFormat(searchInfoEO.getSelectValue())) {
|
||||||
@@ -178,6 +178,12 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
if (StringUtils.isNotBlank(searchInfoEO.getStandType())) {
|
if (StringUtils.isNotBlank(searchInfoEO.getStandType())) {
|
||||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standType.keyword", "*"+searchInfoEO.getStandType()+"*"));
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standType.keyword", "*"+searchInfoEO.getStandType()+"*"));
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(searchInfoEO.getStandSort())) {
|
||||||
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("numbershow.keyword", "*"+searchInfoEO.getStandSort()+" "+"*"));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(searchInfoEO.getTextStatus())) {
|
||||||
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("textStatus.keyword", "*"+searchInfoEO.getTextStatus()+"*"));
|
||||||
|
}
|
||||||
boolQueryBuilder.must(boolQueryShould);
|
boolQueryBuilder.must(boolQueryShould);
|
||||||
}else {
|
}else {
|
||||||
boolQueryBuilder.must(boolQueryShould);
|
boolQueryBuilder.must(boolQueryShould);
|
||||||
@@ -245,7 +251,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(searchInfoEO.getCYSD() != null && StringUtils.isNotBlank(searchInfoEO.getCYSD())){
|
if(searchInfoEO.getCYSD() != null && StringUtils.isNotBlank(searchInfoEO.getCYSD())){
|
||||||
List<String> fieldList = Arrays.asList(searchInfoEO.getCYSD() .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
List<String> fieldList = Arrays.asList(searchInfoEO.getCYSD().split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||||
JSONArray array= JSONArray.parseArray(JSON.toJSONString(fieldList));
|
JSONArray array= JSONArray.parseArray(JSON.toJSONString(fieldList));
|
||||||
collectAttrMap.put("CYSD",array);
|
collectAttrMap.put("CYSD",array);
|
||||||
}
|
}
|
||||||
@@ -287,15 +293,60 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!fields.isEmpty()){
|
if(!fields.isEmpty()){
|
||||||
for (String str : fields) {
|
if(fields.size() > 1){
|
||||||
boolQueryBuilderMust.must(QueryBuilders.wildcardQuery(keyWordField, "*"+str+"*"));
|
BoolQueryBuilder boolQueryBuilderShould = new BoolQueryBuilder();
|
||||||
|
fields.forEach(s -> {
|
||||||
|
boolQueryBuilderShould.should(QueryBuilders.wildcardQuery(keyWordField, "*"+s+"*"));
|
||||||
|
});
|
||||||
|
boolQueryBuilder.must(boolQueryBuilderShould);
|
||||||
|
}else {
|
||||||
|
boolQueryBuilderMust.must(QueryBuilders.wildcardQuery(keyWordField, "*"+fields.get(0)+"*"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotEmpty(searchInfoEO.getSelectValue())) {
|
if(StringUtils.isNotEmpty(searchInfoEO.getSelectValue())) {
|
||||||
boolQueryBuilder.should(boolQueryBuilderMust);
|
boolQueryBuilder.should(boolQueryBuilderMust);
|
||||||
|
if(searchInfoEO.getQCDW() != null && StringUtils.isNotBlank(searchInfoEO.getQCDW())){
|
||||||
|
List<String> list = Arrays.asList(searchInfoEO.getQCDW().split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||||
|
if(list.size() > 1){
|
||||||
|
BoolQueryBuilder boolQueryBuilderShould = new BoolQueryBuilder();
|
||||||
|
list.forEach(s -> {
|
||||||
|
boolQueryBuilderShould.should(QueryBuilders.wildcardQuery("QCDW.keyword", "*"+s+"*"));
|
||||||
|
});
|
||||||
|
boolQueryBuilder.must(boolQueryBuilderShould);
|
||||||
|
}else {
|
||||||
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("QCDW.keyword", "*"+searchInfoEO.getQCDW()+"*"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(searchInfoEO.getCYSD() != null && StringUtils.isNotBlank(searchInfoEO.getCYSD())){
|
||||||
|
List<String> list = Arrays.asList(searchInfoEO.getCYSD().split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||||
|
if(list.size() > 1){
|
||||||
|
BoolQueryBuilder boolQueryBuilderShould = new BoolQueryBuilder();
|
||||||
|
list.forEach(s -> {
|
||||||
|
boolQueryBuilderShould.should(QueryBuilders.wildcardQuery("CYSD.keyword", "*"+s+"*"));
|
||||||
|
});
|
||||||
|
boolQueryBuilder.must(boolQueryBuilderShould);
|
||||||
|
}else {
|
||||||
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("CYSD.keyword", "*"+searchInfoEO.getCYSD()+"*"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(searchInfoEO.getCLLX() != null && StringUtils.isNotBlank(searchInfoEO.getCLLX())){
|
||||||
|
List<String> list = Arrays.asList(searchInfoEO.getCLLX().split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||||
|
if(list.size() > 1){
|
||||||
|
BoolQueryBuilder boolQueryBuilderShould = new BoolQueryBuilder();
|
||||||
|
list.forEach(s -> {
|
||||||
|
boolQueryBuilderShould.should(QueryBuilders.wildcardQuery("CLLX.keyword", "*"+s+"*"));
|
||||||
|
});
|
||||||
|
boolQueryBuilder.must(boolQueryBuilderShould);
|
||||||
|
}else {
|
||||||
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("CLLX.keyword", "*"+searchInfoEO.getCLLX()+"*"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
boolQueryBuilder.must(boolQueryBuilderMust);
|
boolQueryBuilder.must(boolQueryBuilderMust);
|
||||||
}
|
}
|
||||||
@@ -312,7 +363,16 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standType.keyword", "*"+searchInfoEO.getStandType()+"*"));
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standType.keyword", "*"+searchInfoEO.getStandType()+"*"));
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(searchInfoEO.getStandSort())) {
|
if (StringUtils.isNotBlank(searchInfoEO.getStandSort())) {
|
||||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standSort.keyword", "*"+searchInfoEO.getStandSort()+"*"));
|
List<String> list = Arrays.asList(searchInfoEO.getStandSort().split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||||
|
if(list.size() > 1){
|
||||||
|
BoolQueryBuilder boolQueryBuilderShould = new BoolQueryBuilder();
|
||||||
|
list.forEach(s -> {
|
||||||
|
boolQueryBuilderShould.should(QueryBuilders.wildcardQuery("numbershow.keyword", "*"+s+" "+"*"));
|
||||||
|
});
|
||||||
|
boolQueryBuilder.must(boolQueryBuilderShould);
|
||||||
|
}else {
|
||||||
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("numbershow.keyword", "*"+searchInfoEO.getStandSort()+" "+"*"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(searchInfoEO.getStandNumber())) {
|
if (StringUtils.isNotBlank(searchInfoEO.getStandNumber())) {
|
||||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standNumber.keyword", "*"+searchInfoEO.getStandNumber()+"*"));
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standNumber.keyword", "*"+searchInfoEO.getStandNumber()+"*"));
|
||||||
@@ -571,20 +631,29 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standSort.keyword", "*"+searchInfoEO.getStandSort()+"*"));
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standSort.keyword", "*"+searchInfoEO.getStandSort()+"*"));
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(searchInfoEO.getStandCode())) {
|
if (StringUtils.isNotBlank(searchInfoEO.getStandCode())) {
|
||||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standCode.keyword", "*"+searchInfoEO.getStandCode()+"*"));
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standNumber.keyword", "*"+searchInfoEO.getStandCode()+"*"));
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(searchInfoEO.getStandYear())) {
|
if (StringUtils.isNotBlank(searchInfoEO.getStandYear())) {
|
||||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standYear.keyword", "*"+searchInfoEO.getStandYear()+"*"));
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standYear.keyword", "*"+searchInfoEO.getStandYear()+"*"));
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(searchInfoEO.getStandName())) {
|
if (StringUtils.isNotBlank(searchInfoEO.getStandName())) {
|
||||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standName.keyword", "*"+searchInfoEO.getStandName()+"*"));
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("stand_name.keyword", "*"+searchInfoEO.getStandName()+"*"));
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(searchInfoEO.getStandEnName())) {
|
if (StringUtils.isNotBlank(searchInfoEO.getStandEnName())) {
|
||||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standEnName.keyword", "*"+searchInfoEO.getStandEnName()+"*"));
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standEnName.keyword", "*"+searchInfoEO.getStandEnName()+"*"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(searchInfoEO.getTextStatusBuss())) {
|
if (StringUtils.isNotBlank(searchInfoEO.getTextStatusBuss())) {
|
||||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("textStatusBuss.keyword", "*"+searchInfoEO.getTextStatusBuss()+"*"));
|
List<String> list = Arrays.asList(searchInfoEO.getTextStatusBuss().split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||||
|
if(list.size() > 1){
|
||||||
|
BoolQueryBuilder boolQueryBuilderShould = new BoolQueryBuilder();
|
||||||
|
list.forEach(s -> {
|
||||||
|
boolQueryBuilderShould.should(QueryBuilders.wildcardQuery("textStatusBuss.keyword", "*"+s+"*"));
|
||||||
|
});
|
||||||
|
boolQueryBuilder.must(boolQueryBuilderShould);
|
||||||
|
}else {
|
||||||
|
boolQueryBuilder.must(QueryBuilders.wildcardQuery("textStatusBuss.keyword", "*"+searchInfoEO.getTextStatusBuss()+"*"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchInfoEO.getIssueTime() != null) {
|
if (searchInfoEO.getIssueTime() != null) {
|
||||||
@@ -644,7 +713,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
// 循环统计各种类型数据
|
// 循环统计各种类型数据
|
||||||
String[] seniortype;
|
String[] seniortype;
|
||||||
if("stand".equals(searchInfoEO.getSelectIndex())) {
|
if("stand".equals(searchInfoEO.getSelectIndex())) {
|
||||||
String[] seniortypeStand = {"standSort", "statecode","CYSD","ZRLX","CLLX","CBCD"};
|
String[] seniortypeStand = {"standSort", "statecode","CYSD","ZRLX","CLLX","CBCD","textStatus","textStatusName"};
|
||||||
seniortype = seniortypeStand.clone();
|
seniortype = seniortypeStand.clone();
|
||||||
} else if("laws".equals(searchInfoEO.getSelectIndex())){
|
} else if("laws".equals(searchInfoEO.getSelectIndex())){
|
||||||
String[] seniortypeLaws = {"country","statecode","SYCLLX","ZRLX","WSSFCY"};
|
String[] seniortypeLaws = {"country","statecode","SYCLLX","ZRLX","WSSFCY"};
|
||||||
@@ -943,12 +1012,16 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
|
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
|
||||||
// 记录搜索记录到数据库中
|
// 记录搜索记录到数据库中
|
||||||
if(StringUtils.isNotEmpty(searchInfoEO.getSelectValue())){
|
if(StringUtils.isNotEmpty(searchInfoEO.getSelectValue())){
|
||||||
QueryBuilder multiQueryBuilder = QueryBuilders.multiMatchQuery("");
|
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
|
||||||
multiQueryBuilder = QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
|
"title"
|
||||||
"title","textContent","textItems"
|
).minimumShouldMatch("100%").field("title",10f));
|
||||||
).minimumShouldMatch("100%").field("title",10f);
|
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
|
||||||
boolQueryBuilder.must(multiQueryBuilder);
|
"textContent"
|
||||||
// boolQueryBuilder.should()
|
).minimumShouldMatch("100%").field("title",10f));
|
||||||
|
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
|
||||||
|
"textItems"
|
||||||
|
).minimumShouldMatch("100%").field("title",10f));
|
||||||
|
boolQueryBuilder.should(QueryBuilders.wildcardQuery("title.keyword","*"+searchInfoEO.getSelectValue()+"*"));
|
||||||
}
|
}
|
||||||
//在结果中检索
|
//在结果中检索
|
||||||
if (StringUtils.isNotEmpty(searchInfoEO.getResultKeyword())) {
|
if (StringUtils.isNotEmpty(searchInfoEO.getResultKeyword())) {
|
||||||
@@ -1060,16 +1133,16 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
BoolQueryBuilder boolQueryMust = QueryBuilders.boolQuery();
|
BoolQueryBuilder boolQueryMust = QueryBuilders.boolQuery();
|
||||||
QueryBuilder multiQueryBuilder;
|
QueryBuilder multiQueryBuilder;
|
||||||
multiQueryBuilder = QueryBuilders.multiMatchQuery(value,
|
multiQueryBuilder = QueryBuilders.multiMatchQuery(value,
|
||||||
"title","textContent").minimumShouldMatch("100%").field("title",1f);
|
"title.keyword","textContent.keyword").minimumShouldMatch("100%").field("title.keyword",1f);
|
||||||
boolQueryMust.must(multiQueryBuilder);
|
boolQueryMust.must(multiQueryBuilder);
|
||||||
boolQueryShould.should(QueryBuilders.wildcardQuery("title", "*"+searchInfoEO.getSelectValue()+"*").boost(10f))
|
boolQueryShould.should(QueryBuilders.wildcardQuery("title.keyword", "*"+searchInfoEO.getSelectValue()+"*").boost(10f))
|
||||||
.should(QueryBuilders.wildcardQuery("textContent", "*"+searchInfoEO.getSelectValue()+"*"))
|
.should(QueryBuilders.wildcardQuery("textContent.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
||||||
.should(multiQueryBuilder);
|
.should(multiQueryBuilder);
|
||||||
boolQueryBuilder.should(boolQueryShould);
|
boolQueryBuilder.should(boolQueryShould);
|
||||||
//在结果中检索
|
//在结果中检索
|
||||||
// boolQueryBuilder.must(multiQueryBuilder);
|
// boolQueryBuilder.must(multiQueryBuilder);
|
||||||
HighlightBuilder hiBuilder=new HighlightBuilder();
|
HighlightBuilder hiBuilder=new HighlightBuilder();
|
||||||
HighlightBuilder.Field highlightTitle = new HighlightBuilder.Field("title");
|
HighlightBuilder.Field highlightTitle = new HighlightBuilder.Field("title.keyword");
|
||||||
hiBuilder.field(highlightTitle);
|
hiBuilder.field(highlightTitle);
|
||||||
HighlightBuilder.Field highlightUser = new HighlightBuilder.Field("textContent");
|
HighlightBuilder.Field highlightUser = new HighlightBuilder.Field("textContent");
|
||||||
hiBuilder.field(highlightUser);
|
hiBuilder.field(highlightUser);
|
||||||
@@ -1091,7 +1164,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
Map<String, Object> sourceAsMap = searchHit.getSourceAsMap();
|
Map<String, Object> sourceAsMap = searchHit.getSourceAsMap();
|
||||||
//解析高亮字段
|
//解析高亮字段
|
||||||
Map<String, HighlightField> highlightFields = searchHit.getHighlightFields();
|
Map<String, HighlightField> highlightFields = searchHit.getHighlightFields();
|
||||||
HighlightField field= highlightFields.get("title");
|
HighlightField field= highlightFields.get("title.keyword");
|
||||||
if(field!= null){
|
if(field!= null){
|
||||||
Text[] fragments = field.fragments();
|
Text[] fragments = field.fragments();
|
||||||
String n_field = "";
|
String n_field = "";
|
||||||
@@ -1099,11 +1172,11 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
n_field += fragment;
|
n_field += fragment;
|
||||||
}
|
}
|
||||||
//高亮标题覆盖原标题
|
//高亮标题覆盖原标题
|
||||||
sourceAsMap.put("title",n_field);
|
sourceAsMap.put("title.keyword",n_field);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, HighlightField> highlightFieldsnameshowStr = searchHit.getHighlightFields();
|
Map<String, HighlightField> highlightFieldsnameshowStr = searchHit.getHighlightFields();
|
||||||
HighlightField fieldnameshowStr= highlightFieldsnameshowStr.get("textContent");
|
HighlightField fieldnameshowStr= highlightFieldsnameshowStr.get("textContent.keyword");
|
||||||
if(fieldnameshowStr!= null){
|
if(fieldnameshowStr!= null){
|
||||||
Text[] fragments = fieldnameshowStr.fragments();
|
Text[] fragments = fieldnameshowStr.fragments();
|
||||||
String n_field = "";
|
String n_field = "";
|
||||||
@@ -1111,7 +1184,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
n_field += fragment;
|
n_field += fragment;
|
||||||
}
|
}
|
||||||
//高亮标题覆盖原标题
|
//高亮标题覆盖原标题
|
||||||
sourceAsMap.put("textContent",n_field);
|
sourceAsMap.put("textContent.keyword",n_field);
|
||||||
}
|
}
|
||||||
result.add(sourceAsMap);
|
result.add(sourceAsMap);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -302,9 +302,10 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
|||||||
contentBuilder.append("企标类别:").append(attrInfoMap.get("standSort")).append(" ");
|
contentBuilder.append("企标类别:").append(attrInfoMap.get("standSort")).append(" ");
|
||||||
contentBuilder.append("标准年份:").append(attrInfoMap.get("standYear")).append(" ");
|
contentBuilder.append("标准年份:").append(attrInfoMap.get("standYear")).append(" ");
|
||||||
contentBuilder.append("企标名称:").append(attrInfoMap.get("standName")).append(" ");
|
contentBuilder.append("企标名称:").append(attrInfoMap.get("standName")).append(" ");
|
||||||
contentBuilder.append("企标英文名称:").append(attrInfoMap.get("standName")).append(" ");
|
contentBuilder.append("企标英文名称:").append(attrInfoMap.get("stand_en_name")).append(" ");
|
||||||
contentBuilder.append("文本状态:").append(attrInfoMap.get("textStatusBussName")).append(" ");
|
contentBuilder.append("文本状态:").append(attrInfoMap.get("textStatusBussName")).append(" ");
|
||||||
contentBuilder.append("企标实施日期:").append(attrInfoMap.get("putTime")).append(" ");
|
contentBuilder.append("企标实施日期:").append(attrInfoMap.get("putTime")).append(" ");
|
||||||
|
contentBuilder.append("企标发布日期:").append(attrInfoMap.get("issueTime")).append(" ");
|
||||||
contentBuilder.append("废止日期:").append(attrInfoMap.get("FZRQBUSSName")).append(" ");
|
contentBuilder.append("废止日期:").append(attrInfoMap.get("FZRQBUSSName")).append(" ");
|
||||||
contentBuilder.append("复审日期:").append(attrInfoMap.get("FSRQBUSSName")).append(" ");
|
contentBuilder.append("复审日期:").append(attrInfoMap.get("FSRQBUSSName")).append(" ");
|
||||||
contentBuilder.append("起草部门:").append(attrInfoMap.get("QCDWName")).append(" ");
|
contentBuilder.append("起草部门:").append(attrInfoMap.get("QCDWName")).append(" ");
|
||||||
|
|||||||
@@ -171,17 +171,18 @@ public class SendBussMQService {
|
|||||||
saveMap.put("validFlag","0");
|
saveMap.put("validFlag","0");
|
||||||
saveMap.put("content",infoEO.getFileIds());
|
saveMap.put("content",infoEO.getFileIds());
|
||||||
|
|
||||||
String fieldInfo = InitStandAttrUtil.queryField;
|
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||||
List<String> fieldInfoList = Arrays.asList(fieldInfo .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
List<String> fieldInfoList = Arrays.asList(fieldInfo .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||||
|
|
||||||
// 动态存储属性字段
|
// 动态存储属性字段
|
||||||
for (String field : fieldInfoList) {
|
for (String field : fieldInfoList) {
|
||||||
saveMap.put(field,attrInfoMap.getOrDefault(field,""));
|
saveMap.put(field,attrInfoMap.getOrDefault(field,""));
|
||||||
String fieldValue = "";
|
String fieldValue = "";
|
||||||
if(infoMap.get(field) != null && StringUtils.isNotBlank(infoMap.get(field).toString())){
|
String fieldFilter = field.toLowerCase();
|
||||||
Object json= new JSONTokener(infoMap.get(field).toString()).nextValue();
|
if(infoMap.get(fieldFilter) != null && StringUtils.isNotBlank(infoMap.get(fieldFilter).toString())){
|
||||||
|
Object json= new JSONTokener(infoMap.get(fieldFilter).toString()).nextValue();
|
||||||
if(!json.toString().equals("null")){
|
if(!json.toString().equals("null")){
|
||||||
fieldValue = infoMap.get(field).toString();
|
fieldValue = infoMap.get(fieldFilter).toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
saveMap.put(field+"Name",fieldValue);
|
saveMap.put(field+"Name",fieldValue);
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
|||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||||
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;
|
||||||
|
import com.sun.corba.se.spi.ior.iiop.IIOPFactories;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.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;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
@@ -21,9 +23,9 @@ import org.springframework.scheduling.annotation.Scheduled;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.LinkedList;
|
import java.util.*;
|
||||||
import java.util.List;
|
import java.util.regex.Pattern;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@Component
|
@Component
|
||||||
@@ -127,10 +129,15 @@ public class ScheduledJob {
|
|||||||
.setMark("3")
|
.setMark("3")
|
||||||
.setStandCode(warningEO.getStandSort()+" "+ warningEO.getStandNum()+"-"+ warningEO.getStandYear());
|
.setStandCode(warningEO.getStandSort()+" "+ warningEO.getStandNum()+"-"+ warningEO.getStandYear());
|
||||||
|
|
||||||
//实施日期达到预警时间,但新车型实施日期不在时间内
|
|
||||||
if (term.isTerm(warningEO.getXCXSSRQ())){
|
//实施日期达到预警时间,但在产车实施日期不在时间内
|
||||||
warningEO.setPutTime(warningEO.getXCXSSRQ());
|
/**
|
||||||
}
|
* 2021/9/9取消限制
|
||||||
|
*/
|
||||||
|
// if (term.isTerm(warningEO.getXCXSSRQ())){
|
||||||
|
// warningEO.setPutTime(warningEO.getXCXSSRQ());
|
||||||
|
// }
|
||||||
|
warningEO.setPutTime(warningEO.getXCXSSRQ());
|
||||||
|
|
||||||
}
|
}
|
||||||
warningList.addAll(standInfoXCXSSRQ);
|
warningList.addAll(standInfoXCXSSRQ);
|
||||||
@@ -148,9 +155,13 @@ public class ScheduledJob {
|
|||||||
.setMark("4")
|
.setMark("4")
|
||||||
.setStandCode(warningEO.getStandSort()+" "+ warningEO.getStandNum()+"-"+ warningEO.getStandYear());
|
.setStandCode(warningEO.getStandSort()+" "+ warningEO.getStandNum()+"-"+ warningEO.getStandYear());
|
||||||
//实施日期达到预警时间,但在产车实施日期不在时间内
|
//实施日期达到预警时间,但在产车实施日期不在时间内
|
||||||
if (term.isTerm(warningEO.getZCCSSRQ())){
|
/**
|
||||||
warningEO.setPutTime(warningEO.getZCCSSRQ());
|
* 2021/9/9取消限制
|
||||||
}
|
*/
|
||||||
|
// if (term.isTerm(warningEO.getZCCSSRQ())){
|
||||||
|
// warningEO.setPutTime(warningEO.getZCCSSRQ());
|
||||||
|
// }
|
||||||
|
warningEO.setPutTime(warningEO.getZCCSSRQ());
|
||||||
}
|
}
|
||||||
warningList.addAll(standInfoZCCSSRQ);
|
warningList.addAll(standInfoZCCSSRQ);
|
||||||
|
|
||||||
@@ -205,37 +216,87 @@ public class ScheduledJob {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 被多个标准代替的标准变为“被代替”,只有一个被代替的自动变为“废止”
|
* 被多个标准代替的标准变为“被代替”,只被一个标准代替的自动变为“废止”
|
||||||
*/
|
*/
|
||||||
QueryWrapper<SarStandAttrInfo> columns = new QueryWrapper<>();
|
QueryWrapper<SarStandAttrInfo> columnForDTBJH = new QueryWrapper<>();
|
||||||
columns.select("DTBJH","STAND_ID");
|
|
||||||
List<Map<String, Object>> mapsDTBZH = sarStandAttrInfoDao.selectMaps(columns);
|
|
||||||
|
|
||||||
mapsDTBZH.forEach(item->{
|
columnForDTBJH.select("DTBJH");
|
||||||
if (item.get("DTBJH")!=null && !item.get("DTBJH").toString().equals("")){
|
//查询代替标准字段得到一个 被代替了的标准的id的键值对列表
|
||||||
String dtbzh = item.get("DTBJH").toString();
|
List<Map<String, Object>> replaceStandIdMaps = sarStandAttrInfoDao.selectMaps(columnForDTBJH);
|
||||||
String[] split = dtbzh.split(",");
|
HashMap<String, Integer> replaceIdCountMap = new HashMap<>();
|
||||||
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
// 格式为 T/CSAE 175-2021
|
||||||
sarStandardsInfo.setId(item.get("STAND_ID").toString());
|
Pattern pattern = Pattern.compile("^\\S*\\s\\S*[\\u2014\\u002d\\s]\\d{4}$");
|
||||||
|
replaceStandIdMaps.forEach(item->{
|
||||||
|
if (item!=null){
|
||||||
|
//此标准代替的标准的标准号的数组
|
||||||
|
String DTBJHStr = item.get("DTBJH").toString();
|
||||||
|
|
||||||
//一个被代替标准号时,文本状态更新为废止状态,两个及以上时更新为被代替状态
|
//数据格式: (GB 123-2000,GB 4233434-2021,GB 423423423-2021)
|
||||||
switch (split.length){
|
if (!DTBJHStr.equals("")) {
|
||||||
case 0 :
|
String[] DTBJHArray = DTBJHStr.split(",");
|
||||||
break;
|
for (String DTBJH : DTBJHArray) {
|
||||||
case 1 :
|
|
||||||
sarStandardsInfo.setTextStatus("chblaarg77");//废止状态
|
if (!pattern.matcher(DTBJH).matches()){
|
||||||
break;
|
continue;
|
||||||
default:
|
}
|
||||||
sarStandardsInfo.setTextStatus("qke0ckro2p");//被代替状态
|
|
||||||
}
|
String[] split = DTBJH.split("[\\u2014\\u002d\\s]");//以空格或'-'或'—'分割
|
||||||
try {
|
String sort = split[0];
|
||||||
sarStandardsInfoDao.updateById(sarStandardsInfo);
|
String number = split[1];
|
||||||
}catch (Exception e){
|
String year = split[2];
|
||||||
System.out.println("代替标准状态更新:id为"+item.get("STAND_ID").toString()+"文本状态更新失败");
|
|
||||||
|
QueryWrapper<SarStandardsInfo> infoWrapper = new QueryWrapper<>();
|
||||||
|
infoWrapper.select("ID")
|
||||||
|
.eq("STAND_SORT", sort)
|
||||||
|
.eq("STAND_NUMBER", number)
|
||||||
|
.eq("STAND_YEAR", year);
|
||||||
|
|
||||||
|
|
||||||
|
List<Map<String, Object>> idMaps = sarStandardsInfoDao.selectMaps(infoWrapper);
|
||||||
|
if (idMaps.size() > 0) {
|
||||||
|
String standId = idMaps.get(0).get("ID").toString();
|
||||||
|
//如果代替标准id已存在则映射为2不存在则添加并映射为1
|
||||||
|
if (replaceIdCountMap.containsKey(standId)) {
|
||||||
|
replaceIdCountMap.replace(standId, 2);
|
||||||
|
} else {
|
||||||
|
replaceIdCountMap.put(standId, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//一个被代替标准号时,文本状态更新为废止状态,两个及以上时更新为被代替状态
|
||||||
|
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||||
|
for (String key : replaceIdCountMap.keySet()) {
|
||||||
|
switch (replaceIdCountMap.get(key)){
|
||||||
|
case 1 :
|
||||||
|
sarStandardsInfo.setTextStatus("chblaarg77");//废止状态
|
||||||
|
sarStandardsInfo.setId(key);
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
sarStandardsInfo.setTextStatus("qke0ckro2p");//被代替状态
|
||||||
|
sarStandardsInfo.setId(key);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
|
||||||
|
try {
|
||||||
|
sarStandardsInfoDao.updateById(sarStandardsInfo);
|
||||||
|
}catch (Exception e){
|
||||||
|
System.out.println("代替标准状态更新:id为"+key+"文本状态更新失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,150 @@
|
|||||||
|
package com.adc.da.slrs.DataSync;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.sarInstitution.entity.TsInstitution;
|
||||||
|
import com.adc.da.slrs.sarInstitution.service.ITsInstitutionService;
|
||||||
|
import com.adc.da.slrs.sarInstitution.service.impl.TsInstitutionServiceImpl;
|
||||||
|
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||||
|
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||||
|
import com.adc.da.slrs.sarPosition.service.impl.TsPositionServiceImpl;
|
||||||
|
import com.adc.da.slrs.sarUser.entity.TsUser;
|
||||||
|
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||||
|
import com.adc.da.slrs.sarUser.service.impl.TsUserServiceImpl;
|
||||||
|
import com.adc.da.sync.service.SyncUserService;
|
||||||
|
import com.adc.da.sys.dao.OrgEODao;
|
||||||
|
import com.adc.da.sys.entity.OrgEO;
|
||||||
|
import com.adc.da.sys.entity.UserOrgEO;
|
||||||
|
import com.adc.da.sys.service.IOrgEOService;
|
||||||
|
import com.adc.da.sys.service.impl.OrgEOServiceImpl;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Api(description = "|SarStandPutTime|")
|
||||||
|
@RequestMapping("/DataSync")
|
||||||
|
public class DataSyncController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ITsPositionService tsPositionService;
|
||||||
|
@Autowired
|
||||||
|
ITsUserService tsUserService;
|
||||||
|
@Autowired
|
||||||
|
ITsInstitutionService tsInstitutionService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("同步用户数据")
|
||||||
|
@PostMapping("/importUserData")
|
||||||
|
public String importUserData() throws Exception {
|
||||||
|
SyncUserService syncUserService = new SyncUserService();
|
||||||
|
List<String> res = syncUserService.syncFotonUser();
|
||||||
|
//存放岗位信息
|
||||||
|
Map<String, String> positionMap = new HashMap<>();
|
||||||
|
Map<String, String> useDistinct = new HashMap<>();
|
||||||
|
TsPosition position = new TsPosition();
|
||||||
|
position.setCurrent(1);
|
||||||
|
position.setPageSize(100000);
|
||||||
|
IPage<TsPosition> iPage = tsPositionService.getPosition(position);
|
||||||
|
List<TsPosition> positions=iPage.getRecords();
|
||||||
|
if (!positions.isEmpty()) {
|
||||||
|
positions.forEach(tsPosition -> {
|
||||||
|
positionMap.put(tsPosition.getName(), tsPosition.getId());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
for (String s : res) {
|
||||||
|
//获取到所有用户数据
|
||||||
|
List<TsUser> tsUsers = new ArrayList<>();
|
||||||
|
|
||||||
|
JSONArray jsonArray = JSONArray.parseArray(JSONObject.parseObject(s.toString()).getString("results"));
|
||||||
|
jsonArray.forEach(object -> {
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(object.toString());
|
||||||
|
//先获取岗位以及岗位id
|
||||||
|
TsUser tsUser = new TsUser();
|
||||||
|
UserOrgEO userOrgEO = new UserOrgEO();
|
||||||
|
//设置岗位
|
||||||
|
if (null != jsonObject.getString("title")) {
|
||||||
|
if (null == positionMap.get(jsonObject.getString("title"))) {
|
||||||
|
TsPosition tsPosition = new TsPosition();
|
||||||
|
tsPosition.setId(String.valueOf(UUID.randomUUID()));
|
||||||
|
tsPosition.setName(jsonObject.getString("title"));
|
||||||
|
tsPositionService.addPosition(tsPosition);
|
||||||
|
//放入岗位的map集合中
|
||||||
|
positionMap.put(tsPosition.getName(), tsPosition.getId());
|
||||||
|
//放入类中
|
||||||
|
tsUser.setPositionName(tsPosition.getName());
|
||||||
|
tsUser.setPositionId(tsPosition.getId());
|
||||||
|
} else {
|
||||||
|
tsUser.setPositionName(jsonObject.getString("title").trim());
|
||||||
|
tsUser.setPositionId(positionMap.get(jsonObject.getString("title").trim()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//设置其他数据
|
||||||
|
Timestamp createTime = new Timestamp(new Date().getTime());
|
||||||
|
tsUser.setState(jsonObject.getString("userStatus"));
|
||||||
|
tsUser.setUname(null!=jsonObject.getString("name")?jsonObject.getString("name"):"");
|
||||||
|
tsUser.setValidFlag("0");
|
||||||
|
tsUser.setDisableFlag("0");
|
||||||
|
tsUser.setCreationTime(createTime);
|
||||||
|
tsUser.setUserId(jsonObject.getString("userid"));
|
||||||
|
tsUser.setAccount(jsonObject.getString("userid"));
|
||||||
|
tsUser.setInstitutionId(null!=jsonObject.getString("orgNumber")?jsonObject.getString("orgNumber"):"" );
|
||||||
|
tsUser.setInstitutionName(null!=jsonObject.getString("orgName")?jsonObject.getString("orgName"):"" );
|
||||||
|
if (null == useDistinct.get(jsonObject.getString("userid"))) {
|
||||||
|
tsUsers.add(tsUser);
|
||||||
|
|
||||||
|
}
|
||||||
|
useDistinct.put(tsUser.getUserId(),tsUser.getUserId());
|
||||||
|
});
|
||||||
|
tsUserService.saveBatch(tsUsers);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("同步组织机构")
|
||||||
|
@PostMapping("/importOrgData")
|
||||||
|
public String importOrgData() throws Exception {
|
||||||
|
SyncUserService syncUserService = new SyncUserService();
|
||||||
|
List<String> res = syncUserService.syncFotonOrg();
|
||||||
|
|
||||||
|
//获取到所有用户数据
|
||||||
|
List<String> strings=new ArrayList<>();
|
||||||
|
|
||||||
|
tsInstitutionService.clearData();
|
||||||
|
for (String s : res) {
|
||||||
|
JSONArray jsonArray = JSONArray.parseArray(JSONObject.parseObject(s.toString()).getString("results"));
|
||||||
|
jsonArray.forEach(object -> {
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(object.toString());
|
||||||
|
strings.add(jsonObject.getString("parentOrgNumber"));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
for (String s : res) {
|
||||||
|
List<TsInstitution> tsInstitutions = new ArrayList<>();
|
||||||
|
JSONArray jsonArray = JSONArray.parseArray(JSONObject.parseObject(s.toString()).getString("results"));
|
||||||
|
jsonArray.forEach(object -> {
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(object.toString());
|
||||||
|
TsInstitution tsInstitution=new TsInstitution();
|
||||||
|
tsInstitution.setId(jsonObject.getString("orgNumber"));
|
||||||
|
tsInstitution.setName(jsonObject.getString("orgName"));
|
||||||
|
tsInstitution.setHasChild(strings.contains(jsonObject.getString("orgNumber"))?"1":"0");
|
||||||
|
tsInstitution.setParentId(jsonObject.getString("parentOrgNumber"));
|
||||||
|
//部门为"null"的数据不保存
|
||||||
|
if (!"null".equals(jsonObject.getString("orgName"))){
|
||||||
|
tsInstitutions.add(tsInstitution);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tsInstitutionService.saveBatch(tsInstitutions);
|
||||||
|
}
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package com.adc.da.slrs.ImportExcelDatas.comment;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.ImportExcelDatas.entity.ImportDto;
|
||||||
|
import com.adc.da.utils.util.BussStandExportUtil;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.poi.ss.usermodel.*;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class ExclErrorOut {
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(BussStandExportUtil.class);
|
||||||
|
|
||||||
|
public static Workbook exportDatas (List<ImportDto> datas,String header) {
|
||||||
|
Workbook workbook = new XSSFWorkbook();
|
||||||
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
//创建工作表对象
|
||||||
|
Sheet sheet = workbook.createSheet();
|
||||||
|
// 创建头部
|
||||||
|
createHeader(workbook,sheet,header);
|
||||||
|
// 创建数据
|
||||||
|
createDatas(workbook,sheet,datas);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return workbook;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void createHeader(Workbook workbook, Sheet sheet, String header){
|
||||||
|
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||||
|
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
Row rowHeader = sheet.createRow(0);//开始创建标题行
|
||||||
|
if (StringUtils.isNotBlank(header)) {
|
||||||
|
String[] headerArr = header.split(",");
|
||||||
|
for (int i=0;i < headerArr.length; i++) {
|
||||||
|
rowHeader.createCell(i).setCellValue(headerArr[i]);
|
||||||
|
// rowHeader.createCell(i).setCellStyle(cellStyle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void createDatas(Workbook workbook,Sheet sheet,List<ImportDto> datas) throws Exception{
|
||||||
|
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||||
|
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
if (datas != null && !datas.isEmpty()) {
|
||||||
|
for (int i=0;i < datas.size(); i++) {
|
||||||
|
ImportDto importDto = datas.get(i);
|
||||||
|
Row row = sheet.createRow(i+1);
|
||||||
|
|
||||||
|
int sheetNum = 0;
|
||||||
|
|
||||||
|
Class cls = importDto.getClass();
|
||||||
|
Field[] fields = cls.getDeclaredFields();
|
||||||
|
for (Field field : fields) {
|
||||||
|
field.setAccessible(true);
|
||||||
|
if (field.get(importDto)!=null){
|
||||||
|
String value = field.get(importDto).toString();
|
||||||
|
row.createCell(sheetNum).setCellValue(value);
|
||||||
|
}else {
|
||||||
|
row.createCell(sheetNum).setCellValue("");
|
||||||
|
}
|
||||||
|
sheetNum++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+82
@@ -0,0 +1,82 @@
|
|||||||
|
package com.adc.da.slrs.ImportExcelDatas.controller;
|
||||||
|
|
||||||
|
import com.adc.da.base.web.BaseController;
|
||||||
|
import com.adc.da.common.ReadExcel;
|
||||||
|
import com.adc.da.http.ResponseMessage;
|
||||||
|
import com.adc.da.slrs.ImportExcelDatas.comment.ExclErrorOut;
|
||||||
|
import com.adc.da.slrs.ImportExcelDatas.entity.ImportDto;
|
||||||
|
import com.adc.da.slrs.ImportExcelDatas.service.ImportExcelService;
|
||||||
|
import com.adc.da.slrs.ImportExcelDatas.service.impl.ImportExcelServiceImpl;
|
||||||
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
|
import com.adc.da.slrs.sarPersonalCenter.entity.SarUserStar;
|
||||||
|
import com.adc.da.slrs.sarPersonalCenter.entity.SarUserStarEO;
|
||||||
|
import com.adc.da.util.exception.AdcDaBaseException;
|
||||||
|
import com.adc.da.util.utils.IOUtils;
|
||||||
|
import com.adc.da.util.utils.StringUtils;
|
||||||
|
import com.adc.da.utils.util.BussStandExportUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Api(description = "|SarStandPutTime|")
|
||||||
|
@RequestMapping("/ImportExcel")
|
||||||
|
public class ImportExcelController extends BaseController<ImportDto> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ImportExcelService importExcelService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ExclErrorOut exclErrorOut;
|
||||||
|
|
||||||
|
@ApiOperation("批量删除用户收藏")
|
||||||
|
@PostMapping("/import")
|
||||||
|
public void deleteList(MultipartFile file, MultipartFile file2, HttpServletResponse response, HttpServletRequest request) throws IOException {
|
||||||
|
Map<String, List<ImportDto>> mapMap=importExcelService.getExcelData(file,file2);
|
||||||
|
List<ImportDto> errorList = importExcelService.storageExclData(mapMap);
|
||||||
|
// List<ImportDto> guonei= mapMap.get("GNBZ");
|
||||||
|
// List<ImportDto> haiwai = mapMap.get("HWBZ");
|
||||||
|
// List<ImportDto> qibiao = mapMap.get("QYBZ");
|
||||||
|
OutputStream os = null;
|
||||||
|
Workbook workbook = null;
|
||||||
|
try {
|
||||||
|
|
||||||
|
String exportName="错误表格";
|
||||||
|
response.setHeader("Content-Disposition",
|
||||||
|
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx",request));
|
||||||
|
response.setContentType("application/force-download");
|
||||||
|
//导出数据
|
||||||
|
String headStr="标准号,标准名称,英文名称,发布时间,实施时间,标准状态,代替标准号,附件路径,错误原因";
|
||||||
|
workbook = exclErrorOut.exportDatas(errorList,headStr);
|
||||||
|
os = response.getOutputStream();
|
||||||
|
workbook.write(os);
|
||||||
|
os.flush();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||||
|
} finally {
|
||||||
|
IOUtils.closeQuietly(os);
|
||||||
|
if (workbook != null) {
|
||||||
|
workbook.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// return responseMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.adc.da.slrs.ImportExcelDatas.dao;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.ImportExcelDatas.entity.ImportDto;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface ImportExcelDao extends BaseMapper<ImportDto> {
|
||||||
|
|
||||||
|
Map<String,Map<String, List<ImportDto>>> getExcelData(MultipartFile file);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.adc.da.slrs.ImportExcelDatas.entity;
|
||||||
|
|
||||||
|
import com.adc.da.base.entity.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ImportDto extends BaseEntity {
|
||||||
|
|
||||||
|
// 标准号
|
||||||
|
private String standId;
|
||||||
|
// 标准名称
|
||||||
|
private String standName;
|
||||||
|
// 英文名称
|
||||||
|
private String standNameEN;
|
||||||
|
// 发布时间
|
||||||
|
private String publishTime;
|
||||||
|
// 实施时间
|
||||||
|
private String implementedTime;
|
||||||
|
// 标准状态
|
||||||
|
private String standStatus;
|
||||||
|
// 代替标准号
|
||||||
|
private String replaceId;
|
||||||
|
// 附件路径
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
// 错误原因
|
||||||
|
private String errorStr;
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.adc.da.slrs.ImportExcelDatas.service;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.ImportExcelDatas.entity.ImportDto;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface ImportExcelService extends IService<ImportDto> {
|
||||||
|
|
||||||
|
Map<String, List<ImportDto>> getExcelData(MultipartFile file,MultipartFile file2);
|
||||||
|
|
||||||
|
|
||||||
|
public List<ImportDto> storageExclData(Map<String, List<ImportDto>> importListMap);
|
||||||
|
|
||||||
|
}
|
||||||
+705
@@ -0,0 +1,705 @@
|
|||||||
|
package com.adc.da.slrs.ImportExcelDatas.service.impl;
|
||||||
|
|
||||||
|
import com.adc.da.att.service.IAttFileEOService;
|
||||||
|
import com.adc.da.att.vo.AttFileVo;
|
||||||
|
import com.adc.da.http.Result;
|
||||||
|
import com.adc.da.slrs.ImportExcelDatas.dao.ImportExcelDao;
|
||||||
|
import com.adc.da.slrs.ImportExcelDatas.entity.ImportDto;
|
||||||
|
import com.adc.da.slrs.ImportExcelDatas.service.ImportExcelService;
|
||||||
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
|
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||||
|
import com.adc.da.sys.dao.DicTypeEODao;
|
||||||
|
import com.adc.da.sys.entity.DicTypeEO;
|
||||||
|
import com.adc.da.sys.entity.DictionaryEO;
|
||||||
|
import com.adc.da.sys.service.impl.DicTypeEOServiceImpl;
|
||||||
|
import com.adc.da.util.UUIDUtils;
|
||||||
|
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFRow;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ImportExcelServiceImpl extends ServiceImpl<ImportExcelDao, ImportDto> implements ImportExcelService {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAttFileEOService attFileEOService;
|
||||||
|
|
||||||
|
// @Autowired
|
||||||
|
// private CreateStandMQService createStandMQService;
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private SarStandardsInfoServiceImpl sarStandardsInfoService;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private SarBussionessStandServiceImpl sarBussionessStandService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private final static String GN = "GB,GB/T,QC/T,GJB,JB,JT,HG,YV,SY,SH,GA,HJ,QB,JG,NB,JC,YS/T,FZ/T,TB/T,JJG,SJ/T,T/TBPS" +
|
||||||
|
",NB/T,CJ/T,YS/T,SJ/T,BB/T,SN/T,SB/T,MH/T,DB11,SZDB/Z,HKG,T/ZSA,CSAE,T/CAS,T/CADA,T/CHTS,T/ITS,T/BJQC";
|
||||||
|
private final static String QB = "Q/QCBFC,Q/FT,Q/FL,Q/QCFLC,Q/BQB,Q/SGT," +
|
||||||
|
"Q-AMSN,QB-NE,Q-IOUM,Q房/AYJ,KNT";
|
||||||
|
|
||||||
|
// file 为主 file2 为附件
|
||||||
|
@Override
|
||||||
|
public Map<String, List<ImportDto>> getExcelData(MultipartFile file, MultipartFile file2) {
|
||||||
|
|
||||||
|
List<String> dates = new ArrayList<>();
|
||||||
|
for (int i = 1669; i < 2023; i++) {
|
||||||
|
dates.add("-" + i);
|
||||||
|
dates.add("—" + i);
|
||||||
|
dates.add("- " + i);
|
||||||
|
dates.add("— " + i);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file == null || file.getSize() == 0) {
|
||||||
|
log.error("文件上传错误,重新上传");
|
||||||
|
}
|
||||||
|
String filename = file.getOriginalFilename();
|
||||||
|
if (!(filename.endsWith(".xls") || filename.endsWith(".xlsx"))) {
|
||||||
|
log.error("文件上传格式错误,请重新上传");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file2 == null || file2.getSize() == 0) {
|
||||||
|
log.error("文件上传错误,重新上传");
|
||||||
|
}
|
||||||
|
String filename2 = file2.getOriginalFilename();
|
||||||
|
if (!(filename2.endsWith(".xls") || filename2.endsWith(".xlsx"))) {
|
||||||
|
log.error("文件上传格式错误,请重新上传");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> datas = new ArrayList<>();
|
||||||
|
List<String> fujian = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
if (filename.endsWith(".xls")) {
|
||||||
|
datas = isXls(file);
|
||||||
|
} else {
|
||||||
|
datas = isXlsx(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filename2.endsWith(".xls")) {
|
||||||
|
fujian = isXls(file2);
|
||||||
|
} else {
|
||||||
|
fujian = isXlsx(file2);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}
|
||||||
|
Map<String, List<ImportDto>> res = new HashMap<>();
|
||||||
|
// 国内标准
|
||||||
|
List<String> GNS = new ArrayList<>(Arrays.asList(GN.split(",")));
|
||||||
|
// 企业标准
|
||||||
|
List<String> QBS = new ArrayList<>(Arrays.asList(QB.split(",")));
|
||||||
|
//处理数据
|
||||||
|
List<ImportDto> InCountry = new ArrayList<>();
|
||||||
|
List<ImportDto> OutCountry = new ArrayList<>();
|
||||||
|
List<ImportDto> QiBiao = new ArrayList<>();
|
||||||
|
List<ImportDto> error = new ArrayList<>();
|
||||||
|
//中间的Map 判断标准号属于哪种类型
|
||||||
|
Map<String, String> middle = new HashMap<>();
|
||||||
|
datas.forEach(items -> {
|
||||||
|
//判断是否是正确的数据
|
||||||
|
String[] as = items.split(",");
|
||||||
|
if (!inDate(as[0], dates)) {
|
||||||
|
ImportDto importDto = getImportDto(as);
|
||||||
|
error.add(importDto);
|
||||||
|
middle.put(as[0].trim(), "error-" + error.size());
|
||||||
|
} else {
|
||||||
|
//数据二次拆解 针对标准进行拆解
|
||||||
|
String[] step2 = as[0].trim().split(" ");
|
||||||
|
// 是否国内? 企标 ? 海外
|
||||||
|
if (isCheck(GNS, step2[0].trim())) {
|
||||||
|
ImportDto importDto = getImportDto(as);
|
||||||
|
InCountry.add(importDto);
|
||||||
|
middle.put(as[0].trim(), "GNBZ-" + InCountry.size());
|
||||||
|
} else if (isCheck(QBS, step2[0].trim())) {
|
||||||
|
ImportDto importDto = getImportDto(as);
|
||||||
|
QiBiao.add(importDto);
|
||||||
|
middle.put(as[0].trim(), "QYBZ-" + QiBiao.size());
|
||||||
|
} else {
|
||||||
|
ImportDto importDto = getImportDto(as);
|
||||||
|
OutCountry.add(importDto);
|
||||||
|
middle.put(as[0].trim(), "HWBZ-" + OutCountry.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
res.put("error", error);
|
||||||
|
res.put("GNBZ", InCountry);
|
||||||
|
res.put("QYBZ", QiBiao);
|
||||||
|
res.put("HWBZ", OutCountry);
|
||||||
|
|
||||||
|
fujian.forEach(items2 -> {
|
||||||
|
String[] fj = items2.split(",");
|
||||||
|
if (fj.length > 2) {
|
||||||
|
if (null != middle.get(null != fj[2] ? fj[2].trim() : "")) {
|
||||||
|
//对应数据位置
|
||||||
|
String[] location = middle.get(fj[2].trim()).split("-");
|
||||||
|
res.get(location[0]).get(Integer.parseInt(location[1]) - 1).setPath(fj[3]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean inDate(String as, List<String> dates) {
|
||||||
|
if (null != as && !"".equals(as)) {
|
||||||
|
for (String s : dates) {
|
||||||
|
if (s.equals(as.trim())) {
|
||||||
|
return true;
|
||||||
|
} else if (as.trim().contains(s)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean isCheck(List<String> QB, String item) {
|
||||||
|
for (String s : QB) {
|
||||||
|
if (s.equals(item)) {
|
||||||
|
return true;
|
||||||
|
} else if (item.contains(s) && item.startsWith(s)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//赋值方法
|
||||||
|
private ImportDto getImportDto(String[] as) {
|
||||||
|
ImportDto importDto = new ImportDto();
|
||||||
|
if (as.length == 7) {
|
||||||
|
importDto.setStandId(null != as[0] ? as[0].trim() : "");
|
||||||
|
importDto.setStandName(null != as[1] ? as[1].trim() : "");
|
||||||
|
importDto.setStandNameEN(null != as[2] ? as[2].trim() : "");
|
||||||
|
importDto.setPublishTime(null != as[3] ? as[3].trim() : "");
|
||||||
|
importDto.setImplementedTime(null != as[4] ? as[4].trim() : "");
|
||||||
|
importDto.setStandStatus(null != as[5] ? as[5].trim() : "");
|
||||||
|
importDto.setReplaceId(null != as[6] ? as[6].trim() : "");
|
||||||
|
} else if (as.length == 6) {
|
||||||
|
importDto.setStandId(null != as[0] ? as[0].trim() : "");
|
||||||
|
importDto.setStandName(null != as[1] ? as[1].trim() : "");
|
||||||
|
importDto.setStandNameEN(null != as[2] ? as[2].trim() : "");
|
||||||
|
importDto.setPublishTime(null != as[3] ? as[3].trim() : "");
|
||||||
|
importDto.setImplementedTime(null != as[4] ? as[4].trim() : "");
|
||||||
|
importDto.setStandStatus(null != as[5] ? as[5].trim() : "");
|
||||||
|
importDto.setReplaceId("");
|
||||||
|
}
|
||||||
|
return importDto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<String> isXls(MultipartFile multipartFile) {
|
||||||
|
List<String> strings = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
InputStream inputStream = multipartFile.getInputStream();
|
||||||
|
HSSFWorkbook workbook = new HSSFWorkbook(inputStream);
|
||||||
|
// 读取有多少页
|
||||||
|
int sheetNum = workbook.getNumberOfSheets();
|
||||||
|
// 遍历sheet页
|
||||||
|
for (int i = 0; i < sheetNum; i++) {
|
||||||
|
HSSFSheet sheet = workbook.getSheetAt(i);
|
||||||
|
// 获取有多少行
|
||||||
|
int lastNum = sheet.getLastRowNum();
|
||||||
|
for (int j = 1; j <= lastNum; j++) {
|
||||||
|
HSSFRow row = sheet.getRow(j);
|
||||||
|
if (null != row) {
|
||||||
|
strings.add(row.getCell(0).getStringCellValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}
|
||||||
|
return strings;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> isXlsx(MultipartFile multipartFile) {
|
||||||
|
List<String> strings = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
InputStream inputStream = multipartFile.getInputStream();
|
||||||
|
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||||
|
// 读取有多少页
|
||||||
|
int sheetNum = workbook.getNumberOfSheets();
|
||||||
|
// 遍历sheet页
|
||||||
|
for (int i = 0; i <= sheetNum; i++) {
|
||||||
|
XSSFSheet sheet = workbook.getSheetAt(i);
|
||||||
|
// 获取有多少行
|
||||||
|
int lastNum = sheet.getLastRowNum();
|
||||||
|
for (int j = 1; j <= lastNum; j++) {
|
||||||
|
XSSFRow row = sheet.getRow(j);
|
||||||
|
if (null != row) {
|
||||||
|
strings.add(row.getCell(0).getStringCellValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}
|
||||||
|
return strings;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private List<ImportDto> error = new ArrayList<>();
|
||||||
|
|
||||||
|
private List<ImportDto> fileError = new ArrayList<>();
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarStandardsInfoService sarStandardsInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DicTypeEOServiceImpl dicTypeEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarBussionessStandService sarBussionessStandService;
|
||||||
|
@Override
|
||||||
|
public List<ImportDto> storageExclData(Map<String, List<ImportDto>> importListMap) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
error = importListMap.get("error");
|
||||||
|
/**
|
||||||
|
* 初始化国内外标准属性字段
|
||||||
|
*/
|
||||||
|
List<String> listStandField = InitStandAttrUtil.queryFieldList;
|
||||||
|
Map<String,String> standAttrMap = new TreeMap<>();
|
||||||
|
listStandField.forEach(item ->{
|
||||||
|
standAttrMap.put(item,"");
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 海外标准
|
||||||
|
*/
|
||||||
|
importListMap.get("HWBZ").forEach(item -> {
|
||||||
|
|
||||||
|
String standID = UUIDUtils.randomUUID20();
|
||||||
|
|
||||||
|
//使用初始化的属性字段映射 获得key值,value为""
|
||||||
|
Map<String, String> mapField = standAttrMap;
|
||||||
|
SarStandardsInfo ForeignEO = parseImportDtoToStandardsInfo(item,mapField, standID);
|
||||||
|
|
||||||
|
if (ForeignEO != null) {
|
||||||
|
ForeignEO.setValidFlag("0");
|
||||||
|
ForeignEO.setStandType("FOREIGN");
|
||||||
|
QueryWrapper<SarStandardsInfo> standSaveWrapper = new QueryWrapper<>();
|
||||||
|
standSaveWrapper
|
||||||
|
.eq("STAND_SORT", ForeignEO.getStandSort())
|
||||||
|
.eq("STAND_NUMBER", ForeignEO.getStandNumber())
|
||||||
|
.eq("STAND_YEAR", ForeignEO.getStandYear());
|
||||||
|
|
||||||
|
SarStandardsInfo one = sarStandardsInfoService.getOne(standSaveWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (one != null) {
|
||||||
|
ForeignEO.setId(one.getId());
|
||||||
|
|
||||||
|
try {
|
||||||
|
sarStandardsInfoService.updateSarStandardsInfo(ForeignEO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
item.setErrorStr("标准更新失败");
|
||||||
|
error.add(item);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
sarStandardsInfoService.createSarStandardsInfo(ForeignEO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
item.setErrorStr("标准新增失败");
|
||||||
|
error.add(item);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
item.setErrorStr("标准号无法解析");
|
||||||
|
error.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内标准
|
||||||
|
*/
|
||||||
|
|
||||||
|
importListMap.get("GNBZ").forEach(item -> {
|
||||||
|
String standID = UUIDUtils.randomUUID20();
|
||||||
|
//使用初始化的属性字段映射 获得key值,value为""
|
||||||
|
Map<String, String> mapStandField = standAttrMap;
|
||||||
|
SarStandardsInfo InlandEO = parseImportDtoToStandardsInfo(item, mapStandField,standID);
|
||||||
|
|
||||||
|
if (InlandEO != null) {
|
||||||
|
|
||||||
|
|
||||||
|
InlandEO.setValidFlag("0");
|
||||||
|
InlandEO.setStandType("INLAND");
|
||||||
|
|
||||||
|
|
||||||
|
QueryWrapper<SarStandardsInfo> standSaveWrapper = new QueryWrapper<>();
|
||||||
|
standSaveWrapper
|
||||||
|
.eq("STAND_SORT", InlandEO.getStandSort())
|
||||||
|
.eq("STAND_NUMBER", InlandEO.getStandNumber())
|
||||||
|
.eq("STAND_YEAR", InlandEO.getStandYear());
|
||||||
|
|
||||||
|
|
||||||
|
SarStandardsInfo one = sarStandardsInfoService.getOne(standSaveWrapper);
|
||||||
|
if (one != null) {
|
||||||
|
|
||||||
|
|
||||||
|
InlandEO.setId(one.getId());
|
||||||
|
try {
|
||||||
|
sarStandardsInfoService.updateSarStandardsInfo(InlandEO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
item.setErrorStr("国内标准更新失败");
|
||||||
|
error.add(item);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
sarStandardsInfoService.createSarStandardsInfo(InlandEO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
item.setErrorStr("国内标准新增失败");
|
||||||
|
error.add(item);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
item.setErrorStr("标准号无法解析");
|
||||||
|
error.add(item);
|
||||||
|
importListMap.replace("error", error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业标准
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化企业标准属性字段
|
||||||
|
*/
|
||||||
|
List<String> listStandBussField = InitStandAttrUtil.queryFieldListBuss;
|
||||||
|
Map<String,String> bussAttrMap = new TreeMap<>();
|
||||||
|
listStandBussField.forEach(item->{
|
||||||
|
bussAttrMap.put(item,"");
|
||||||
|
});
|
||||||
|
importListMap.get("QYBZ").forEach(item -> {
|
||||||
|
String standId = UUIDUtils.randomUUID20();
|
||||||
|
SarBussionessStand BussEO = parseImportDtoToSarBussionessStand(item, bussAttrMap,standId);
|
||||||
|
|
||||||
|
if (BussEO != null) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
QueryWrapper<SarBussionessStand> saveWrapper = new QueryWrapper<>();
|
||||||
|
saveWrapper.eq("STAND_CODE", item.getStandId());
|
||||||
|
SarBussionessStand one = sarBussionessStandService.getOne(saveWrapper);
|
||||||
|
if (one != null) {
|
||||||
|
BussEO.setId(one.getId());
|
||||||
|
sarBussionessStandService.updateSarBussionessStand(BussEO);
|
||||||
|
} else {
|
||||||
|
sarBussionessStandService.createSarBussionessStand(BussEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
item.setErrorStr("数据格式错误");
|
||||||
|
error.add(item);
|
||||||
|
|
||||||
|
e.printStackTrace();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
error.addAll(fileError);
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整理为标准信息实体
|
||||||
|
* @param importDto
|
||||||
|
* @param fieldMap 属性字段
|
||||||
|
* @param standId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public SarStandardsInfo parseImportDtoToStandardsInfo(ImportDto importDto,Map<String,String> fieldMap, String standId) {
|
||||||
|
|
||||||
|
|
||||||
|
HashMap<String, String> analysis = analysisStandId(importDto);
|
||||||
|
if (analysis == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
SarStandardsInfo sarStandardsInfoEO = new SarStandardsInfo();
|
||||||
|
sarStandardsInfoEO.setId(standId);
|
||||||
|
|
||||||
|
|
||||||
|
sarStandardsInfoEO.setStandSort(analysis.get("sort"));
|
||||||
|
sarStandardsInfoEO.setStandNumber(analysis.get("number"));
|
||||||
|
sarStandardsInfoEO.setStandYear(analysis.get("year"));
|
||||||
|
|
||||||
|
sarStandardsInfoEO.setStandName(importDto.getStandName());
|
||||||
|
sarStandardsInfoEO.setStandEnName(importDto.getStandNameEN());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 截取发布日期 年月日
|
||||||
|
*/
|
||||||
|
String issueDate = importDto.getPublishTime().substring(0, 19);
|
||||||
|
sarStandardsInfoEO.setIssueTime(issueDate);//标准发布日期
|
||||||
|
|
||||||
|
String standStatus = importDto.getStandStatus();
|
||||||
|
if ("有效".equals(standStatus)) {
|
||||||
|
sarStandardsInfoEO.setTextStatus("vsaga7nwub");//现行有效
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准属性字段
|
||||||
|
*/
|
||||||
|
|
||||||
|
fieldMap.put("DTBJH", importDto.getReplaceId());
|
||||||
|
fieldMap.put("SSRQ", importDto.getImplementedTime().substring(0, 19));
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件
|
||||||
|
*/
|
||||||
|
if (importDto.getPath() != null) {
|
||||||
|
String path[] = importDto.getPath().split("/");
|
||||||
|
String realPath = "";
|
||||||
|
for (int i = 4; i < path.length; i++) {
|
||||||
|
realPath = realPath + "/" + path[i];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
// File file = new File("C:\\Users\\22501\\Desktop\\foton\\2021\\" + realPath);
|
||||||
|
// File file = new File(importPath + realPath);
|
||||||
|
File file = new File("/home/file/2021/" + realPath);
|
||||||
|
if (file.exists()) {
|
||||||
|
AttFileVo fileInfo = attFileEOService.saveFileInfo(file);
|
||||||
|
|
||||||
|
if (importDto.getImplementedTime() != null) {
|
||||||
|
fieldMap.put("FBGJBD", fileInfo.getAttId());
|
||||||
|
} else {
|
||||||
|
fieldMap.put("GLWJ", fileInfo.getAttId());
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
importDto.setErrorStr("文件不存在");
|
||||||
|
fileError.add(importDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
importDto.setErrorStr("文件打开失败");
|
||||||
|
fileError.add(importDto);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// attrInfoMap.put("")
|
||||||
|
Gson gson = new Gson();
|
||||||
|
String attrInfoJson = gson.toJson(fieldMap);
|
||||||
|
sarStandardsInfoEO.setSarStandAttrEOStr(attrInfoJson);//新增修改时属性表信息
|
||||||
|
|
||||||
|
|
||||||
|
return sarStandardsInfoEO;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整理为企业标准实体
|
||||||
|
* @param importDto
|
||||||
|
* @param standId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public SarBussionessStand parseImportDtoToSarBussionessStand(ImportDto importDto,Map<String,String> fieldMap, String standId) {
|
||||||
|
|
||||||
|
|
||||||
|
HashMap<String, String> analysis = analysisStandId(importDto);
|
||||||
|
if (analysis == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
SarBussionessStand sarBussionessStand = new SarBussionessStand();
|
||||||
|
sarBussionessStand.setId(standId);
|
||||||
|
sarBussionessStand.setStandSort(analysis.get("sort"));
|
||||||
|
sarBussionessStand.setStandYear(analysis.get("year"));
|
||||||
|
sarBussionessStand.setStandCode(importDto.getStandId());
|
||||||
|
sarBussionessStand.setStandName(importDto.getStandName());
|
||||||
|
sarBussionessStand.setStandEnName(importDto.getStandNameEN());
|
||||||
|
sarBussionessStand.setIssueTime(importDto.getPublishTime());
|
||||||
|
sarBussionessStand.setPutTime(importDto.getImplementedTime());
|
||||||
|
sarBussionessStand.setReplacedStandNum(importDto.getReplaceId());
|
||||||
|
sarBussionessStand.setValidFlag(0);
|
||||||
|
if ("有效".equals(importDto.getStandStatus())) {
|
||||||
|
sarBussionessStand.setTextStatusBuss("vsaga7nwub");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业标准属性字段
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
if (importDto.getPath() != null) {
|
||||||
|
String path[] = importDto.getPath().split("/");
|
||||||
|
String realPath = "";
|
||||||
|
for (int i = 4; i < path.length; i++) {
|
||||||
|
realPath = realPath + "/" + path[i];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
// File file = new File("C:\\Users\\22501\\Desktop\\foton\\2021\\" + realPath);
|
||||||
|
// File file = new File(importPath + realPath);
|
||||||
|
File file = new File("/home/file/2021/" + realPath);
|
||||||
|
|
||||||
|
if (file.exists()) {
|
||||||
|
AttFileVo fileInfo = attFileEOService.saveFileInfo(file);
|
||||||
|
|
||||||
|
|
||||||
|
if (importDto.getImplementedTime()!=null && importDto.getImplementedTime()!=""){
|
||||||
|
fieldMap.put("FBGBUSS",fileInfo.getAttId());
|
||||||
|
|
||||||
|
}else {
|
||||||
|
fieldMap.put("GLWJBUSS",fileInfo.getAttId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
importDto.setErrorStr("文件不存在");
|
||||||
|
fileError.add(importDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
importDto.setErrorStr("路径错误!");
|
||||||
|
fileError.add(importDto);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
String attrInfoJson = new Gson().toJson(fieldMap);
|
||||||
|
sarBussionessStand.setSarStandAttrEOStr(attrInfoJson);//新增修改时属性表信息
|
||||||
|
return sarBussionessStand;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析标准号,标准类别不存在则新增
|
||||||
|
* @param importDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public HashMap<String, String> analysisStandId(ImportDto importDto) {
|
||||||
|
HashMap<String, String> result = new HashMap<>();
|
||||||
|
if (importDto.getStandId() == null) {
|
||||||
|
importDto.setErrorStr("标准号为空");
|
||||||
|
error.add(importDto);
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
String standId = importDto.getStandId();
|
||||||
|
//格式 非空格字符+空格+非空格字符+‘-’或‘—’或空格+年份 如Q/FT F003—2001
|
||||||
|
Pattern pattern = Pattern.compile("^\\S*\\s\\S*[\\u2014\\u002d\\s]\\d{4}$");
|
||||||
|
if (!pattern.matcher(standId).matches()) {
|
||||||
|
importDto.setErrorStr("标准号无法解析");
|
||||||
|
error.add(importDto);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
String sort = "";
|
||||||
|
String number = "";
|
||||||
|
String year = "";
|
||||||
|
String[] split = importDto.getStandId().split("[\\u2014\\u002d\\s]");//以空格或'-'或'—'分割
|
||||||
|
|
||||||
|
|
||||||
|
// 多种格式(╯‵□′)╯︵┻━┻ Q-FL T015-2021 Q/ FL T015-2021 Q/FL T015-2021
|
||||||
|
int length = split.length;
|
||||||
|
number = split[length - 2];
|
||||||
|
year = split[length - 1];
|
||||||
|
for (int i = 0; i < length - 2; i++) {
|
||||||
|
sort += split[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
result.put("sort", sort);
|
||||||
|
result.put("number", number);
|
||||||
|
result.put("year", year);
|
||||||
|
//标准类别不存在,新增标准类别
|
||||||
|
List<DicTypeEO> isExist = dicTypeEOService.getTypeIdByDicIdAndTypeName("JKSADFH564S", null, sort, null);
|
||||||
|
if (isExist == null || isExist.isEmpty() || isExist.size()==0){
|
||||||
|
|
||||||
|
DicTypeEO dicTypeVO = new DicTypeEO();
|
||||||
|
dicTypeVO.setId(null);
|
||||||
|
dicTypeVO.setDicId("JKSADFH564S");
|
||||||
|
dicTypeVO.setDicTypeCode(sort);
|
||||||
|
dicTypeVO.setDicTypeName(sort);
|
||||||
|
dicTypeVO.setShowIndex(1);
|
||||||
|
Integer dicTypeEO = dicTypeEOService.saveDictype(dicTypeVO);
|
||||||
|
if (dicTypeEO>0){
|
||||||
|
importDto.setErrorStr("标准类别不存在,已新增");
|
||||||
|
}else {
|
||||||
|
importDto.setErrorStr("标准类别不存在,新增失败");
|
||||||
|
}
|
||||||
|
error.add(importDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+4
-1
@@ -14,7 +14,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author super_liu
|
* @author super_liu
|
||||||
@@ -52,6 +52,9 @@ public class SarBussStandAttrInfo extends BaseEntity {
|
|||||||
@TableField("MODIFY_TIME")
|
@TableField("MODIFY_TIME")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
private Date modifyTime;
|
private Date modifyTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String glwj;
|
||||||
//
|
//
|
||||||
// @TableField("SVPPS")
|
// @TableField("SVPPS")
|
||||||
// private String svpps;
|
// private String svpps;
|
||||||
|
|||||||
+2
@@ -24,6 +24,8 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
|||||||
|
|
||||||
SarBussionessStand updateSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception;
|
SarBussionessStand updateSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception;
|
||||||
|
|
||||||
|
ResponseMessage<SarBussionessStand> createSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception;
|
||||||
|
|
||||||
List<SarBussionessStand> selectStandardsByStandNumber(String replaceStandNum);
|
List<SarBussionessStand> selectStandardsByStandNumber(String replaceStandNum);
|
||||||
|
|
||||||
SarBussionessStand selectStandardsInfoByKey(String id) throws Exception;
|
SarBussionessStand selectStandardsInfoByKey(String id) throws Exception;
|
||||||
|
|||||||
+19
-18
@@ -241,6 +241,25 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
page = (SarBussionessStandEOPage)JSONObject.toBean(jsonObject, SarBussionessStandEOPage.class);
|
page = (SarBussionessStandEOPage)JSONObject.toBean(jsonObject, SarBussionessStandEOPage.class);
|
||||||
page.setPage(1);
|
page.setPage(1);
|
||||||
page.setPageSize(10000);
|
page.setPageSize(10000);
|
||||||
|
//查询当前登录人角色拥有权限的菜单
|
||||||
|
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||||
|
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("ID",page.getMenuId());
|
||||||
|
qw.isNull("PARENT_ID");
|
||||||
|
List<TsResource> children = iTsResourceService.list(qw);
|
||||||
|
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||||
|
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||||
|
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||||
|
page.setMenuRoleList(getMenuIdList);
|
||||||
|
} else {
|
||||||
|
page.setMenuRoleList(null);
|
||||||
|
}
|
||||||
|
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||||
|
if (ids != null && !ids.isEmpty()) {
|
||||||
|
page.setMenuAllChildrenIdList(ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||||
List<SarAdvanceSearchVO> searchList = com.alibaba.fastjson.JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
List<SarAdvanceSearchVO> searchList = com.alibaba.fastjson.JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||||
String advanceStr = SarAdvanceSearchUtil.createSql(searchList,"SAR_BUSS_STAND_ATTR_INFO");
|
String advanceStr = SarAdvanceSearchUtil.createSql(searchList,"SAR_BUSS_STAND_ATTR_INFO");
|
||||||
@@ -250,24 +269,6 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
page.setAdvanceSearchStr(null);
|
page.setAdvanceSearchStr(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<String> getMenuIdList = new ArrayList<>();
|
|
||||||
if(userId != null){
|
|
||||||
getMenuIdList= tsUserService.getResourceUserId(userId);
|
|
||||||
}
|
|
||||||
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
|
|
||||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
|
||||||
page.setMenuRoleList(getMenuIdList);
|
|
||||||
} else {
|
|
||||||
page.setMenuRoleList(null);
|
|
||||||
}
|
|
||||||
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList("BUSINESS_STAND",page.getMenuId());
|
|
||||||
if(getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
|
||||||
page.setMenuRoleList(getMenuIdList);
|
|
||||||
}
|
|
||||||
List<String> ids = sarMenuEOService.getChildMenuList(page.getMenuId());
|
|
||||||
if (ids != null && !ids.isEmpty()) {
|
|
||||||
page.setMenuAllChildrenIdList(ids);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
page.setOrderBy("SAR_BUSSIONESS_STAND.issue_time is null,SAR_BUSSIONESS_STAND.issue_time desc,SAR_BUSSIONESS_STAND.id");
|
page.setOrderBy("SAR_BUSSIONESS_STAND.issue_time is null,SAR_BUSSIONESS_STAND.issue_time desc,SAR_BUSSIONESS_STAND.id");
|
||||||
if(userId != null){
|
if(userId != null){
|
||||||
|
|||||||
+9
-5
@@ -5,8 +5,10 @@ import com.adc.da.http.ResponseMessage;
|
|||||||
import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
import com.adc.da.slrs.sarInstitution.entity.TsInstitution;
|
import com.adc.da.slrs.sarInstitution.entity.TsInstitution;
|
||||||
import com.adc.da.slrs.sarInstitution.service.ITsInstitutionService;
|
import com.adc.da.slrs.sarInstitution.service.ITsInstitutionService;
|
||||||
|
import com.adc.da.slrs.sarUser.dao.TsUserDao;
|
||||||
import com.adc.da.slrs.sarUser.entity.TsUser;
|
import com.adc.da.slrs.sarUser.entity.TsUser;
|
||||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -33,6 +35,8 @@ public class TsInstitutionController extends BaseController<TsInstitution> {
|
|||||||
private ITsInstitutionService tsInstitutionService;
|
private ITsInstitutionService tsInstitutionService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITsUserService tsUserService;
|
private ITsUserService tsUserService;
|
||||||
|
@Autowired
|
||||||
|
private TsUserDao tsUserDao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有机构
|
* 查询所有机构
|
||||||
@@ -59,14 +63,14 @@ public class TsInstitutionController extends BaseController<TsInstitution> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询机构人员
|
* 查询机构人员
|
||||||
* @param institutionId:机构ID
|
|
||||||
* @return ResponseMessage<List<TsUser>>
|
* @return ResponseMessage<List<TsUser>>
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查询机构的人员")
|
@ApiOperation("查询机构的人员")
|
||||||
@GetMapping("/user")
|
@PostMapping("/user")
|
||||||
public ResponseMessage<List<TsUser>> getUserByInstitutionId(@RequestParam String institutionId){
|
public ResponseMessage<IPage<TsUser>> getUserByInstitutionId(TsUser tsUser){
|
||||||
List<TsUser> tsUsers=tsUserService.getUserByInstitutionId(institutionId);
|
// List<TsUser> tsUsers=tsUserService.getUserByInstitutionId(institutionId);
|
||||||
return Result.success(tsUsers);
|
IPage<TsUser> tsUserIPage = tsUserService.getUserByInstitutionId(tsUser);
|
||||||
|
return Result.success(tsUserIPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("导入机构数据")
|
@ApiOperation("导入机构数据")
|
||||||
|
|||||||
@@ -54,9 +54,12 @@ public interface TsInstitutionDao extends BaseMapper<TsInstitution> {
|
|||||||
* 查询根机构
|
* 查询根机构
|
||||||
* @return List<TsInstitution>
|
* @return List<TsInstitution>
|
||||||
*/
|
*/
|
||||||
@Select("select * from ts_institution where parent_id not in (select id from ts_institution)")
|
@Select("select * from ts_institution where parent_id not in (select id from ts_institution) order by name")
|
||||||
List<TsInstitution> selectRoot();
|
List<TsInstitution> selectRoot();
|
||||||
|
|
||||||
@Select("select * from ts_institution order by rand() limit 1")
|
@Select("select * from ts_institution order by rand() limit 1")
|
||||||
TsInstitution selectRand();
|
TsInstitution selectRand();
|
||||||
|
|
||||||
|
int clearData();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -42,4 +42,6 @@ public interface ITsInstitutionService extends IService<TsInstitution> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<TsInstitution> getFirst();
|
public List<TsInstitution> getFirst();
|
||||||
|
|
||||||
|
int clearData();
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -213,4 +213,9 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
|
|||||||
return tsInstitutions;
|
return tsInstitutions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int clearData() {
|
||||||
|
return tsInstitutionDao.clearData();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-18
@@ -57,16 +57,19 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
|||||||
QueryWrapper<SarLawsAttrDetailedList> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<SarLawsAttrDetailedList> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("stand_id",lawsDto.getId())
|
queryWrapper.eq("stand_id",lawsDto.getId())
|
||||||
.eq("detailed_list_id",sarFindDto.getId());
|
.eq("detailed_list_id",sarFindDto.getId());
|
||||||
List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists = sarLawsAttrDetailedListDao.selectList(queryWrapper);
|
/**
|
||||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getSsrq())){
|
*2021/9/13 摒弃使用清单实施日期,改用标准实施日期
|
||||||
lawsDto.setSSRQ(sarLawsAttrDetailedLists.get(0).getSsrq());
|
*/
|
||||||
}
|
// List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists = sarLawsAttrDetailedListDao.selectList(queryWrapper);/
|
||||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getXcxssrq())){
|
// if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getSsrq())){
|
||||||
lawsDto.setXCXSSRQGJ(sarLawsAttrDetailedLists.get(0).getXcxssrq());
|
// lawsDto.setSSRQ(sarLawsAttrDetailedLists.get(0).getSsrq());
|
||||||
}
|
// }
|
||||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getZccssrq())){
|
// if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getXcxssrq())){
|
||||||
lawsDto.setZCCSSRQGJ(sarLawsAttrDetailedLists.get(0).getZccssrq());
|
// lawsDto.setXCXSSRQGJ(sarLawsAttrDetailedLists.get(0).getXcxssrq());
|
||||||
}
|
// }
|
||||||
|
// if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getZccssrq())){
|
||||||
|
// lawsDto.setZCCSSRQGJ(sarLawsAttrDetailedLists.get(0).getZccssrq());
|
||||||
|
// }
|
||||||
if ("INLAND".equals(lawsDto.getStandType()))lawsDto.setStandType("INLAND_STAND");
|
if ("INLAND".equals(lawsDto.getStandType()))lawsDto.setStandType("INLAND_STAND");
|
||||||
if ("FOREIGN".equals(lawsDto.getStandType()))lawsDto.setStandType("FOREIGN_STAND");
|
if ("FOREIGN".equals(lawsDto.getStandType()))lawsDto.setStandType("FOREIGN_STAND");
|
||||||
}
|
}
|
||||||
@@ -281,18 +284,25 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
|||||||
xcx = mapList.get("新车型实施日期("+s.getCountry()+")");
|
xcx = mapList.get("新车型实施日期("+s.getCountry()+")");
|
||||||
zcc = mapList.get("在产车实施日期("+s.getCountry()+")");
|
zcc = mapList.get("在产车实施日期("+s.getCountry()+")");
|
||||||
|
|
||||||
|
}else {
|
||||||
|
dateTime(mapList,s);
|
||||||
}
|
}
|
||||||
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) {
|
private void dateTime(LinkedHashMap<String, List<String>> mapList, StandRegionalTimeDto s) {
|
||||||
putTime.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime()));
|
String putTime = new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime());
|
||||||
xcx.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq()));
|
String xcx = new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq());
|
||||||
zcc.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq()));
|
String zcc = new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq());
|
||||||
mapList.put("实施日期("+s.getCountry()+")",putTime);
|
// putTime.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime());
|
||||||
mapList.put("新车型实施日期("+s.getCountry()+")",xcx);
|
// xcx.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq()));
|
||||||
mapList.put("在产车实施日期("+s.getCountry()+")",zcc);
|
// zcc.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq()));
|
||||||
|
mapList.put("实施日期("+s.getCountry()+")", Collections.singletonList(putTime));
|
||||||
|
mapList.put("新车型实施日期("+s.getCountry()+")", Collections.singletonList(xcx));
|
||||||
|
mapList.put("在产车实施日期("+s.getCountry()+")", Collections.singletonList(zcc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -599,6 +599,11 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
@Override
|
@Override
|
||||||
public void standardToLaws(String countryArea,TimeDto timeDto) {
|
public void standardToLaws(String countryArea,TimeDto timeDto) {
|
||||||
|
|
||||||
|
if (countryArea==null){
|
||||||
|
countryArea="";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加入对应"国家/地区"的清单列表
|
* 加入对应"国家/地区"的清单列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
+3
-2
@@ -6,6 +6,7 @@ import com.adc.da.http.Result;
|
|||||||
import com.adc.da.slrs.sarPosition.entity.TsPositionRoleVO;
|
import com.adc.da.slrs.sarPosition.entity.TsPositionRoleVO;
|
||||||
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||||
import com.adc.da.slrs.sarRole.entity.TsRole;
|
import com.adc.da.slrs.sarRole.entity.TsRole;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
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;
|
||||||
@@ -38,8 +39,8 @@ public class TsPositionController extends BaseController<TsPosition> {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("查询岗位")
|
@ApiOperation("查询岗位")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ResponseMessage<List<TsPosition>> getPosition(TsPosition tsPosition){
|
public ResponseMessage<IPage<TsPosition>> getPosition(TsPosition tsPosition){
|
||||||
List<TsPosition> positions=tsPositionService.getPosition(tsPosition);
|
IPage<TsPosition> positions=tsPositionService.getPosition(tsPosition);
|
||||||
return Result.success(positions);
|
return Result.success(positions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ public interface TsPositionDao extends BaseMapper<TsPosition> {
|
|||||||
*/
|
*/
|
||||||
List<String> getRoleIdsByPositionIds(List<String> positionIds);
|
List<String> getRoleIdsByPositionIds(List<String> positionIds);
|
||||||
|
|
||||||
|
long pageTotal();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过roleId查询岗位ID列表
|
* 通过roleId查询岗位ID列表
|
||||||
* @param roleId:角色ID
|
* @param roleId:角色ID
|
||||||
|
|||||||
@@ -76,5 +76,12 @@ public class TsPosition extends BaseEntity {
|
|||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Timestamp createTime;
|
private Timestamp createTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer current;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer total;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -4,6 +4,7 @@ import com.adc.da.http.ResponseMessage;
|
|||||||
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||||
import com.adc.da.slrs.sarPosition.entity.TsPositionRoleVO;
|
import com.adc.da.slrs.sarPosition.entity.TsPositionRoleVO;
|
||||||
import com.adc.da.slrs.sarRole.entity.TsRole;
|
import com.adc.da.slrs.sarRole.entity.TsRole;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -23,7 +24,7 @@ public interface ITsPositionService extends IService<TsPosition> {
|
|||||||
* @param tsPosition:查询信息
|
* @param tsPosition:查询信息
|
||||||
* @return List<TsPosition>
|
* @return List<TsPosition>
|
||||||
*/
|
*/
|
||||||
List<TsPosition> getPosition(TsPosition tsPosition);
|
IPage<TsPosition> getPosition(TsPosition tsPosition);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置角色
|
* 配置角色
|
||||||
|
|||||||
+11
-2
@@ -9,6 +9,8 @@ import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
|||||||
import com.adc.da.slrs.sarRole.entity.TsRole;
|
import com.adc.da.slrs.sarRole.entity.TsRole;
|
||||||
import com.adc.da.utils.util.ListUtil;
|
import com.adc.da.utils.util.ListUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -40,9 +42,16 @@ public class TsPositionServiceImpl extends ServiceImpl<TsPositionDao, TsPosition
|
|||||||
* @return List<TsPosition>
|
* @return List<TsPosition>
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<TsPosition> getPosition(TsPosition tsPosition) {
|
public IPage<TsPosition> getPosition(TsPosition tsPosition) {
|
||||||
|
IPage page=new Page();
|
||||||
|
|
||||||
return tsPositionDao.selectPositionAndRole(tsPosition);
|
page.setTotal(tsPositionDao.pageTotal());
|
||||||
|
page.setRecords(tsPositionDao.selectPositionAndRole(tsPosition));
|
||||||
|
page.setCurrent(tsPosition.getCurrent());
|
||||||
|
page.setSize(tsPosition.getPageSize());
|
||||||
|
System.out.println(page.getTotal());
|
||||||
|
|
||||||
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
@@ -291,6 +291,7 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
|||||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||||
TsResourceQueryWrapper.eq("PARENT_ID",parent.getId());
|
TsResourceQueryWrapper.eq("PARENT_ID",parent.getId());
|
||||||
TsResourceQueryWrapper.in("ID",getMenuIdList);
|
TsResourceQueryWrapper.in("ID",getMenuIdList);
|
||||||
|
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||||
for(TsResource TsResource:children){
|
for(TsResource TsResource:children){
|
||||||
TsResource.setChildren(recursionGetListChildren((TsResource),(getMenuIdList)));
|
TsResource.setChildren(recursionGetListChildren((TsResource),(getMenuIdList)));
|
||||||
|
|||||||
+2
-2
@@ -39,7 +39,7 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
|
|||||||
@ApiOperation(value = "分页查询")
|
@ApiOperation(value = "分页查询")
|
||||||
@GetMapping("/SelectAllPage")
|
@GetMapping("/SelectAllPage")
|
||||||
public ResponseMessage selectAllPage(@RequestParam(defaultValue="1")Integer page,@RequestParam(defaultValue="10")Integer size,String categorg, String cname,
|
public ResponseMessage selectAllPage(@RequestParam(defaultValue="1")Integer page,@RequestParam(defaultValue="10")Integer size,String categorg, String cname,
|
||||||
String start, String end){
|
String start, String end,String type){
|
||||||
Date startdate = null;
|
Date startdate = null;
|
||||||
Date enddate = null;
|
Date enddate = null;
|
||||||
SimpleDateFormat formater = new SimpleDateFormat();
|
SimpleDateFormat formater = new SimpleDateFormat();
|
||||||
@@ -54,7 +54,7 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
|
|||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
IPage<SarPublicIdea> Publiclist =sarPublicIdeaService.selectAllP(page,size,categorg,cname,startdate,enddate);
|
IPage<SarPublicIdea> Publiclist =sarPublicIdeaService.selectAllP(page,size,categorg,cname,startdate,enddate,type);
|
||||||
return Result.success(Publiclist);
|
return Result.success(Publiclist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,5 +66,11 @@ public class SarPublicIdea extends BaseEntity {
|
|||||||
@TableField("uniques")
|
@TableField("uniques")
|
||||||
private String uniques;
|
private String uniques;
|
||||||
|
|
||||||
|
@TableField("files")
|
||||||
|
private String files;
|
||||||
|
|
||||||
|
@TableField("files_name")
|
||||||
|
private String filesName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -20,6 +20,6 @@ import java.util.Date;
|
|||||||
public interface ISarPublicIdeaService extends IService<SarPublicIdea> {
|
public interface ISarPublicIdeaService extends IService<SarPublicIdea> {
|
||||||
|
|
||||||
String add(SarPublicIdea sarPublicIdea);
|
String add(SarPublicIdea sarPublicIdea);
|
||||||
IPage<SarPublicIdea> selectAllP(Integer page, Integer size, String categorg, String cname, Date startdate, Date enddate);
|
IPage<SarPublicIdea> selectAllP(Integer page, Integer size, String categorg, String cname, Date startdate, Date enddate, String type);
|
||||||
IPage<SarPublicIdea> selectAllDynamic(SeByoDto seByoDto);
|
IPage<SarPublicIdea> selectAllDynamic(SeByoDto seByoDto);
|
||||||
}
|
}
|
||||||
|
|||||||
+30
-25
@@ -1,7 +1,6 @@
|
|||||||
package com.adc.da.slrs.sarStandIdea.service.Impl;
|
package com.adc.da.slrs.sarStandIdea.service.Impl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaDao;
|
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaDao;
|
||||||
|
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdea;
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdea;
|
||||||
@@ -22,7 +21,7 @@ import java.util.Date;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 服务实现类
|
* 服务实现类
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author super_liu
|
* @author super_liu
|
||||||
@@ -36,7 +35,7 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl<SarPublicIdeaDao, SarP
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String add(SarPublicIdea sarPublicIdea) {
|
public String add(SarPublicIdea sarPublicIdea) {
|
||||||
if (!sarPublicIdea.getId().isEmpty()){
|
if (!sarPublicIdea.getId().isEmpty()) {
|
||||||
sarPublicIdea.setId(UUIDUtils.randomUUID10());
|
sarPublicIdea.setId(UUIDUtils.randomUUID10());
|
||||||
sarPublicIdeaDao.insert(sarPublicIdea);
|
sarPublicIdeaDao.insert(sarPublicIdea);
|
||||||
return "增加成功";
|
return "增加成功";
|
||||||
@@ -45,22 +44,28 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl<SarPublicIdeaDao, SarP
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<SarPublicIdea> selectAllP(Integer p, Integer size, String category, String cname, Date start, Date end) {
|
public IPage<SarPublicIdea> selectAllP(Integer p, Integer size, String category, String cname, Date start, Date end, String type) {
|
||||||
QueryWrapper<SarPublicIdea> list = new QueryWrapper<>();
|
QueryWrapper<SarPublicIdea> list = new QueryWrapper<>();
|
||||||
list.like(StringUtils.isNotEmpty(category),"category",category)
|
if ("1".equals(type)) {
|
||||||
.like(StringUtils.isNotEmpty(cname),"cname",cname)
|
list.like(StringUtils.isNotEmpty(category), "category", category)
|
||||||
.ge(start!=null,"start_time",start)
|
.like(StringUtils.isNotEmpty(cname), "cname", cname)
|
||||||
.le(end!=null,"end_time",end)
|
.ge(start != null, "start_time", start)
|
||||||
.orderByAsc("end_time");
|
.le(end != null, "end_time", end)
|
||||||
Page<SarPublicIdea> page = new Page<>(p,size);
|
.orderByDesc("start_time");
|
||||||
|
} else {
|
||||||
|
list.like(StringUtils.isNotEmpty(category), "category", category)
|
||||||
|
.like(StringUtils.isNotEmpty(cname), "cname", cname)
|
||||||
|
.ge("end_time", new Date())
|
||||||
|
.orderByAsc("end_time");
|
||||||
|
}
|
||||||
|
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());
|
||||||
System.out.println("总页数"+userIPage.getPages());
|
System.out.println("总页数" + userIPage.getPages());
|
||||||
return userIPage;
|
return userIPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param seByoDto
|
* @param seByoDto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -72,33 +77,33 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl<SarPublicIdeaDao, SarP
|
|||||||
SimpleDateFormat formater = new SimpleDateFormat();
|
SimpleDateFormat formater = new SimpleDateFormat();
|
||||||
formater.applyPattern("yyyy-MM-dd");
|
formater.applyPattern("yyyy-MM-dd");
|
||||||
try {
|
try {
|
||||||
if (seByoDto.getStartTime()!=null){
|
if (seByoDto.getStartTime() != null) {
|
||||||
sar.setStartTime(formater.parse(seByoDto.getStartTime()));
|
sar.setStartTime(formater.parse(seByoDto.getStartTime()));
|
||||||
}
|
}
|
||||||
if (seByoDto.getEndTime()!=null){
|
if (seByoDto.getEndTime() != null) {
|
||||||
sar.setEndTime(formater.parse(seByoDto.getEndTime()));
|
sar.setEndTime(formater.parse(seByoDto.getEndTime()));
|
||||||
}
|
}
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
QueryWrapper<SarPublicIdea> wrapper = new QueryWrapper<>();
|
QueryWrapper<SarPublicIdea> wrapper = new QueryWrapper<>();
|
||||||
if (sar.getCategory()!=null&&sar.getCategory().length()!=0){
|
if (sar.getCategory() != null && sar.getCategory().length() != 0) {
|
||||||
wrapper.like("category",sar.getCategory());
|
wrapper.like("category", sar.getCategory());
|
||||||
}
|
}
|
||||||
if (sar.getCname()!=null&&sar.getCname().length()!=0){
|
if (sar.getCname() != null && sar.getCname().length() != 0) {
|
||||||
wrapper.like("cname",sar.getCname());
|
wrapper.like("cname", sar.getCname());
|
||||||
}
|
}
|
||||||
if (sar.getStartTime()!=null){
|
if (sar.getStartTime() != null) {
|
||||||
wrapper.le("start_time",sar.getStartTime());
|
wrapper.le("start_time", sar.getStartTime());
|
||||||
}
|
}
|
||||||
if (sar.getEndTime()!=null){
|
if (sar.getEndTime() != null) {
|
||||||
wrapper.gt("end_time",sar.getEndTime());
|
wrapper.gt("end_time", sar.getEndTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
Page<SarPublicIdea> page = new Page<>(seByoDto.getPage(), seByoDto.getSize());
|
Page<SarPublicIdea> page = new Page<>(seByoDto.getPage(), seByoDto.getSize());
|
||||||
IPage<SarPublicIdea> userIPage = sarPublicIdeaDao.selectPage(page, wrapper);
|
IPage<SarPublicIdea> userIPage = sarPublicIdeaDao.selectPage(page, wrapper);
|
||||||
System.out.println("总条数"+userIPage.getTotal());
|
System.out.println("总条数" + userIPage.getTotal());
|
||||||
System.out.println("总页数"+userIPage.getPages());
|
System.out.println("总页数" + userIPage.getPages());
|
||||||
return userIPage;
|
return userIPage;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -8,6 +8,7 @@ import com.adc.da.http.Result;
|
|||||||
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.service.impl.SarStandItemsServiceImpl;
|
import com.adc.da.slrs.sarStandItems.service.impl.SarStandItemsServiceImpl;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -55,7 +56,7 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
|
|||||||
|
|
||||||
@ApiOperation(value = "分解单查询")
|
@ApiOperation(value = "分解单查询")
|
||||||
@GetMapping("/querySarItemAndInterpretation")
|
@GetMapping("/querySarItemAndInterpretation")
|
||||||
public ResponseMessage querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
public ResponseMessage<PageInfo<SarStandItems>> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
||||||
List<SarStandItems> rows = ServiceImpl.querySarItemAndInterpretation(page);
|
List<SarStandItems> rows = ServiceImpl.querySarItemAndInterpretation(page);
|
||||||
|
|
||||||
PageInfo<SarStandItems> pageInfo = getPageInfo(page.getPager(), rows);
|
PageInfo<SarStandItems> pageInfo = getPageInfo(page.getPager(), rows);
|
||||||
|
|||||||
-3
@@ -13,9 +13,6 @@ import java.util.Date;
|
|||||||
public class FindSarItemsPageReqDTO extends BasePage {
|
public class FindSarItemsPageReqDTO extends BasePage {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private Integer page = 1;
|
|
||||||
private Integer pageSize = 20;
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "标准id")
|
@ApiModelProperty(value = "标准id")
|
||||||
private String standId;
|
private String standId;
|
||||||
|
|||||||
@@ -48,4 +48,8 @@ public class SarStandItemsDto {
|
|||||||
|
|
||||||
private String zccssrq;
|
private String zccssrq;
|
||||||
|
|
||||||
|
private String technicalRequir;
|
||||||
|
|
||||||
|
private String changePoint;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+48
-4
@@ -19,8 +19,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
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 java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -162,7 +161,7 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
}
|
}
|
||||||
List<String> standId = new ArrayList<>();
|
List<String> standId = new ArrayList<>();
|
||||||
for (SarStandardsInfo standardsInfo : pageInfo){
|
for (SarStandardsInfo standardsInfo : pageInfo){
|
||||||
if (standardsInfo.getAttrInfoCaseMap().get("fbgbjbd")!=null){
|
if (standardsInfo.getAttrInfoCaseMap().get("FBGBJBD")!=null || standardsInfo.getAttrInfoCaseMap().get("fbgbjbd")!=null){
|
||||||
standId.add(standardsInfo.getId());
|
standId.add(standardsInfo.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -193,11 +192,56 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
|
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
|
||||||
return dao.selectAllItemsByIds(type,ids);
|
List<SarStandItemsDto> list=dao.selectAllItemsByIds(type,ids);
|
||||||
|
List<SarStandItemsDto> res=new ArrayList<>();
|
||||||
|
if (null == list || list.isEmpty()){
|
||||||
|
return list;
|
||||||
|
}else {
|
||||||
|
List<Integer> integerList=new ArrayList<>();
|
||||||
|
Map<Integer,List<SarStandItemsDto>> map=new HashMap<>();
|
||||||
|
list.forEach(sarStandItemsDto -> {
|
||||||
|
int a= sarStandItemsDto.getItemsNum().indexOf(".");
|
||||||
|
String mark=sarStandItemsDto.getItemsNum();
|
||||||
|
if (a>0){
|
||||||
|
mark=mark.substring(0,a);
|
||||||
|
}
|
||||||
|
if (null != map.get(Integer.valueOf(mark))){
|
||||||
|
map.get(Integer.valueOf(mark)).add(sarStandItemsDto);
|
||||||
|
}else {
|
||||||
|
integerList.add(Integer.valueOf(mark));
|
||||||
|
List<SarStandItemsDto> middle=new ArrayList<>();
|
||||||
|
middle.add(sarStandItemsDto);
|
||||||
|
map.put(Integer.valueOf(mark),middle);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Collections.sort(integerList);
|
||||||
|
integerList.forEach(integer -> {
|
||||||
|
res.addAll(map.get(integer));
|
||||||
|
});
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<SarStandItems> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
public List<SarStandItems> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
||||||
|
//排序
|
||||||
|
if (page.getOrderBy()!=null && page.getOrder()!=null){
|
||||||
|
|
||||||
|
switch (page.getOrderBy()){
|
||||||
|
case "itemsNum" : page.setOrderBy("ITEMS_NUM"); break;
|
||||||
|
default:page.setOrderBy("ITEMS_NUM"); page.setOrder("DESC");
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (page.getOrder()){
|
||||||
|
case "descending":page.setOrder("DESC");break;
|
||||||
|
default:page.setOrder("ASC");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
page.setOrderBy("ITEMS_NUM");
|
||||||
|
page.setOrder("DESC");
|
||||||
|
}
|
||||||
|
|
||||||
//分页查询的总数
|
//分页查询的总数
|
||||||
Integer count=dao.sarItemCount(page);
|
Integer count=dao.sarItemCount(page);
|
||||||
page.getPager().setRowCount(count);
|
page.getPager().setRowCount(count);
|
||||||
|
|||||||
+7
-66
@@ -227,72 +227,13 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
|||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
@ApiOperation("同步车型项目数据")
|
@ApiOperation("同步车型项目数据")
|
||||||
public ResponseDto save(@RequestBody String jsonStr){
|
public ResponseDto save(@RequestBody String jsonStr){
|
||||||
Head head = new Head();
|
Head head = sarStandProjectLibraryService.AnalysisJsonAndStorage(jsonStr);
|
||||||
ResponseDto responseDto = new ResponseDto();
|
ArrayList<Company> companies = new ArrayList<>();
|
||||||
|
ResponseDto responseDto = new ResponseDto(head,companies);
|
||||||
// try {
|
Company company = new Company();
|
||||||
//是数组就JSONarray,是对象就JSONobject
|
company.setCOMPANY_CODE("");
|
||||||
//把字符串转换成对象
|
company.setFISCAL_YEAR("");
|
||||||
JsonObject jsonObject = (JsonObject) new JsonParser().parse(jsonStr);
|
companies.add(company);
|
||||||
//要把jsonObject里的HEAD强转成JsonObject类型
|
|
||||||
JsonObject HEAD = (JsonObject) jsonObject.get("HEAD");
|
|
||||||
//因为是最后要取的值了,所以就拿到之后把它转换成String类型
|
|
||||||
;
|
|
||||||
HEAD.get("CONSUMER").getAsString();
|
|
||||||
|
|
||||||
head.setBIZTRANSACTIONID(HEAD.get("BIZTRANSACTIONID").getAsString());
|
|
||||||
|
|
||||||
|
|
||||||
//LIST是数组,所以强转成JSONArray
|
|
||||||
JsonArray LIST = (JsonArray) jsonObject.get("LIST");
|
|
||||||
for (int i = 0; i < LIST.size(); i++) {
|
|
||||||
//把数组中的第一个强转成对象
|
|
||||||
JsonObject projectObject = (JsonObject) LIST.get(i);
|
|
||||||
|
|
||||||
//把刚刚拿到的值存到实体类里
|
|
||||||
SarStandProjectLibrary sarStandProjectLibrary = new SarStandProjectLibrary();
|
|
||||||
sarStandProjectLibrary
|
|
||||||
.setProjectPlatfor(projectObject.get("eng_platform").getAsString())
|
|
||||||
.setProjectNumber(projectObject.get("code").getAsString())
|
|
||||||
.setProjectName(projectObject.get("name").getAsString())
|
|
||||||
.setProjectClassification(projectObject.get("catalog_name").getAsString())
|
|
||||||
.setProjectStatus(projectObject.get("project_status").getAsString())
|
|
||||||
.setProjectGroup(projectObject.get("project_group_name").getAsString())
|
|
||||||
.setCurrentNode(projectObject.get("project_current_milestone").getAsString())
|
|
||||||
.setProjectLevel(projectObject.get("project_level").getAsString())
|
|
||||||
.setProductLine(projectObject.get("eng_product_line").getAsString());
|
|
||||||
|
|
||||||
projectObject.get("target_end_on").getAsString();
|
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
|
|
||||||
Date targetBeginOn = null;
|
|
||||||
try {
|
|
||||||
targetBeginOn = simpleDateFormat.parse(projectObject.get("target_begin_on").getAsString());
|
|
||||||
Date targetEndOn = simpleDateFormat.parse(projectObject.get("target_end_on").getAsString());
|
|
||||||
sarStandProjectLibrary
|
|
||||||
.setProjectStartDate(targetBeginOn)
|
|
||||||
.setProjectEndDate(targetEndOn);
|
|
||||||
|
|
||||||
} catch (ParseException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
sarStandProjectLibrary.setId(UUIDUtils.randomUUID20());
|
|
||||||
QueryWrapper<SarStandProjectLibrary> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq("project_number",sarStandProjectLibrary.getProjectNumber());
|
|
||||||
|
|
||||||
sarStandProjectLibraryService.saveOrUpdate(sarStandProjectLibrary,queryWrapper);
|
|
||||||
|
|
||||||
}
|
|
||||||
// }catch (Exception e){
|
|
||||||
// head.setERRORCODE("2");
|
|
||||||
// head.setRESULT("业务失败需要重做");
|
|
||||||
// return responseDto(head);
|
|
||||||
// }
|
|
||||||
head.setERRORCODE("0");
|
|
||||||
head.setRESULT("成功");
|
|
||||||
responseDto.setHEAD(head);
|
|
||||||
return responseDto;
|
return responseDto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.adc.da.slrs.sarStandProjectLibrary.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Company {
|
||||||
|
private String COMPANY_CODE;
|
||||||
|
|
||||||
|
private String FISCAL_YEAR;
|
||||||
|
}
|
||||||
+5
-2
@@ -17,8 +17,11 @@ public class ResponseDto {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
public ResponseDto(Head head) {
|
List<Company> LIST;
|
||||||
this.HEAD = head;
|
|
||||||
|
public ResponseDto(Head HEAD, List<Company> LIST) {
|
||||||
|
this.HEAD = HEAD;
|
||||||
|
this.LIST = LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResponseDto() {
|
public ResponseDto() {
|
||||||
|
|||||||
+7
-1
@@ -5,15 +5,17 @@ import java.util.Date;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
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>
|
||||||
*
|
*
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author ZhangJin
|
* @author ZhangJin
|
||||||
@@ -49,10 +51,14 @@ public class SarStandProjectLibrary extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "项目群")
|
@ApiModelProperty(value = "项目群")
|
||||||
private String projectGroup;
|
private String projectGroup;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "项目开始日期")
|
@ApiModelProperty(value = "项目开始日期")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
private Date projectStartDate;
|
private Date projectStartDate;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "项目完成日期")
|
@ApiModelProperty(value = "项目完成日期")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
private Date projectEndDate;
|
private Date projectEndDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "当前节点")
|
@ApiModelProperty(value = "当前节点")
|
||||||
|
|||||||
+1
@@ -19,5 +19,6 @@ public interface SarStandProjectLibraryService {
|
|||||||
void deleteByIds(List<StandProjectRelationDto> ids);
|
void deleteByIds(List<StandProjectRelationDto> ids);
|
||||||
void batchInsert(@Param("ids") List<StandProjectRelationDto> list);
|
void batchInsert(@Param("ids") List<StandProjectRelationDto> list);
|
||||||
List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto,String standId);
|
List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto,String standId);
|
||||||
|
public Head AnalysisJsonAndStorage(String jsonStr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+87
-8
@@ -1,4 +1,5 @@
|
|||||||
package com.adc.da.slrs.sarStandProjectLibrary.service.impl;
|
package com.adc.da.slrs.sarStandProjectLibrary.service.impl;
|
||||||
|
import com.adc.da.ocr.util.UUIDUtils;
|
||||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
|
import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
|
||||||
@@ -9,19 +10,17 @@ import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
|||||||
import com.adc.da.sys.service.IDicTypeEOService;
|
import com.adc.da.sys.service.IDicTypeEOService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
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.core.toolkit.StringUtils;
|
|
||||||
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 com.google.gson.JsonArray;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.JsonParser;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import redis.clients.jedis.ScanResult;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -42,7 +41,87 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
@Resource
|
@Resource
|
||||||
private IDicTypeEOService iDicTypeEOService;
|
private IDicTypeEOService iDicTypeEOService;
|
||||||
|
|
||||||
Date version = new Date();
|
public String TimeVersion(){
|
||||||
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
Date date = new Date();
|
||||||
|
String version = simpleDateFormat.format(date);
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Head AnalysisJsonAndStorage(String jsonStr){
|
||||||
|
Head head = new Head();
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
//是数组就JSONarray,是对象就JSONobject
|
||||||
|
//把字符串转换成对象
|
||||||
|
JsonObject jsonObject = (JsonObject) new JsonParser().parse(jsonStr);
|
||||||
|
//要把jsonObject里的HEAD强转成JsonObject类型
|
||||||
|
JsonObject HEAD = (JsonObject) jsonObject.get("HEAD");
|
||||||
|
//因为是最后要取的值了,所以就拿到之后把它转换成String类型
|
||||||
|
;
|
||||||
|
HEAD.get("CONSUMER").getAsString();
|
||||||
|
|
||||||
|
head.setBIZTRANSACTIONID(HEAD.get("BIZTRANSACTIONID").getAsString());
|
||||||
|
|
||||||
|
|
||||||
|
//LIST是数组,所以强转成JSONArray
|
||||||
|
JsonArray LIST = (JsonArray) jsonObject.get("LIST");
|
||||||
|
for (int i = 0; i < LIST.size(); i++) {
|
||||||
|
//把数组中的第一个强转成对象
|
||||||
|
JsonObject projectObject = (JsonObject) LIST.get(i);
|
||||||
|
|
||||||
|
//把刚刚拿到的值存到实体类里
|
||||||
|
SarStandProjectLibrary projectInfo = new SarStandProjectLibrary();
|
||||||
|
projectInfo
|
||||||
|
.setProjectPlatfor(projectObject.get("eng_platform").getAsString())
|
||||||
|
.setProjectNumber(projectObject.get("code").getAsString())
|
||||||
|
.setProjectName(projectObject.get("name").getAsString())
|
||||||
|
.setProjectClassification(projectObject.get("catalog_name").getAsString())
|
||||||
|
.setProjectStatus(projectObject.get("project_status").getAsString())
|
||||||
|
.setProjectGroup(projectObject.get("project_group_name").getAsString())
|
||||||
|
.setCurrentNode(projectObject.get("project_current_milestone").getAsString())
|
||||||
|
.setProjectLevel(projectObject.get("project_level").getAsString())
|
||||||
|
.setProductLine(projectObject.get("eng_product_line").getAsString());
|
||||||
|
|
||||||
|
projectObject.get("target_end_on").getAsString();
|
||||||
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
|
|
||||||
|
Date targetBeginOn = null;
|
||||||
|
try {
|
||||||
|
targetBeginOn = simpleDateFormat.parse(projectObject.get("target_begin_on").getAsString());
|
||||||
|
|
||||||
|
Date targetEndOn = simpleDateFormat.parse(projectObject.get("target_end_on").getAsString());
|
||||||
|
projectInfo
|
||||||
|
.setProjectStartDate(targetBeginOn)
|
||||||
|
.setProjectEndDate(targetEndOn);
|
||||||
|
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
projectInfo.setId(UUIDUtils.randomUUID20());
|
||||||
|
QueryWrapper<SarStandProjectLibrary> updateCondition = new QueryWrapper<SarStandProjectLibrary>();
|
||||||
|
updateCondition.eq("project_number",projectInfo.getProjectNumber());
|
||||||
|
// .eq("project_start_date",targetBeginOn);
|
||||||
|
|
||||||
|
|
||||||
|
this.saveOrUpdate(projectInfo,updateCondition);
|
||||||
|
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
head.setERRORCODE("2");
|
||||||
|
head.setRESULT("业务失败需要重做");
|
||||||
|
return head;
|
||||||
|
}
|
||||||
|
head.setERRORCODE("0");
|
||||||
|
head.setRESULT("成功");
|
||||||
|
|
||||||
|
return head;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<SarStandProjectLibrary> queryMaintenanceProject(int current, int pageSize,
|
public IPage<SarStandProjectLibrary> queryMaintenanceProject(int current, int pageSize,
|
||||||
@@ -278,7 +357,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
|
|
||||||
sarStandProjectLibraryDao.deleteByProjectId(list.get(0).getProjectId());
|
sarStandProjectLibraryDao.deleteByProjectId(list.get(0).getProjectId());
|
||||||
sarStandProjectLibraryDao.batchInsert(list);
|
sarStandProjectLibraryDao.batchInsert(list);
|
||||||
sarStandProjectLibraryDao.updateByProjectId(list.get(0).getProjectId(), String.valueOf(version));
|
sarStandProjectLibraryDao.updateByProjectId(list.get(0).getProjectId(), TimeVersion());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-2
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarStandProjectTeam.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.sarStandProjectLibrary.entity.Company;
|
||||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.Head;
|
import com.adc.da.slrs.sarStandProjectLibrary.entity.Head;
|
||||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.ResponseDto;
|
import com.adc.da.slrs.sarStandProjectLibrary.entity.ResponseDto;
|
||||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary;
|
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary;
|
||||||
@@ -16,6 +17,8 @@ import com.adc.da.slrs.sarStandProjectTeam.entity.SarStandProjectTeam;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -37,8 +40,12 @@ public class SarStandProjectTeamController extends BaseController<SarStandProjec
|
|||||||
@ApiOperation("同步PCMS组织信息")
|
@ApiOperation("同步PCMS组织信息")
|
||||||
public ResponseDto save(@RequestBody String jsonStr){
|
public ResponseDto save(@RequestBody String jsonStr){
|
||||||
Head head = sarStandProjectTeamService.AnalysisJsonAndStorage(jsonStr);
|
Head head = sarStandProjectTeamService.AnalysisJsonAndStorage(jsonStr);
|
||||||
|
ArrayList<Company> companies = new ArrayList<>();
|
||||||
ResponseDto responseDto = new ResponseDto(head);
|
Company company = new Company();
|
||||||
|
company.setCOMPANY_CODE("");
|
||||||
|
company.setFISCAL_YEAR("");
|
||||||
|
companies.add(company);
|
||||||
|
ResponseDto responseDto = new ResponseDto(head,companies);
|
||||||
return responseDto;
|
return responseDto;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
|||||||
|
|
||||||
List<SarStandardsInfo> selectStandardsByStandnumber(SarStandardsInfo sarStandardsInfoEO);
|
List<SarStandardsInfo> selectStandardsByStandnumber(SarStandardsInfo sarStandardsInfoEO);
|
||||||
|
|
||||||
List<SarStandardsInfo> queryStandInfoByList(@Param("limit") Integer limit);
|
List<SarStandardsInfo> queryStandInfoByList(@Param("limit") Integer limit,@Param("typeCode") String typeCode);
|
||||||
|
|
||||||
Integer selectStandColumn(@Param("columnName") String columnName);
|
Integer selectStandColumn(@Param("columnName") String columnName);
|
||||||
|
|
||||||
|
|||||||
+201
@@ -12,6 +12,16 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class SarBussionessStandEOPage extends BasePage {
|
public class SarBussionessStandEOPage extends BasePage {
|
||||||
|
|
||||||
|
private String textStatusBuss;
|
||||||
|
|
||||||
|
public String getTextStatusBuss() {
|
||||||
|
return textStatusBuss;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTextStatusBuss(String textStatusBuss) {
|
||||||
|
this.textStatusBuss = textStatusBuss;
|
||||||
|
}
|
||||||
|
|
||||||
private String modifyTime;
|
private String modifyTime;
|
||||||
private String modifyTime1;
|
private String modifyTime1;
|
||||||
private String modifyTime2;
|
private String modifyTime2;
|
||||||
@@ -111,6 +121,197 @@ public class SarBussionessStandEOPage extends BasePage {
|
|||||||
private String shunxu;
|
private String shunxu;
|
||||||
private String sql;
|
private String sql;
|
||||||
|
|
||||||
|
// 新增字段
|
||||||
|
private String FZRQBUSS;
|
||||||
|
private String FSRQBUSS;
|
||||||
|
private String FBGBUSS;
|
||||||
|
private String BZSMBUSS;
|
||||||
|
private String LSBBBUSS;
|
||||||
|
private String QTWJBUSS;
|
||||||
|
private String QCDW;
|
||||||
|
private String QCRBUSS;
|
||||||
|
private String WJSCRYBUSS;
|
||||||
|
private String SYCXCLASS;
|
||||||
|
private String NYLXCLASS;
|
||||||
|
private String SYCPXCLASS;
|
||||||
|
private String TXLBBUSS;
|
||||||
|
private String VPPSBMBUSS;
|
||||||
|
private String VPPSCNBUSS;
|
||||||
|
private String DTQBBHBUSS;
|
||||||
|
private String BDTQBBHBUSS;
|
||||||
|
private String XGJLBUSS;
|
||||||
|
private String XGLC;
|
||||||
|
private String GLWJBUSS;
|
||||||
|
private String XCSJBUSS;
|
||||||
|
|
||||||
|
public String getFZRQBUSS() {
|
||||||
|
return FZRQBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFZRQBUSS(String FZRQBUSS) {
|
||||||
|
this.FZRQBUSS = FZRQBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFSRQBUSS() {
|
||||||
|
return FSRQBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFSRQBUSS(String FSRQBUSS) {
|
||||||
|
this.FSRQBUSS = FSRQBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFBGBUSS() {
|
||||||
|
return FBGBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFBGBUSS(String FBGBUSS) {
|
||||||
|
this.FBGBUSS = FBGBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBZSMBUSS() {
|
||||||
|
return BZSMBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBZSMBUSS(String BZSMBUSS) {
|
||||||
|
this.BZSMBUSS = BZSMBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLSBBBUSS() {
|
||||||
|
return LSBBBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLSBBBUSS(String LSBBBUSS) {
|
||||||
|
this.LSBBBUSS = LSBBBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQTWJBUSS() {
|
||||||
|
return QTWJBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQTWJBUSS(String QTWJBUSS) {
|
||||||
|
this.QTWJBUSS = QTWJBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQCDW() {
|
||||||
|
return QCDW;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQCDW(String QCDW) {
|
||||||
|
this.QCDW = QCDW;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQCRBUSS() {
|
||||||
|
return QCRBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQCRBUSS(String QCRBUSS) {
|
||||||
|
this.QCRBUSS = QCRBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWJSCRYBUSS() {
|
||||||
|
return WJSCRYBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWJSCRYBUSS(String WJSCRYBUSS) {
|
||||||
|
this.WJSCRYBUSS = WJSCRYBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSYCXCLASS() {
|
||||||
|
return SYCXCLASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSYCXCLASS(String SYCXCLASS) {
|
||||||
|
this.SYCXCLASS = SYCXCLASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNYLXCLASS() {
|
||||||
|
return NYLXCLASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNYLXCLASS(String NYLXCLASS) {
|
||||||
|
this.NYLXCLASS = NYLXCLASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSYCPXCLASS() {
|
||||||
|
return SYCPXCLASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSYCPXCLASS(String SYCPXCLASS) {
|
||||||
|
this.SYCPXCLASS = SYCPXCLASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTXLBBUSS() {
|
||||||
|
return TXLBBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTXLBBUSS(String TXLBBUSS) {
|
||||||
|
this.TXLBBUSS = TXLBBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVPPSBMBUSS() {
|
||||||
|
return VPPSBMBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVPPSBMBUSS(String VPPSBMBUSS) {
|
||||||
|
this.VPPSBMBUSS = VPPSBMBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVPPSCNBUSS() {
|
||||||
|
return VPPSCNBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVPPSCNBUSS(String VPPSCNBUSS) {
|
||||||
|
this.VPPSCNBUSS = VPPSCNBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDTQBBHBUSS() {
|
||||||
|
return DTQBBHBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDTQBBHBUSS(String DTQBBHBUSS) {
|
||||||
|
this.DTQBBHBUSS = DTQBBHBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBDTQBBHBUSS() {
|
||||||
|
return BDTQBBHBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBDTQBBHBUSS(String BDTQBBHBUSS) {
|
||||||
|
this.BDTQBBHBUSS = BDTQBBHBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXGJLBUSS() {
|
||||||
|
return XGJLBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXGJLBUSS(String XGJLBUSS) {
|
||||||
|
this.XGJLBUSS = XGJLBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXGLC() {
|
||||||
|
return XGLC;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXGLC(String XGLC) {
|
||||||
|
this.XGLC = XGLC;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGLWJBUSS() {
|
||||||
|
return GLWJBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGLWJBUSS(String GLWJBUSS) {
|
||||||
|
this.GLWJBUSS = GLWJBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXCSJBUSS() {
|
||||||
|
return XCSJBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXCSJBUSS(String XCSJBUSS) {
|
||||||
|
this.XCSJBUSS = XCSJBUSS;
|
||||||
|
}
|
||||||
|
|
||||||
public String getZqcrId() {
|
public String getZqcrId() {
|
||||||
return zqcrId;
|
return zqcrId;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -155,6 +155,8 @@ public class SarStandardsInfo extends BaseEntity {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String standNatureShow; // 标准性质显示名称
|
private String standNatureShow; // 标准性质显示名称
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
private String standTextStatusShow; // 标准文本状态显示名称
|
||||||
|
@TableField(exist = false)
|
||||||
private String sychronId; // 同步数据ID
|
private String sychronId; // 同步数据ID
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<DicTypeEO> dicTypeList = new ArrayList(); // 记录标准涉及到的所有数据字典数据
|
private List<DicTypeEO> dicTypeList = new ArrayList(); // 记录标准涉及到的所有数据字典数据
|
||||||
@@ -607,5 +609,13 @@ public class SarStandardsInfo extends BaseEntity {
|
|||||||
public void setStandSystemName(String standSystemName) {
|
public void setStandSystemName(String standSystemName) {
|
||||||
this.standSystemName = standSystemName;
|
this.standSystemName = standSystemName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getStandTextStatusShow() {
|
||||||
|
return standTextStatusShow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStandTextStatusShow(String standTextStatusShow) {
|
||||||
|
this.standTextStatusShow = standTextStatusShow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+44
-1
@@ -49,6 +49,10 @@ import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
|||||||
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
||||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||||
|
import com.adc.da.slrs.tsDictionaryType.dao.TsDicTypeDao;
|
||||||
|
import com.adc.da.slrs.tsDictionaryType.dao.TsDictionaryDao;
|
||||||
|
import com.adc.da.slrs.tsDictionaryType.entity.TsDicType;
|
||||||
|
import com.adc.da.slrs.tsDictionaryType.entity.TsDictionary;
|
||||||
import com.adc.da.sys.common.SelectionResult;
|
import com.adc.da.sys.common.SelectionResult;
|
||||||
import com.adc.da.sys.constant.ValueStateEnum;
|
import com.adc.da.sys.constant.ValueStateEnum;
|
||||||
import com.adc.da.sys.dao.DicTypeEODao;
|
import com.adc.da.sys.dao.DicTypeEODao;
|
||||||
@@ -203,6 +207,12 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
@Autowired
|
@Autowired
|
||||||
private StandLawsSearchService standLawsSearchService;
|
private StandLawsSearchService standLawsSearchService;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TsDictionaryDao tsDictionaryDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TsDicTypeDao tsDicTypeDao;
|
||||||
// /**
|
// /**
|
||||||
// * 反向操作标准
|
// * 反向操作标准
|
||||||
// */
|
// */
|
||||||
@@ -439,11 +449,16 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void attrInfoShowDetails(List<SarStandardsInfo> sarlist) throws Exception {
|
public void attrInfoShowDetails(List<SarStandardsInfo> sarlist) throws Exception {
|
||||||
for (SarStandardsInfo row : sarlist) {
|
for (SarStandardsInfo row : sarlist) {
|
||||||
attrInfoDetails(row);
|
attrInfoDetails(row);
|
||||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||||
|
//存在的分解单文本名称列表
|
||||||
|
LinkedList<String> itemExistList = new LinkedList<>();
|
||||||
|
getAttrMap.put("itemExistList",itemExistList);
|
||||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||||
String name = entry.getKey();
|
String name = entry.getKey();
|
||||||
String value = "";
|
String value = "";
|
||||||
@@ -452,6 +467,15 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
if (StringUtils.isNotBlank(value)) {
|
if (StringUtils.isNotBlank(value)) {
|
||||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||||
entry.setValue(fileObj);
|
entry.setValue(fileObj);
|
||||||
|
//以标准id和文本类型查询分解单表 有数据设标记为为 1
|
||||||
|
FindSarItemsPageReqDTO sarItemCount = new FindSarItemsPageReqDTO();
|
||||||
|
sarItemCount.setStandId(row.getId());
|
||||||
|
sarItemCount.setFileType(name);
|
||||||
|
Integer sarItemsCount = standItemsDao.sarItemCount(sarItemCount);
|
||||||
|
if (sarItemsCount>0){
|
||||||
|
//存在分解单的文本名称存入列表
|
||||||
|
itemExistList.add(name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||||
value = entry.getValue().toString();
|
value = entry.getValue().toString();
|
||||||
@@ -2018,9 +2042,28 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
return strhours;
|
return strhours;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SarStandardsInfo> getStandInfoByList(String limit){
|
public List<SarStandardsInfo> getStandInfoByList(String limit){
|
||||||
return dao.queryStandInfoByList(Integer.valueOf(limit));
|
|
||||||
|
//查询文本状态为即将实施的
|
||||||
|
QueryWrapper<TsDictionary> dictionaryWrapper = new QueryWrapper<>();
|
||||||
|
dictionaryWrapper.select("ID")
|
||||||
|
.eq("DICTIONARY_NAME","文本状态");
|
||||||
|
List<Map<String, Object>> dicMaps = tsDictionaryDao.selectMaps(dictionaryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
QueryWrapper<TsDicType> dicTypeWrapper = new QueryWrapper<>();
|
||||||
|
dicTypeWrapper.select("DIC_TYPE_CODE")
|
||||||
|
.eq("DIC_ID",dicMaps.get(0).get("ID").toString())
|
||||||
|
.eq("DIC_TYPE_NAME","即将实施");
|
||||||
|
|
||||||
|
List<Map<String, Object>> typeMaps = tsDicTypeDao.selectMaps(dicTypeWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
List<SarStandardsInfo> standInfoList = dao.queryStandInfoByList(Integer.valueOf(limit), typeMaps.get(0).get("DIC_TYPE_CODE").toString());
|
||||||
|
return standInfoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,10 +9,12 @@ import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
|||||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||||
import com.adc.da.slrs.sarUrl.dao.TsUrlDao;
|
import com.adc.da.slrs.sarUrl.dao.TsUrlDao;
|
||||||
import com.adc.da.slrs.sarUser.dao.TsUserDao;
|
import com.adc.da.slrs.sarUser.dao.TsUserDao;
|
||||||
|
import com.adc.da.slrs.sarUser.entity.UpDTO;
|
||||||
import com.adc.da.slrs.sarUser.entity.UserPositionVO;
|
import com.adc.da.slrs.sarUser.entity.UserPositionVO;
|
||||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
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.*;
|
||||||
@@ -80,5 +82,12 @@ public class TsUserController extends BaseController<TsUser> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("查询人接口悬浮窗")
|
||||||
|
@GetMapping("/selectUp")
|
||||||
|
public ResponseMessage<List<UpDTO>> selectUp(@Param("uname") String uname) throws Exception {
|
||||||
|
return Result.success(tsUserService.selectByName(uname));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package com.adc.da.slrs.sarUser.dao;
|
package com.adc.da.slrs.sarUser.dao;
|
||||||
|
|
||||||
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.slrs.sarUser.entity.TsUser;
|
import com.adc.da.slrs.sarUser.entity.TsUser;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Delete;
|
import org.apache.ibatis.annotations.Delete;
|
||||||
import org.apache.ibatis.annotations.Insert;
|
import org.apache.ibatis.annotations.Insert;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -45,8 +47,9 @@ public interface TsUserDao extends BaseMapper<TsUser> {
|
|||||||
* @param institutionId:岗位ID
|
* @param institutionId:岗位ID
|
||||||
* @return List<TsUser>
|
* @return List<TsUser>
|
||||||
*/
|
*/
|
||||||
List<TsUser> getUserAndPosition(String institutionId);
|
List<TsUser> getUserAndPositionPage(@Param("start")Integer start, @Param("end")Integer end,@Param("TsUser") TsUser tsUser);
|
||||||
|
|
||||||
|
Integer getUserAndPositionCount(@Param("TsUser") TsUser tsUser);
|
||||||
/**
|
/**
|
||||||
* 通过岗位Id列表查询用户ID列表
|
* 通过岗位Id列表查询用户ID列表
|
||||||
* @param positionIds:岗位ID列表
|
* @param positionIds:岗位ID列表
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import javax.validation.constraints.NotNull;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author zxy
|
* @author zxy
|
||||||
@@ -142,6 +142,14 @@ public class TsUser extends BaseEntity {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<TsPosition> positions;
|
private List<TsPosition> positions;
|
||||||
|
|
||||||
|
@ApiModelProperty("当前页")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer current;
|
||||||
|
|
||||||
|
@ApiModelProperty("每页条数")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer size;
|
||||||
|
|
||||||
public TsUser() {
|
public TsUser() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.adc.da.slrs.sarUser.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UpDTO {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
}
|
||||||
@@ -4,7 +4,9 @@ import com.adc.da.http.ResponseMessage;
|
|||||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||||
import com.adc.da.slrs.sarUser.entity.TsUser;
|
import com.adc.da.slrs.sarUser.entity.TsUser;
|
||||||
|
import com.adc.da.slrs.sarUser.entity.UpDTO;
|
||||||
import com.adc.da.slrs.sarUser.entity.UserPositionVO;
|
import com.adc.da.slrs.sarUser.entity.UserPositionVO;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -25,7 +27,7 @@ public interface ITsUserService extends IService<TsUser> {
|
|||||||
* @param institutionId:机构ID
|
* @param institutionId:机构ID
|
||||||
* @return List<TsUser>
|
* @return List<TsUser>
|
||||||
*/
|
*/
|
||||||
List<TsUser> getUserByInstitutionId(String institutionId);
|
IPage<TsUser> getUserByInstitutionId(TsUser tsUser);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 封禁、解禁用户
|
* 封禁、解禁用户
|
||||||
@@ -73,4 +75,6 @@ public interface ITsUserService extends IService<TsUser> {
|
|||||||
void parseUser() throws Exception;
|
void parseUser() throws Exception;
|
||||||
|
|
||||||
List<SarMenu> getSecondMenusByUserId(String userId);
|
List<SarMenu> getSecondMenusByUserId(String userId);
|
||||||
|
|
||||||
|
List<UpDTO> selectByName(String name);
|
||||||
}
|
}
|
||||||
|
|||||||
+32
-3
@@ -14,6 +14,7 @@ import com.adc.da.slrs.sarRole.service.ITsRoleService;
|
|||||||
import com.adc.da.slrs.sarUser.entity.SyncUser;
|
import com.adc.da.slrs.sarUser.entity.SyncUser;
|
||||||
import com.adc.da.slrs.sarUser.entity.TsUser;
|
import com.adc.da.slrs.sarUser.entity.TsUser;
|
||||||
import com.adc.da.slrs.sarUser.dao.TsUserDao;
|
import com.adc.da.slrs.sarUser.dao.TsUserDao;
|
||||||
|
import com.adc.da.slrs.sarUser.entity.UpDTO;
|
||||||
import com.adc.da.slrs.sarUser.entity.UserPositionVO;
|
import com.adc.da.slrs.sarUser.entity.UserPositionVO;
|
||||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||||
import com.adc.da.sync.service.SyncUserService;
|
import com.adc.da.sync.service.SyncUserService;
|
||||||
@@ -23,12 +24,15 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -60,12 +64,21 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过机构ID查询人员
|
* 通过机构ID查询人员
|
||||||
* @param institutionId:机构ID
|
|
||||||
* @return List<TsUser>
|
* @return List<TsUser>
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<TsUser> getUserByInstitutionId(String institutionId) {
|
public IPage<TsUser> getUserByInstitutionId(TsUser tsUser) {
|
||||||
return tsUserDao.getUserAndPosition(institutionId);
|
// return tsUserDao.getUserAndPosition(institutionId);
|
||||||
|
Page<TsUser> tsUserPage = new Page<>();
|
||||||
|
System.out.println(tsUser.getCurrent());
|
||||||
|
System.out.println(tsUser.getSize());
|
||||||
|
List<TsUser> tsUserList = tsUserDao.getUserAndPositionPage((tsUser.getCurrent()-1)*tsUser.getSize(),1*tsUser.getSize(),tsUser);
|
||||||
|
Integer total = tsUserDao.getUserAndPositionCount(tsUser);
|
||||||
|
tsUserPage.setRecords(tsUserList);
|
||||||
|
tsUserPage.setCurrent(tsUser.getCurrent());
|
||||||
|
tsUserPage.setSize(tsUser.getSize());
|
||||||
|
tsUserPage.setTotal(total);
|
||||||
|
return tsUserPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -262,4 +275,20 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
|
|||||||
List<String> menuIds=tsRoleService.getMenuIdsByRoleIds(roleIds);
|
List<String> menuIds=tsRoleService.getMenuIdsByRoleIds(roleIds);
|
||||||
return sarMenuService.getSecondMenuByIds(menuIds);
|
return sarMenuService.getSecondMenuByIds(menuIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UpDTO> selectByName(String name) {
|
||||||
|
QueryWrapper<TsUser> tsUserQueryWrapper=new QueryWrapper<>();
|
||||||
|
tsUserQueryWrapper.like("ACCOUNT",name);
|
||||||
|
tsUserQueryWrapper.or().like("UNAME",name);
|
||||||
|
List<TsUser> res= tsUserDao.selectList(tsUserQueryWrapper);
|
||||||
|
List<UpDTO> result=new ArrayList<>();
|
||||||
|
res.forEach(tsUser -> {
|
||||||
|
UpDTO upDTO=new UpDTO();
|
||||||
|
upDTO.setValue(tsUser.getUname()+"("+tsUser.getAccount()+")");
|
||||||
|
upDTO.setId(tsUser.getUserId());
|
||||||
|
result.add(upDTO);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+54
-12
@@ -7,12 +7,18 @@ import java.util.List;
|
|||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
import com.adc.da.http.PageInfo;
|
import com.adc.da.http.PageInfo;
|
||||||
import com.adc.da.person.entity.PersonMsgEO;
|
import com.adc.da.person.entity.PersonMsgEO;
|
||||||
|
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||||
|
import com.adc.da.slrs.sarStandItems.service.impl.SarStandItemsServiceImpl;
|
||||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardsInfoEO;
|
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardsInfoEO;
|
||||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO;
|
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO;
|
||||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEOPage;
|
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEOPage;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO;
|
||||||
import com.adc.da.slrs.standardSplit.entity.SarLawsInfoEO;
|
import com.adc.da.slrs.standardSplit.entity.SarLawsInfoEO;
|
||||||
import com.adc.da.slrs.standardSplit.service.*;
|
import com.adc.da.slrs.standardSplit.service.*;
|
||||||
import com.adc.da.sys.util.LoginUserUtil;
|
import com.adc.da.sys.util.LoginUserUtil;
|
||||||
|
import com.adc.da.util.UUIDUtils;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -162,21 +168,56 @@ public class SarFileSplitInfoEOController extends BaseController<SarFileSplitInf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SarStandItemsServiceImpl ServiceImpl;
|
||||||
@ApiOperation(value = "|SarFileSplitInfoEO|关联")
|
@ApiOperation(value = "|SarFileSplitInfoEO|关联")
|
||||||
@PostMapping("/connectToStandItems")
|
@PostMapping("/connectToStandItems")
|
||||||
public ResponseMessage connectToStandItems(@RequestBody List<SarFileSplitInfoEO> sarFileSplitInfoEOList) throws Exception {
|
public ResponseMessage connectToStandItems(@RequestBody List<SarFileSplitInfoEO> sarFileSplitInfoEOList) throws Exception {
|
||||||
for (SarFileSplitInfoEO sarFileSplitInfoEO:sarFileSplitInfoEOList) {
|
List<SarFileSplitItemsEO> querySame = null;
|
||||||
List<SarStandardsInfoEO> getList = new ArrayList<>();
|
|
||||||
List<SarLawsInfoEO> sarLawsInfoEOList = new ArrayList<>();
|
/**
|
||||||
|
* 删除原来的分解单
|
||||||
|
*/
|
||||||
|
|
||||||
|
QueryWrapper<SarStandItems> removeWrapper = new QueryWrapper<>();
|
||||||
|
removeWrapper.eq("STAND_ID",sarFileSplitInfoEOList.get(0).getStandId())
|
||||||
|
.eq("FILE_TYPE",sarFileSplitInfoEOList.get(0).getFileType());
|
||||||
|
ServiceImpl.remove(removeWrapper);
|
||||||
|
for (SarFileSplitInfoEO sarFileSplitInfoEO : sarFileSplitInfoEOList) {
|
||||||
|
// List<SarStandardsInfoEO> getList = new ArrayList<>();
|
||||||
|
// List<SarLawsInfoEO> sarLawsInfoEOList = new ArrayList<>();
|
||||||
|
|
||||||
|
querySame = sarFileSplitInfoEOService.querySame(sarFileSplitInfoEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使选定的拆分条款 插入分解单
|
||||||
|
*/
|
||||||
|
querySame.forEach(item->{
|
||||||
|
QueryWrapper<SarStandItems> sarStandItemsQueryWrapper = new QueryWrapper<>();
|
||||||
|
sarStandItemsQueryWrapper.eq("edit_flag",item.getEditFlag());
|
||||||
|
SarStandItems sarStandItems = new SarStandItems();
|
||||||
|
sarStandItems.setStandId(sarFileSplitInfoEO.getStandId());
|
||||||
|
sarStandItems.setEditFlag(item.getEditFlag());
|
||||||
|
sarStandItems.setItemsName(item.getItemsName());
|
||||||
|
sarStandItems.setTermsConditions(item.getItermsConditions());
|
||||||
|
sarStandItems.setItemsNum(item.getItemsNum());
|
||||||
|
sarStandItems.setId(UUIDUtils.randomUUID20());
|
||||||
|
sarStandItems.setFileType(sarFileSplitInfoEO.getFileType());
|
||||||
|
ServiceImpl.saveOrUpdate(sarStandItems,sarStandItemsQueryWrapper);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
//根据标准号查询标准是否存在
|
//根据标准号查询标准是否存在
|
||||||
String standNum="";
|
// String standNum="";
|
||||||
if (StringUtils.isNotEmpty(sarFileSplitInfoEO.getStandId())) {
|
// if (StringUtils.isNotEmpty(sarFileSplitInfoEO.getStandId())) {
|
||||||
standNum=sarFileSplitInfoEO.getShowNumber();
|
// standNum=sarFileSplitInfoEO.getShowNumber();
|
||||||
} else if(StringUtils.isNotEmpty(sarFileSplitInfoEO.getStandNumSplit())){
|
// } else if(StringUtils.isNotEmpty(sarFileSplitInfoEO.getStandNumSplit())){
|
||||||
standNum=sarFileSplitInfoEO.getStandNumSplit();
|
// standNum=sarFileSplitInfoEO.getStandNumSplit();
|
||||||
}else{
|
// }else{
|
||||||
return Result.error("标准号不能为空");
|
// return Result.error("标准号不能为空");
|
||||||
}
|
// }
|
||||||
// if (sarFileSplitInfoEO.getFileType().equals("ZCWB") || sarFileSplitInfoEO.getFileType().equals("GCGJ")) {
|
// if (sarFileSplitInfoEO.getFileType().equals("ZCWB") || sarFileSplitInfoEO.getFileType().equals("GCGJ")) {
|
||||||
// SarLawsInfoEOPage page = new SarLawsInfoEOPage();
|
// SarLawsInfoEOPage page = new SarLawsInfoEOPage();
|
||||||
// page.setLawsType("FOREIGN");
|
// page.setLawsType("FOREIGN");
|
||||||
@@ -201,7 +242,8 @@ public class SarFileSplitInfoEOController extends BaseController<SarFileSplitInf
|
|||||||
// return Result.error("0", "该条数据标准号在标准库中不存在");
|
// return Result.error("0", "该条数据标准号在标准库中不存在");
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
return Result.error("0","关联失败");
|
// return Result.error("0","关联失败");
|
||||||
|
return Result.success(querySame);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "|SarFileSplitInfoEO|标准拆分编辑")
|
@ApiOperation(value = "|SarFileSplitInfoEO|标准拆分编辑")
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.adc.da.slrs.standardSplit.dao;
|
|||||||
|
|
||||||
import com.adc.da.base.page.BasePage;
|
import com.adc.da.base.page.BasePage;
|
||||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO;
|
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO;
|
||||||
|
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -36,4 +37,6 @@ public interface SarFileSplitInfoEODao extends BaseMapper<SarFileSplitInfoEO> {
|
|||||||
|
|
||||||
int deleteByIds(SarFileSplitInfoEO sarFileSplitInfoEO);
|
int deleteByIds(SarFileSplitInfoEO sarFileSplitInfoEO);
|
||||||
|
|
||||||
|
List<SarFileSplitItemsEO> querySame (SarFileSplitInfoEO sarFileSplitInfoEO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -4,6 +4,7 @@ import com.adc.da.base.page.BasePage;
|
|||||||
import com.adc.da.person.entity.PersonMsgEO;
|
import com.adc.da.person.entity.PersonMsgEO;
|
||||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO;
|
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO;
|
||||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEOPage;
|
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEOPage;
|
||||||
|
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -30,4 +31,6 @@ public interface SarFileSplitInfoEOService {
|
|||||||
PersonMsgEO updateNew(PersonMsgEO val) throws Exception;
|
PersonMsgEO updateNew(PersonMsgEO val) throws Exception;
|
||||||
|
|
||||||
String getClauseBySplitId(String standNum, String fileType);
|
String getClauseBySplitId(String standNum, String fileType);
|
||||||
|
|
||||||
|
List<SarFileSplitItemsEO> querySame (SarFileSplitInfoEO sarFileSplitInfoEO);
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-6
@@ -2,6 +2,7 @@ package com.adc.da.slrs.standardSplit.service.impl;
|
|||||||
|
|
||||||
import com.adc.da.att.service.IAttFileEOService;
|
import com.adc.da.att.service.IAttFileEOService;
|
||||||
import com.adc.da.person.entity.PersonMsgEO;
|
import com.adc.da.person.entity.PersonMsgEO;
|
||||||
|
import com.adc.da.slrs.sarStandAttrDetails.service.ISarStandAttrDetailsService;
|
||||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||||
import com.adc.da.slrs.standardSplit.dao.*;
|
import com.adc.da.slrs.standardSplit.dao.*;
|
||||||
import com.adc.da.slrs.standardSplit.service.SarLawsInfoEOService;
|
import com.adc.da.slrs.standardSplit.service.SarLawsInfoEOService;
|
||||||
@@ -10,8 +11,11 @@ import com.adc.da.base.page.BasePage;
|
|||||||
import com.adc.da.common.ReadWordTable;
|
import com.adc.da.common.ReadWordTable;
|
||||||
import com.adc.da.slrs.standardSplit.entity.*;
|
import com.adc.da.slrs.standardSplit.entity.*;
|
||||||
import com.adc.da.slrs.standardSplit.service.SarFileSplitInfoEOService;
|
import com.adc.da.slrs.standardSplit.service.SarFileSplitInfoEOService;
|
||||||
|
import com.adc.da.sys.common.SelectionResult;
|
||||||
import com.adc.da.sys.util.LoginUserUtil;
|
import com.adc.da.sys.util.LoginUserUtil;
|
||||||
import com.adc.da.sys.util.UUIDUtils;
|
import com.adc.da.sys.util.UUIDUtils;
|
||||||
|
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.xwpf.usermodel.*;
|
import org.apache.poi.xwpf.usermodel.*;
|
||||||
@@ -46,6 +50,9 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|||||||
public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService {
|
public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitInfoEOServiceImpl.class);
|
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitInfoEOServiceImpl.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarStandAttrDetailsService sarStandAttrDetailsEOService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAttFileEOService attFileEOService;
|
private IAttFileEOService attFileEOService;
|
||||||
@Value("${file.path}")
|
@Value("${file.path}")
|
||||||
@@ -335,7 +342,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
middle=messageList;
|
middle=messageList;
|
||||||
for (SarFileSplitItemsEO mis:messageList) {
|
for (SarFileSplitItemsEO mis:messageList) {
|
||||||
mis.setWorkFlowShow("1");
|
mis.setWorkFlowShow("1");
|
||||||
if (mis.getItemsNum().equals("1") || mis.getItemsNum().startsWith("1.") || mis.getItemsNum().equals("2") || mis.getItemsNum().startsWith("2.") || mis.getItemsNum().equals("3") || mis.getItemsNum().startsWith("3.")){
|
if (mis.getItemsNum().equals("2") || mis.getItemsNum().startsWith("2.") || mis.getItemsNum().equals("3") || mis.getItemsNum().startsWith("3.")){
|
||||||
mis.setWorkFlowShow("0");
|
mis.setWorkFlowShow("0");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -349,6 +356,11 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
messageList.forEach(sarFileSplitItemsEO -> {
|
||||||
|
if (sarFileSplitItemsEO.getItemsNum().equals("1")){
|
||||||
|
sarFileSplitItemsEO.setWorkFlowShow("1");
|
||||||
|
}
|
||||||
|
});
|
||||||
sarFileSplitMenuEODao.insertForeach(treeList);
|
sarFileSplitMenuEODao.insertForeach(treeList);
|
||||||
sarFileSplitItemsEODao.insertForeach(messageList);
|
sarFileSplitItemsEODao.insertForeach(messageList);
|
||||||
sarFileSplitItemsValEODao.insertForeach(itemValList);
|
sarFileSplitItemsValEODao.insertForeach(itemValList);
|
||||||
@@ -583,11 +595,11 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
page.getPager().setRowCount(rowCount);
|
page.getPager().setRowCount(rowCount);
|
||||||
List<SarFileSplitInfoEO> rows = sarFileSplitInfoEODao.queryByPageOwn(page);
|
List<SarFileSplitInfoEO> rows = sarFileSplitInfoEODao.queryByPageOwn(page);
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
map.put("CA", "草稿");
|
|
||||||
map.put("ZQYJG", "征求意见稿");
|
List<SelectionResult> selectionResults = sarStandAttrDetailsEOService.selectFileFieldForSel(null);
|
||||||
map.put("BPG", "报批稿");
|
selectionResults.forEach(detailsEO->{
|
||||||
map.put("SSG", "送审稿");
|
map.put(detailsEO.getValue(),detailsEO.getLabel());
|
||||||
map.put("FBGBJBD", "发布稿(必读)");
|
});
|
||||||
|
|
||||||
if (rows != null && !rows.isEmpty()) {
|
if (rows != null && !rows.isEmpty()) {
|
||||||
for (SarFileSplitInfoEO infoEO : rows) {
|
for (SarFileSplitInfoEO infoEO : rows) {
|
||||||
@@ -730,4 +742,9 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
return rows.get(0).getId();
|
return rows.get(0).getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SarFileSplitItemsEO> querySame (SarFileSplitInfoEO sarFileSplitInfoEO){
|
||||||
|
return dao.querySame(sarFileSplitInfoEO);
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -101,14 +102,18 @@ public class BussStandExportUtil {
|
|||||||
case "英文名称":
|
case "英文名称":
|
||||||
value = sarStandardsInfoEO.getStandEnName();
|
value = sarStandardsInfoEO.getStandEnName();
|
||||||
break;
|
break;
|
||||||
case "标准状态":
|
case "文本状态":
|
||||||
value = sarStandardsInfoEO.getStandStatusShow();
|
value = sarStandardsInfoEO.getStandStatusShow();
|
||||||
break;
|
break;
|
||||||
case "标准实施日期":
|
case "标准实施日期":
|
||||||
if (sarStandardsInfoEO.getPutTime() != null) {
|
String putTime="";
|
||||||
String issueTime = sdf.format(sarStandardsInfoEO.getPutTime());
|
if (Date.class.equals(sarStandardsInfoEO.getPutTime())) {
|
||||||
value = issueTime;
|
putTime = sdf.format(sarStandardsInfoEO.getPutTime());
|
||||||
|
|
||||||
|
}else {
|
||||||
|
putTime=sarStandardsInfoEO.getPutTime();
|
||||||
}
|
}
|
||||||
|
value = putTime;
|
||||||
break;
|
break;
|
||||||
case "代替企标编号":
|
case "代替企标编号":
|
||||||
value = sarStandardsInfoEO.getReplaceStandNum();
|
value = sarStandardsInfoEO.getReplaceStandNum();
|
||||||
@@ -117,10 +122,13 @@ public class BussStandExportUtil {
|
|||||||
value = sarStandardsInfoEO.getReplacedStandNum();
|
value = sarStandardsInfoEO.getReplacedStandNum();
|
||||||
break;
|
break;
|
||||||
case "发布日期":
|
case "发布日期":
|
||||||
if (sarStandardsInfoEO.getIssueTime() != null) {
|
String issueTime="";
|
||||||
String issueTime = sdf.format(sarStandardsInfoEO.getIssueTime());
|
if (Date.class.equals(sarStandardsInfoEO.getIssueTime().getClass())){
|
||||||
value = issueTime;
|
issueTime = sdf.format(sarStandardsInfoEO.getIssueTime());
|
||||||
|
}else {
|
||||||
|
issueTime=sarStandardsInfoEO.getIssueTime();
|
||||||
}
|
}
|
||||||
|
value = issueTime;
|
||||||
break;
|
break;
|
||||||
case "复审日期":
|
case "复审日期":
|
||||||
String field1 = attrInfoMap.get(name);
|
String field1 = attrInfoMap.get(name);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class FieldConvertUtil {
|
|||||||
"文本状态,发布日期"; // 导出基础表字段 //删除 实施日期 2021-05-28
|
"文本状态,发布日期"; // 导出基础表字段 //删除 实施日期 2021-05-28
|
||||||
|
|
||||||
public static String exportBaseFieldNamesForeign = "标准类别,标准编号,标准年份,中文名称,英文名称," +
|
public static String exportBaseFieldNamesForeign = "标准类别,标准编号,标准年份,中文名称,英文名称," +
|
||||||
"文本状态,发布日期,文本说明,是否纳入认证清单,体系类别,标签,适用产品线,适用认证,能源类型,责任工程师," +
|
"文本状态,发布日期,文本说明,是否纳入认证清单,体系类别,标签,适用认证,能源类型," +
|
||||||
"关联文件,发布稿,增补件,勘误件,草案"; // 导出基础表字段
|
"关联文件,发布稿,增补件,勘误件,草案"; // 导出基础表字段
|
||||||
|
|
||||||
public static String exportAttrFieldNamesInland = "归口管理部门,发布机构,工作组信息,我司参与深度,适用车辆类型,要求类型," +
|
public static String exportAttrFieldNamesInland = "归口管理部门,发布机构,工作组信息,我司参与深度,适用车辆类型,要求类型," +
|
||||||
@@ -51,7 +51,7 @@ public class FieldConvertUtil {
|
|||||||
"个性化标签,政策文本,过程稿件,新车型实施日期(文本),在产车实施日期(文本),EOP实施日期(文本),SVPPS," +
|
"个性化标签,政策文本,过程稿件,新车型实施日期(文本),在产车实施日期(文本),EOP实施日期(文本),SVPPS," +
|
||||||
"相关部门,责任部门,FO,维护工程师,归口管理部门,发布机构,我司是否参与,相关资料";
|
"相关部门,责任部门,FO,维护工程师,归口管理部门,发布机构,我司是否参与,相关资料";
|
||||||
|
|
||||||
public static String exportBaseFieldNamesBuss = "企标编号,中文名称,英文名称,标准状态,发布日期,标准实施日期," +
|
public static String exportBaseFieldNamesBuss = "企标编号,中文名称,英文名称,文本状态,发布日期,标准实施日期," +
|
||||||
"代替企标编号,被代替企标编号";
|
"代替企标编号,被代替企标编号";
|
||||||
|
|
||||||
public static String exportAttrFieldNamesBuss = "SVPPS,规范性引用文件,废止日期,复审日期,密级,授权,相关部门," +
|
public static String exportAttrFieldNamesBuss = "SVPPS,规范性引用文件,废止日期,复审日期,密级,授权,相关部门," +
|
||||||
|
|||||||
@@ -101,10 +101,14 @@ public class StandExportUtil {
|
|||||||
Map<String,Object> attrValueMap = sarStandardsInfoEO.getAttrInfoMap();
|
Map<String,Object> attrValueMap = sarStandardsInfoEO.getAttrInfoMap();
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case "标准性质":
|
case "标准性质":
|
||||||
value = sarStandardsInfoEO.getStandNature();
|
value = sarStandardsInfoEO.getStandNatureShow();
|
||||||
break;
|
break;
|
||||||
case "是否纳入认证清单":
|
case "是否纳入认证清单":
|
||||||
value = sarStandardsInfoEO.getIsRelateAccess();
|
switch (sarStandardsInfoEO.getIsRelateAccess()){
|
||||||
|
case "0": value="否"; break;
|
||||||
|
case "1": value="是"; break;
|
||||||
|
default:value="";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "标准体系":
|
case "标准体系":
|
||||||
value = sarStandardsInfoEO.getStandSystem();
|
value = sarStandardsInfoEO.getStandSystem();
|
||||||
@@ -137,8 +141,8 @@ public class StandExportUtil {
|
|||||||
case "英文名称":
|
case "英文名称":
|
||||||
value = sarStandardsInfoEO.getStandEnName();
|
value = sarStandardsInfoEO.getStandEnName();
|
||||||
break;
|
break;
|
||||||
case "标准状态":
|
case "文本状态":
|
||||||
value = sarStandardsInfoEO.getStandStateShow();
|
value = sarStandardsInfoEO.getStandTextStatusShow();
|
||||||
break;
|
break;
|
||||||
case "发布日期":
|
case "发布日期":
|
||||||
if (sarStandardsInfoEO.getIssueTime() != null) {
|
if (sarStandardsInfoEO.getIssueTime() != null) {
|
||||||
|
|||||||
@@ -408,12 +408,14 @@
|
|||||||
<select id="querySarItemAndInterpretation" resultMap="sarItemVOResultMap"
|
<select id="querySarItemAndInterpretation" resultMap="sarItemVOResultMap"
|
||||||
parameterType="com.adc.da.slrs.sarStandItems.entity.FindSarItemsPageReqDTO">
|
parameterType="com.adc.da.slrs.sarStandItems.entity.FindSarItemsPageReqDTO">
|
||||||
SELECT
|
SELECT
|
||||||
*
|
sar_stand_items.*,split_pid(sar_stand_items.ITEMS_NUM,'.') as tt
|
||||||
FROM
|
FROM
|
||||||
sar_stand_items
|
sar_stand_items
|
||||||
<include refid="sarItemWhere"/>
|
<include refid="sarItemWhere"/>
|
||||||
LIMIT #{page},#{pageSize}
|
<if test="orderBy !=null and orderBy!=''">
|
||||||
|
order by tt ${order}
|
||||||
|
</if>
|
||||||
|
LIMIT ${pager.startIndex-1},${pageSize}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询SAR_STAND_ITEMS列表 -->
|
<!-- 查询SAR_STAND_ITEMS列表 -->
|
||||||
@@ -729,7 +731,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectAllItemsByIds" resultType="com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto">
|
<select id="selectAllItemsByIds" resultType="com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto">
|
||||||
select ID,STAND_ID,ITEMS_NUM,ITEMS_NAME,RESPONSIBLE_UNIT,SVPPS,APPLY_ARCTIC,CLAIM_TYPE,BUS_STAND_COVER,DUTY_ENGINEER as responsibleEngineer,XCXSSRQ as xcxssrq,ZCCSSRQ as zccssrq
|
select ID,STAND_ID,ITEMS_NUM,ITEMS_NAME,RESPONSIBLE_UNIT,SVPPS,APPLY_ARCTIC,CLAIM_TYPE,BUS_STAND_COVER,DUTY_ENGINEER as responsibleEngineer,XCXSSRQ as xcxssrq,ZCCSSRQ as zccssrq ,read_content as technicalRequir ,compared_with_previous as changePoint
|
||||||
from SAR_STAND_ITEMS
|
from SAR_STAND_ITEMS
|
||||||
where FILE_TYPE=#{type}
|
where FILE_TYPE=#{type}
|
||||||
<if test="ids != null">
|
<if test="ids != null">
|
||||||
@@ -738,6 +740,7 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
order by ITEMS_NUM
|
||||||
</select>
|
</select>
|
||||||
<select id="selectStandTime" resultType="com.adc.da.slrs.sarStandItems.entity.StandsTimeDto">
|
<select id="selectStandTime" resultType="com.adc.da.slrs.sarStandItems.entity.StandsTimeDto">
|
||||||
select STAND_ID,XCXSSRQ,ZCCSSRQ
|
select STAND_ID,XCXSSRQ,ZCCSSRQ
|
||||||
|
|||||||
+2
-2
@@ -136,7 +136,7 @@
|
|||||||
|
|
||||||
<!-- 查询字段及对应数据-->
|
<!-- 查询字段及对应数据-->
|
||||||
<select id="selectStandFieldAndData" resultType="Map">
|
<select id="selectStandFieldAndData" resultType="Map">
|
||||||
SELECT ${fieldInfo}
|
SELECT STAND_ID,${fieldInfo}
|
||||||
FROM SAR_BUSS_STAND_ATTR_INFO
|
FROM SAR_BUSS_STAND_ATTR_INFO
|
||||||
WHERE valid_flag=0 and stand_id = #{standId}
|
WHERE valid_flag=0 and stand_id = #{standId}
|
||||||
</select>
|
</select>
|
||||||
@@ -161,4 +161,4 @@
|
|||||||
FROM SAR_BUSS_STAND_ATTR_INFO
|
FROM SAR_BUSS_STAND_ATTR_INFO
|
||||||
WHERE stand_id = #{standId} and valid_flag=0
|
WHERE stand_id = #{standId} and valid_flag=0
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+14
@@ -363,6 +363,17 @@
|
|||||||
left join SAR_BUSS_STAND_ATTR_INFO on (SAR_BUSS_STAND_ATTR_INFO.STAND_ID = SAR_BUSSIONESS_STAND.id and SAR_BUSS_STAND_ATTR_INFO.valid_flag=0)
|
left join SAR_BUSS_STAND_ATTR_INFO on (SAR_BUSS_STAND_ATTR_INFO.STAND_ID = SAR_BUSSIONESS_STAND.id and SAR_BUSS_STAND_ATTR_INFO.valid_flag=0)
|
||||||
where 1=1
|
where 1=1
|
||||||
<trim suffixOverrides="," >
|
<trim suffixOverrides="," >
|
||||||
|
|
||||||
|
<if test="putTime!=null">
|
||||||
|
and put_time=#{putTime}
|
||||||
|
</if>
|
||||||
|
<if test="issueTime!=null">
|
||||||
|
and issue_time=#{issueTime}
|
||||||
|
</if>
|
||||||
|
<if test="textStatusBuss!=null">
|
||||||
|
and text_status_buss=#{textStatusBuss}
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test="standCode != null" >
|
<if test="standCode != null" >
|
||||||
<!-- and (
|
<!-- and (
|
||||||
(concat(dicstandSort.DIC_TYPE_NAME, ' ', SAR_BUSSIONESS_STAND.STAND_CODE, '-', SAR_BUSSIONESS_STAND.STAND_YEAR)
|
(concat(dicstandSort.DIC_TYPE_NAME, ' ', SAR_BUSSIONESS_STAND.STAND_CODE, '-', SAR_BUSSIONESS_STAND.STAND_YEAR)
|
||||||
@@ -449,6 +460,9 @@
|
|||||||
<if test="standStatus != null" >
|
<if test="standStatus != null" >
|
||||||
and SAR_BUSSIONESS_STAND.STAND_STATUS = #{standStatus}
|
and SAR_BUSSIONESS_STAND.STAND_STATUS = #{standStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="standEnName != null">
|
||||||
|
and SAR_BUSSIONESS_STAND.STAND_EN_NAME like concat('%', #{standEnName},'%')
|
||||||
|
</if>
|
||||||
<if test="advanceSearchStr != null">
|
<if test="advanceSearchStr != null">
|
||||||
and (${advanceSearchStr})
|
and (${advanceSearchStr})
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
+6
-2
@@ -45,12 +45,12 @@
|
|||||||
left join ts_user u
|
left join ts_user u
|
||||||
on i.id=u.institution_id
|
on i.id=u.institution_id
|
||||||
<if test="userName == null">
|
<if test="userName == null">
|
||||||
where i.parent_id not in (select id from ts_institution)
|
where i.parent_id not in (select id from ts_institution) order by i.name
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="userName != null">
|
<if test="userName != null">
|
||||||
|
|
||||||
where u.uname like concat('%','${userName}','%')
|
where u.uname like concat('%','${userName}','%') or u.account like concat('%','${userName}','%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -68,4 +68,8 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<delete id="clearData">
|
||||||
|
delete from ts_institution
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+50
-3
@@ -122,7 +122,31 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</where>
|
</where>
|
||||||
group by a.ID
|
|
||||||
|
UNION
|
||||||
|
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||||
|
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||||
|
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||||
|
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||||
|
a.ID = b.STAND_ID
|
||||||
|
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||||
|
<where>
|
||||||
|
<if test="standName != null">
|
||||||
|
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||||
|
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||||
|
and
|
||||||
|
</if>
|
||||||
|
<if test="fileType !=null">
|
||||||
|
ssi.FILE_TYPE = #{fileType} and
|
||||||
|
</if>
|
||||||
|
<if test="standType !=null">
|
||||||
|
a.STAND_TYPE = #{standType} and
|
||||||
|
</if>
|
||||||
|
a.ID IN
|
||||||
|
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
limit #{start},#{end}
|
limit #{start},#{end}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -150,13 +174,36 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</where>
|
</where>
|
||||||
group by a.ID
|
UNION
|
||||||
|
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||||
|
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||||
|
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||||
|
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||||
|
a.ID = b.STAND_ID
|
||||||
|
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||||
|
<where>
|
||||||
|
<if test="standName != null">
|
||||||
|
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||||
|
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||||
|
and
|
||||||
|
</if>
|
||||||
|
<if test="fileType !=null">
|
||||||
|
ssi.FILE_TYPE = #{fileType} and
|
||||||
|
</if>
|
||||||
|
<if test="standType !=null">
|
||||||
|
a.STAND_TYPE = #{standType} and
|
||||||
|
</if>
|
||||||
|
a.ID IN
|
||||||
|
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTimes" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandRegionalTimeDto">
|
<select id="selectTimes" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandRegionalTimeDto">
|
||||||
SELECT
|
SELECT
|
||||||
b.country_area AS country,
|
b.country_area AS country,
|
||||||
a.ssrq AS ssrq,
|
a.ssrq AS putTime,
|
||||||
a.xcxssrq AS xcxssrq,
|
a.xcxssrq AS xcxssrq,
|
||||||
a.zccssrq AS zccssrq
|
a.zccssrq AS zccssrq
|
||||||
FROM
|
FROM
|
||||||
|
|||||||
@@ -32,6 +32,13 @@
|
|||||||
p.name like concat(concat('%',#{name}),'%')
|
p.name like concat(concat('%',#{name}),'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
<if test=" null!= pageSize ">
|
||||||
|
limit ${(current-1) * pageSize},${pageSize}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="pageTotal" resultType="Long">
|
||||||
|
select count(1) as total from ts_position
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRoleIdsByPositionIds" resultType="String">
|
<select id="getRoleIdsByPositionIds" resultType="String">
|
||||||
|
|||||||
+2
@@ -50,6 +50,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||||
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||||
|
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||||
</if>
|
</if>
|
||||||
limit #{start},#{end}
|
limit #{start},#{end}
|
||||||
</select>
|
</select>
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||||
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||||
|
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -8,13 +8,15 @@
|
|||||||
<result column="STAND_ID" property="standId"/>
|
<result column="STAND_ID" property="standId"/>
|
||||||
<result column="ITEMS_NAME" property="itemsName"/>
|
<result column="ITEMS_NAME" property="itemsName"/>
|
||||||
<result column="ITEMS_NUM" property="itemsNum"/>
|
<result column="ITEMS_NUM" property="itemsNum"/>
|
||||||
<result column="STAND_NUMBER" property="standCode"/>
|
<result column="STAND_NUMBER" property="standNum"/>
|
||||||
<result column="STAND_NAME" property="standName"/>
|
<result column="STAND_NAME" property="standName"/>
|
||||||
<result column="XCXSSRQ" property="XCXSSRQ"/>
|
<result column="XCXSSRQ" property="XCXSSRQ"/>
|
||||||
<result column="ZCCSSRQ" property="ZCCSSRQ"/>
|
<result column="ZCCSSRQ" property="ZCCSSRQ"/>
|
||||||
<result column="CLLX" property="applyType"/>
|
<result column="CLLX" property="applyType"/>
|
||||||
<result column="STAND_TYPE" property="standType"/>
|
<result column="STAND_TYPE" property="standType"/>
|
||||||
<result column="DUTY_ENGINEER" property="dutyEngineer"/>
|
<result column="DUTY_ENGINEER" property="dutyEngineer"/>
|
||||||
|
<result column="STAND_SORT" property="standSort"/>
|
||||||
|
<result column="STAND_YEAR" property="standYear"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<!-- 查询条件 -->
|
<!-- 查询条件 -->
|
||||||
<select id="selectWithinTerm" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
|
<select id="selectWithinTerm" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
|
||||||
@@ -25,6 +27,8 @@
|
|||||||
items.TERMS_CONDITIONS,
|
items.TERMS_CONDITIONS,
|
||||||
items.DUTY_ENGINEER,
|
items.DUTY_ENGINEER,
|
||||||
items.STAND_ID,
|
items.STAND_ID,
|
||||||
|
info.STAND_SORT,
|
||||||
|
info.STAND_YEAR,
|
||||||
info.STAND_NAME,
|
info.STAND_NAME,
|
||||||
info.STAND_TYPE,
|
info.STAND_TYPE,
|
||||||
info.STAND_NUMBER,
|
info.STAND_NUMBER,
|
||||||
|
|||||||
+22
-5
@@ -61,7 +61,7 @@
|
|||||||
SAR_STANDARDS_INFO.stand_state, SAR_STANDARDS_INFO.stand_nature, SAR_STANDARDS_INFO.issue_time, SAR_STANDARDS_INFO.put_time,
|
SAR_STANDARDS_INFO.stand_state, SAR_STANDARDS_INFO.stand_nature, SAR_STANDARDS_INFO.issue_time, SAR_STANDARDS_INFO.put_time,
|
||||||
concat(SAR_STANDARDS_INFO.synopsis, '') as synopsis, concat(replace_stand_num, '') as replace_stand_num, replaced_stand_num, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
concat(SAR_STANDARDS_INFO.synopsis, '') as synopsis, concat(replace_stand_num, '') as replace_stand_num, replaced_stand_num, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
||||||
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,dicountry.DIC_TYPE_NAME as countryShow, dicstandSort.DIC_TYPE_NAME as standSortShow,
|
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,dicountry.DIC_TYPE_NAME as countryShow, dicstandSort.DIC_TYPE_NAME as standSortShow,
|
||||||
dicstandState.DIC_TYPE_NAME as standStateShow,dicstandNature.DIC_TYPE_NAME as standNatureShow,is_relate_access,cite_stand,cited_stand,SAR_STANDARDS_INFO.text_status,SAR_STANDARDS_INFO.STAND_SYSTEM
|
dicstandState.DIC_TYPE_NAME as standStateShow,dicstandNature.DIC_TYPE_NAME as standNatureShow,dicstandTextStatus.DIC_TYPE_NAME as standTextStatusShow,is_relate_access,cite_stand,cited_stand,SAR_STANDARDS_INFO.text_status,SAR_STANDARDS_INFO.STAND_SYSTEM
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="Group_Column_List_Show">
|
<sql id="Group_Column_List_Show">
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
SAR_STANDARDS_INFO.stand_state, SAR_STANDARDS_INFO.stand_nature, SAR_STANDARDS_INFO.issue_time, SAR_STANDARDS_INFO.put_time,
|
SAR_STANDARDS_INFO.stand_state, SAR_STANDARDS_INFO.stand_nature, SAR_STANDARDS_INFO.issue_time, SAR_STANDARDS_INFO.put_time,
|
||||||
concat(SAR_STANDARDS_INFO.synopsis, ''), concat(replace_stand_num, ''), replaced_stand_num, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
concat(SAR_STANDARDS_INFO.synopsis, ''), concat(replace_stand_num, ''), replaced_stand_num, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
||||||
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,dicountry.DIC_TYPE_NAME, dicstandSort.DIC_TYPE_NAME,
|
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,dicountry.DIC_TYPE_NAME, dicstandSort.DIC_TYPE_NAME,
|
||||||
dicstandState.DIC_TYPE_NAME,dicstandNature.DIC_TYPE_NAME,is_relate_access,cite_stand,cited_stand,SAR_STANDARDS_INFO.text_status,SAR_STANDARDS_INFO.STAND_SYSTEM
|
dicstandState.DIC_TYPE_NAME,dicstandNature.DIC_TYPE_NAME,dicstandTextStatus.DIC_TYPE_NAME,is_relate_access,cite_stand,cited_stand,SAR_STANDARDS_INFO.text_status,SAR_STANDARDS_INFO.STAND_SYSTEM
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 查询条件 -->
|
<!-- 查询条件 -->
|
||||||
@@ -380,6 +380,11 @@
|
|||||||
dicstandState.dic_id is not null and dicstandState.valid_flag = 0 )
|
dicstandState.dic_id is not null and dicstandState.valid_flag = 0 )
|
||||||
left join TS_DICTYPE dicstandNature on (dicstandNature.dic_type_code = SAR_STANDARDS_INFO.stand_nature and
|
left join TS_DICTYPE dicstandNature on (dicstandNature.dic_type_code = SAR_STANDARDS_INFO.stand_nature and
|
||||||
dicstandNature.dic_id is not null and dicstandNature.valid_flag = 0 )
|
dicstandNature.dic_id is not null and dicstandNature.valid_flag = 0 )
|
||||||
|
LEFT JOIN TS_DICTYPE dicstandTextStatus ON (
|
||||||
|
dicstandTextStatus.dic_type_code = SAR_STANDARDS_INFO.text_status
|
||||||
|
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||||
|
AND dicstandTextStatus.valid_flag = 0
|
||||||
|
)
|
||||||
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
||||||
left join TS_RESOURCE on SAR_STAND_MENU.menu_id = TS_RESOURCE.id
|
left join TS_RESOURCE on SAR_STAND_MENU.menu_id = TS_RESOURCE.id
|
||||||
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
|
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
|
||||||
@@ -595,7 +600,7 @@
|
|||||||
) AS issueTime
|
) AS issueTime
|
||||||
from SAR_STANDARDS_INFO
|
from SAR_STANDARDS_INFO
|
||||||
<include refid="SarStandardsInfo_Where_Clause"/>
|
<include refid="SarStandardsInfo_Where_Clause"/>
|
||||||
GROUP BY <include refid="Group_Column_List_Show"/>,CHJL,SAR_STAND_ATTR_INFO.XCXSSRQ,SAR_STAND_ATTR_INFO.ZCCSSRQ
|
GROUP BY <include refid="Group_Column_List_Show"/>,CHJL,SAR_STAND_ATTR_INFO.XCXSSRQ,SAR_STAND_ATTR_INFO.ZCCSSRQ,SAR_STAND_ATTR_INFO.SSRQ
|
||||||
order by
|
order by
|
||||||
${orderBy1} ${order1},SAR_STANDARDS_INFO.id
|
${orderBy1} ${order1},SAR_STANDARDS_INFO.id
|
||||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||||
@@ -646,12 +651,19 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryStandInfoByList" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
<select id="queryStandInfoByList" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List"/>
|
<include refid="Base_Column_List"/>
|
||||||
FROM sar_standards_info
|
FROM sar_standards_info
|
||||||
LEFT JOIN sar_stand_attr_info ssai ON ssai.STAND_ID = SAR_STANDARDS_INFO.ID
|
LEFT JOIN sar_stand_attr_info ssai ON ssai.STAND_ID = SAR_STANDARDS_INFO.ID
|
||||||
WHERE DATE_FORMAT(ssai.SSRQ,'%Y-%m-%D') >= DATE_FORMAT(SAR_STANDARDS_INFO.ISSUE_TIME,'%Y-%m-%D')
|
WHERE
|
||||||
|
DATE_FORMAT(ssai.SSRQ, '%Y-%m-%d') >= DATE_FORMAT(
|
||||||
|
SAR_STANDARDS_INFO.ISSUE_TIME,
|
||||||
|
'%Y-%m-%d'
|
||||||
|
)
|
||||||
|
AND
|
||||||
|
sar_standards_info.VALID_FLAG='0'
|
||||||
|
AND TEXT_STATUS=#{typeCode}
|
||||||
ORDER BY SAR_STANDARDS_INFO.ISSUE_TIME DESC
|
ORDER BY SAR_STANDARDS_INFO.ISSUE_TIME DESC
|
||||||
LIMIT #{limit}
|
LIMIT #{limit}
|
||||||
</select>
|
</select>
|
||||||
@@ -739,6 +751,11 @@
|
|||||||
dicstandState.dic_id is not null and dicstandState.valid_flag = 0 )
|
dicstandState.dic_id is not null and dicstandState.valid_flag = 0 )
|
||||||
left join TS_DICTYPE dicstandNature on (dicstandNature.dic_type_code = SAR_STANDARDS_INFO.stand_nature and
|
left join TS_DICTYPE dicstandNature on (dicstandNature.dic_type_code = SAR_STANDARDS_INFO.stand_nature and
|
||||||
dicstandNature.dic_id is not null and dicstandNature.valid_flag = 0 )
|
dicstandNature.dic_id is not null and dicstandNature.valid_flag = 0 )
|
||||||
|
LEFT JOIN TS_DICTYPE dicstandTextStatus ON (
|
||||||
|
dicstandTextStatus.dic_type_code = SAR_STANDARDS_INFO.text_status
|
||||||
|
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||||
|
AND dicstandTextStatus.valid_flag = 0
|
||||||
|
)
|
||||||
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
||||||
left join TS_RESOURCE on SAR_STAND_MENU.menu_id = TS_RESOURCE.id
|
left join TS_RESOURCE on SAR_STAND_MENU.menu_id = TS_RESOURCE.id
|
||||||
where SAR_STANDARDS_INFO.id = #{id}
|
where SAR_STANDARDS_INFO.id = #{id}
|
||||||
|
|||||||
@@ -28,13 +28,29 @@
|
|||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getUserAndPosition" resultMap="UserPosition">
|
<select id="getUserAndPositionPage" parameterType="com.adc.da.slrs.sarUser.entity.TsUser" resultMap="UserPosition">
|
||||||
select u.*,p.id p_id,p.name p_name from ts_user u
|
select u.*,p.id p_id,p.name p_name from ts_user u
|
||||||
left join ts_user_position up
|
left join ts_user_position up
|
||||||
on u.usid=up.user_id
|
on u.usid=up.user_id
|
||||||
left join ts_position p
|
left join ts_position p
|
||||||
on up.position_id=p.id
|
on up.position_id=p.id
|
||||||
where u.institution_id=#{institutionId}
|
where u.institution_id=#{TsUser.institutionId}
|
||||||
|
<if test="TsUser.uname != null and TsUser.uname != '' ">
|
||||||
|
and u.uname like concat('%',#{TsUser.uname},'%')
|
||||||
|
</if>
|
||||||
|
<if test="TsUser.email != null and TsUser.email != '' ">
|
||||||
|
and u.email like concat('%',#{TsUser.email},'%')
|
||||||
|
</if>
|
||||||
|
limit #{start},#{end}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getUserAndPositionCount" parameterType="com.adc.da.slrs.sarUser.entity.TsUser" resultType="java.lang.Integer">
|
||||||
|
select count(u.USID) from ts_user u
|
||||||
|
left join ts_user_position up
|
||||||
|
on u.usid=up.user_id
|
||||||
|
left join ts_position p
|
||||||
|
on up.position_id=p.id
|
||||||
|
where u.institution_id=#{TsUser.institutionId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUserIdsByPositionIds" resultType="String">
|
<select id="getUserIdsByPositionIds" resultType="String">
|
||||||
|
|||||||
+8
-2
@@ -195,7 +195,7 @@
|
|||||||
|
|
||||||
<!-- 根据id查询 SAR_FILE_SPLIT_INFO -->
|
<!-- 根据id查询 SAR_FILE_SPLIT_INFO -->
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||||
select <include refid="Base_Column_List" />
|
select <include refid="Base_Column_List" />
|
||||||
from SAR_FILE_SPLIT_INFO
|
from SAR_FILE_SPLIT_INFO
|
||||||
where id = #{value}
|
where id = #{value}
|
||||||
|
|
||||||
@@ -290,7 +290,7 @@
|
|||||||
|
|
||||||
<select id="queryByCountOwn" resultType="java.lang.Integer" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEOPage">
|
<select id="queryByCountOwn" resultType="java.lang.Integer" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEOPage">
|
||||||
SELECT
|
SELECT
|
||||||
count(0)
|
count(1)
|
||||||
FROM
|
FROM
|
||||||
SAR_FILE_SPLIT_INFO
|
SAR_FILE_SPLIT_INFO
|
||||||
LEFT JOIN SAR_STANDARDS_INFO ON SAR_FILE_SPLIT_INFO.STAND_ID = SAR_STANDARDS_INFO.id
|
LEFT JOIN SAR_STANDARDS_INFO ON SAR_FILE_SPLIT_INFO.STAND_ID = SAR_STANDARDS_INFO.id
|
||||||
@@ -334,4 +334,10 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="querySame" resultType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO">
|
||||||
|
select * from SAR_FILE_SPLIT_ITEMS
|
||||||
|
LEFT JOIN SAR_FILE_SPLIT_INFO ON SAR_FILE_SPLIT_ITEMS.INFO_ID = SAR_FILE_SPLIT_INFO.ID
|
||||||
|
where SAR_FILE_SPLIT_INFO.ID = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -308,7 +308,6 @@
|
|||||||
<if test="fileType != null">
|
<if test="fileType != null">
|
||||||
and SAR_STANDARDS_INFO.STAND_TYPE = #{fileType}
|
and SAR_STANDARDS_INFO.STAND_TYPE = #{fileType}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY STAND_ID
|
|
||||||
order by SAR_STAND_FILE.modify_time desc,SAR_STAND_FILE.id
|
order by SAR_STAND_FILE.modify_time desc,SAR_STAND_FILE.id
|
||||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class SyncUserService {
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
SyncUserService syncUserService=new SyncUserService();
|
SyncUserService syncUserService=new SyncUserService();
|
||||||
syncUserService.syncFotonOrg();
|
syncUserService.syncFotonUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -50,7 +50,7 @@ public class SyncUserService {
|
|||||||
json.add(rs);
|
json.add(rs);
|
||||||
|
|
||||||
JSONObject responseStr = JSON.parseObject(rs);
|
JSONObject responseStr = JSON.parseObject(rs);
|
||||||
|
System.out.println(rs);
|
||||||
if (responseStr.containsKey("cookie")) {
|
if (responseStr.containsKey("cookie")) {
|
||||||
try {
|
try {
|
||||||
JSONArray entries = responseStr.getJSONArray("cookie");
|
JSONArray entries = responseStr.getJSONArray("cookie");
|
||||||
|
|||||||
@@ -162,4 +162,6 @@ public interface OrgEODao extends BaseMapper<OrgEO> {
|
|||||||
public OrgEO getOrgParentInfoOrgId(OrgEO orgEO);
|
public OrgEO getOrgParentInfoOrgId(OrgEO orgEO);
|
||||||
|
|
||||||
public List<OrgEO> getOrgRootTree();
|
public List<OrgEO> getOrgRootTree();
|
||||||
|
|
||||||
|
int clearData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.adc.da.sys.entity;
|
package com.adc.da.sys.entity;
|
||||||
|
|
||||||
import com.adc.da.base.entity.BaseEntity;
|
import com.adc.da.base.entity.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -13,6 +14,7 @@ import java.util.List;
|
|||||||
* <b>日期:</b> 2018-09-03 <br>
|
* <b>日期:</b> 2018-09-03 <br>
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||||
*/
|
*/
|
||||||
|
@TableName(value = "ts_org")
|
||||||
public class OrgEO extends BaseEntity implements Serializable {
|
public class OrgEO extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
|||||||
@@ -762,6 +762,9 @@
|
|||||||
AND parent_idS IS NOT NULL
|
AND parent_idS IS NOT NULL
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<delete id="clearData">
|
||||||
|
delete from TS_ORG
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user