Merge remote-tracking branch 'origin/develop_master' into develop_1
This commit is contained in:
@@ -60,6 +60,7 @@ public class TsInstitution extends BaseEntity {
|
||||
private String hasChild;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("用户")
|
||||
private TsUserVO tsUserVO;
|
||||
|
||||
|
||||
+16
-3
@@ -1,7 +1,11 @@
|
||||
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* //新增清单进行时间的添加
|
||||
@@ -13,10 +17,19 @@ import lombok.Data;
|
||||
public class StandRegionalTimeDto {
|
||||
@ApiModelProperty(value = "国家")
|
||||
private String country;
|
||||
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
private String putTime;
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date putTime;
|
||||
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
private String zccssrq;
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date zccssrq;
|
||||
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
private String xcxssrq;
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date xcxssrq;
|
||||
}
|
||||
|
||||
+4
-5
@@ -17,6 +17,7 @@ import org.springframework.util.CollectionUtils;
|
||||
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@@ -284,13 +285,11 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
}
|
||||
|
||||
private void dateTime(LinkedHashMap<String, List<String>> mapList, List<String> putTime, List<String> xcx, List<String> zcc, StandRegionalTimeDto s) {
|
||||
putTime.add(s.getPutTime()) ;
|
||||
xcx.add(s.getXcxssrq());
|
||||
zcc.add(s.getZccssrq());
|
||||
putTime.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime()));
|
||||
xcx.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq()));
|
||||
zcc.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq()));
|
||||
mapList.put("实施日期("+s.getCountry()+")",putTime);
|
||||
mapList.put("新车型实施日期("+s.getCountry()+")",xcx);
|
||||
mapList.put("在产车实施日期("+s.getCountry()+")",zcc);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarResource.dao;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -19,4 +20,6 @@ public interface TsResourceDao extends BaseMapper<TsResource> {
|
||||
|
||||
List<TsResource> selectMenuByRole(TsResource sarMenuEO);
|
||||
|
||||
int insertTsRoleResource(HashMap<String,Object> map);
|
||||
|
||||
}
|
||||
|
||||
+9
@@ -7,6 +7,7 @@ import com.adc.da.login.util.UserUtils;
|
||||
import com.adc.da.slrs.sarResource.dao.TsResourceDao;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.utils.treetool.Tree;
|
||||
import com.adc.da.utils.treetool.TreeNode;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -17,6 +18,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -145,6 +147,7 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
tsResourceQueryWrapper.eq("sor_divide",tsResource.getSorDivide());
|
||||
}
|
||||
tsResourceQueryWrapper.isNull("PARENT_ID");
|
||||
tsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> TsResources=dao.selectList(tsResourceQueryWrapper);
|
||||
for(TsResource TsResource:TsResources){
|
||||
TsResource.setChildren(recursionGetChildren((TsResource)));
|
||||
@@ -166,6 +169,12 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
}
|
||||
}
|
||||
dao.insert(TsResource);
|
||||
// 把新生成的子目录加入用户的权限的下----插入ts_role_resource表
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("resourceId",TsResource.getId());
|
||||
map.put("roleId",1);
|
||||
dao.insertTsRoleResource(map);
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarRole.controller;
|
||||
|
||||
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.login.util.UserUtils;
|
||||
@@ -9,6 +10,7 @@ import com.adc.da.slrs.sarRole.entity.TsRoleMenuVO;
|
||||
import com.adc.da.slrs.sarRole.entity.TsRoleResourceVO;
|
||||
import com.adc.da.slrs.sarRole.service.ITsRoleService;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -53,10 +55,17 @@ public class TsRoleController extends BaseController<TsRole> {
|
||||
@ApiOperation("新增角色")
|
||||
@PostMapping
|
||||
public ResponseMessage<Object> addRole(@Validated(TsRole.insert.class) @RequestBody TsRole tsRole){
|
||||
//设置操作人
|
||||
UserEO userEO=UserUtils.getUser();
|
||||
tsRole.setOperator(userEO.getUname());
|
||||
return tsRoleService.addRole(tsRole);
|
||||
QueryWrapper<TsRole> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("NAME",tsRole.getName());
|
||||
int count = tsRoleService.count(queryWrapper);
|
||||
if (count>0){
|
||||
throw new AdcDaBaseException("角色名称已存在,请更换角色名称。");
|
||||
}else {
|
||||
//设置操作人
|
||||
UserEO userEO = UserUtils.getUser();
|
||||
tsRole.setOperator(userEO.getUname());
|
||||
return tsRoleService.addRole(tsRole);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("编辑角色")
|
||||
|
||||
+15
@@ -22,6 +22,7 @@ import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -59,8 +60,22 @@ public class SarStandAttrDetailsController extends BaseController<SarStandAttrDe
|
||||
// 标准属性字段
|
||||
List<SarStandAttrDetails> getInlandStandList = InitStandAttrUtil.standInlandAttrFieldList;
|
||||
resultMap.put(SarTypeEnum.INLAND_STAND.getValue(),getInlandStandList);
|
||||
|
||||
|
||||
List<SarStandAttrDetails> getForeignStandList = InitStandAttrUtil.standForeignAttrFieldList;
|
||||
//新增字段
|
||||
// Iterator<SarStandAttrDetails> iterator = getInlandStandList.iterator();
|
||||
// while (iterator.hasNext()){
|
||||
// SarStandAttrDetails next = iterator.next();
|
||||
//
|
||||
// if (next.getAttrName().matches("能源类型|适用产品线|适用认证|责任工程师|关联文件")){
|
||||
// getForeignStandList.add(next);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
resultMap.put(SarTypeEnum.FOREIGN_STAND.getValue(),getForeignStandList);
|
||||
|
||||
|
||||
// 政策属性字段
|
||||
List<SarStandAttrDetails> getInlandLawsList = InitStandAttrUtil.lawsInlandAttrFieldList;
|
||||
resultMap.put(SarTypeEnum.INLAND_LAWS.getValue(),getInlandLawsList);
|
||||
|
||||
+11
-3
@@ -5,11 +5,13 @@ import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -60,10 +62,14 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "新车型实施日期(文本)")
|
||||
@TableField("XCXSSRQ")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String xcxssrq;
|
||||
|
||||
@ApiModelProperty(value = "在产车实施日期(文本)")
|
||||
@TableField("ZCCSSRQ")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String zccssrq;
|
||||
|
||||
@ApiModelProperty(value = "标签")
|
||||
@@ -148,18 +154,20 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "实施日期(标准文本)")
|
||||
@TableField("SSRQ")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String ssrq;
|
||||
|
||||
@ApiModelProperty(value = "实施日期(国际)")
|
||||
@TableField("SSRQGJ")
|
||||
@TableField(exist=false)
|
||||
private String ssrqgj;
|
||||
|
||||
@ApiModelProperty(value = "新车型实施日期(国家)")
|
||||
@TableField("XCXSSRQGJ")
|
||||
@TableField(exist=false)
|
||||
private String xcxssrqgj;
|
||||
|
||||
@ApiModelProperty(value = "在产车实施日期(国家)")
|
||||
@TableField("ZCCSSRQGJ")
|
||||
@TableField(exist=false)
|
||||
private String zccssrqgj;
|
||||
|
||||
@ApiModelProperty(value = "修改单")
|
||||
|
||||
+11
@@ -64,5 +64,16 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
|
||||
return Result.success(publicList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "发起标准征求意见流程后自动公开征求意见")
|
||||
@PostMapping("/addSarPublicIdea")
|
||||
public ResponseMessage addSarPublicIdea(@RequestBody SarPublicIdea sarPublicIdea){
|
||||
try{
|
||||
sarPublicIdeaService.save(sarPublicIdea);
|
||||
}catch(Exception e){
|
||||
return Result.error();
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class StandAttrInfoDto {
|
||||
//标准实施日期
|
||||
@ExcelProperty("标准实施日期")
|
||||
private String SSRQ;
|
||||
//新车型实施日期
|
||||
//新车型实施日期 数据库中字段实际没有GJ 如需要修改 可修改此处
|
||||
@ExcelProperty("新车型实施日期")
|
||||
private String XCXSSRQGJ;
|
||||
//在产车实施日期
|
||||
|
||||
+2
-1
@@ -246,6 +246,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private IPage<SarStandProjectLibrary> getSarStandProjectLibraryIPage(int current, int pageSize, QueryWrapper<SarStandProjectLibrary> wrapper) {
|
||||
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
|
||||
IPage<SarStandProjectLibrary> userIPage = sarStandProjectLibraryDao.selectPage(page, wrapper);
|
||||
@@ -253,4 +254,4 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
return userIPage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -151,7 +151,9 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
page.setAdvanceSearchStr(null);
|
||||
}
|
||||
}
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
if(page.getUserId() == null || page.getUserId().equals("")){
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
+404
@@ -191,5 +191,409 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standSystemName;
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getStandType() {
|
||||
return standType;
|
||||
}
|
||||
|
||||
public void setStandType(String standType) {
|
||||
this.standType = standType;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getStandSort() {
|
||||
return standSort;
|
||||
}
|
||||
|
||||
public void setStandSort(String standSort) {
|
||||
this.standSort = standSort;
|
||||
}
|
||||
|
||||
public String getStandNumber() {
|
||||
return standNumber;
|
||||
}
|
||||
|
||||
public void setStandNumber(String standNumber) {
|
||||
this.standNumber = standNumber;
|
||||
}
|
||||
|
||||
public String getStandYear() {
|
||||
return standYear;
|
||||
}
|
||||
|
||||
public void setStandYear(String standYear) {
|
||||
this.standYear = standYear;
|
||||
}
|
||||
|
||||
public String getStandName() {
|
||||
return standName;
|
||||
}
|
||||
|
||||
public void setStandName(String standName) {
|
||||
this.standName = standName;
|
||||
}
|
||||
|
||||
public String getStandEnName() {
|
||||
return standEnName;
|
||||
}
|
||||
|
||||
public void setStandEnName(String standEnName) {
|
||||
this.standEnName = standEnName;
|
||||
}
|
||||
|
||||
public String getStandState() {
|
||||
return standState;
|
||||
}
|
||||
|
||||
public void setStandState(String standState) {
|
||||
this.standState = standState;
|
||||
}
|
||||
|
||||
public String getStandNature() {
|
||||
return standNature;
|
||||
}
|
||||
|
||||
public void setStandNature(String standNature) {
|
||||
this.standNature = standNature;
|
||||
}
|
||||
|
||||
public String getIssueTime() {
|
||||
return issueTime;
|
||||
}
|
||||
|
||||
public void setIssueTime(String issueTime) {
|
||||
this.issueTime = issueTime;
|
||||
}
|
||||
|
||||
public Date getPutTime() {
|
||||
return putTime;
|
||||
}
|
||||
|
||||
public void setPutTime(Date putTime) {
|
||||
this.putTime = putTime;
|
||||
}
|
||||
|
||||
public String getSynopsis() {
|
||||
return synopsis;
|
||||
}
|
||||
|
||||
public void setSynopsis(String synopsis) {
|
||||
this.synopsis = synopsis;
|
||||
}
|
||||
|
||||
public String getReplaceStandNum() {
|
||||
return replaceStandNum;
|
||||
}
|
||||
|
||||
public void setReplaceStandNum(String replaceStandNum) {
|
||||
this.replaceStandNum = replaceStandNum;
|
||||
}
|
||||
|
||||
public String getReplacedStandNum() {
|
||||
return replacedStandNum;
|
||||
}
|
||||
|
||||
public void setReplacedStandNum(String replacedStandNum) {
|
||||
this.replacedStandNum = replacedStandNum;
|
||||
}
|
||||
|
||||
public String getCreationUser() {
|
||||
return creationUser;
|
||||
}
|
||||
|
||||
public void setCreationUser(String creationUser) {
|
||||
this.creationUser = creationUser;
|
||||
}
|
||||
|
||||
public String getValidFlag() {
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public Date getCreationTime() {
|
||||
return creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(Date creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getIsRelateAccess() {
|
||||
return isRelateAccess;
|
||||
}
|
||||
|
||||
public void setIsRelateAccess(String isRelateAccess) {
|
||||
this.isRelateAccess = isRelateAccess;
|
||||
}
|
||||
|
||||
public String getCiteStand() {
|
||||
return citeStand;
|
||||
}
|
||||
|
||||
public void setCiteStand(String citeStand) {
|
||||
this.citeStand = citeStand;
|
||||
}
|
||||
|
||||
public String getCitedStand() {
|
||||
return citedStand;
|
||||
}
|
||||
|
||||
public void setCitedStand(String citedStand) {
|
||||
this.citedStand = citedStand;
|
||||
}
|
||||
|
||||
public String getTextStatus() {
|
||||
return textStatus;
|
||||
}
|
||||
|
||||
public void setTextStatus(String textStatus) {
|
||||
this.textStatus = textStatus;
|
||||
}
|
||||
|
||||
public String getStandSystem() {
|
||||
return standSystem;
|
||||
}
|
||||
|
||||
public void setStandSystem(String standSystem) {
|
||||
this.standSystem = standSystem;
|
||||
}
|
||||
|
||||
public String getCollectId() {
|
||||
return collectId;
|
||||
}
|
||||
|
||||
public void setCollectId(String collectId) {
|
||||
this.collectId = collectId;
|
||||
}
|
||||
|
||||
public String getCountryShow() {
|
||||
return countryShow;
|
||||
}
|
||||
|
||||
public void setCountryShow(String countryShow) {
|
||||
this.countryShow = countryShow;
|
||||
}
|
||||
|
||||
public String getStandSortShow() {
|
||||
return standSortShow;
|
||||
}
|
||||
|
||||
public void setStandSortShow(String standSortShow) {
|
||||
this.standSortShow = standSortShow;
|
||||
}
|
||||
|
||||
public String getStandStateShow() {
|
||||
return standStateShow;
|
||||
}
|
||||
|
||||
public void setStandStateShow(String standStateShow) {
|
||||
this.standStateShow = standStateShow;
|
||||
}
|
||||
|
||||
public String getStandNatureShow() {
|
||||
return standNatureShow;
|
||||
}
|
||||
|
||||
public void setStandNatureShow(String standNatureShow) {
|
||||
this.standNatureShow = standNatureShow;
|
||||
}
|
||||
|
||||
public String getSychronId() {
|
||||
return sychronId;
|
||||
}
|
||||
|
||||
public void setSychronId(String sychronId) {
|
||||
this.sychronId = sychronId;
|
||||
}
|
||||
|
||||
public List<DicTypeEO> getDicTypeList() {
|
||||
return dicTypeList;
|
||||
}
|
||||
|
||||
public void setDicTypeList(List<DicTypeEO> dicTypeList) {
|
||||
this.dicTypeList = dicTypeList;
|
||||
}
|
||||
|
||||
public List<SarStandAttrDetails> getAttrInfoList() {
|
||||
return attrInfoList;
|
||||
}
|
||||
|
||||
public void setAttrInfoList(List<SarStandAttrDetails> attrInfoList) {
|
||||
this.attrInfoList = attrInfoList;
|
||||
}
|
||||
|
||||
public Map<String, Object> getAttrInfoMap() {
|
||||
return attrInfoMap;
|
||||
}
|
||||
|
||||
public void setAttrInfoMap(Map<String, Object> attrInfoMap) {
|
||||
this.attrInfoMap = attrInfoMap;
|
||||
}
|
||||
|
||||
public Map<String, Object> getAttrInfoCaseMap() {
|
||||
return attrInfoCaseMap;
|
||||
}
|
||||
|
||||
public void setAttrInfoCaseMap(Map<String, Object> attrInfoCaseMap) {
|
||||
this.attrInfoCaseMap = attrInfoCaseMap;
|
||||
}
|
||||
|
||||
public String getSarStandAttrEOStr() {
|
||||
return sarStandAttrEOStr;
|
||||
}
|
||||
|
||||
public void setSarStandAttrEOStr(String sarStandAttrEOStr) {
|
||||
this.sarStandAttrEOStr = sarStandAttrEOStr;
|
||||
}
|
||||
|
||||
public String getMenuId() {
|
||||
return menuId;
|
||||
}
|
||||
|
||||
public void setMenuId(String menuId) {
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public int getUpReplaceNumFlag() {
|
||||
return upReplaceNumFlag;
|
||||
}
|
||||
|
||||
public void setUpReplaceNumFlag(int upReplaceNumFlag) {
|
||||
this.upReplaceNumFlag = upReplaceNumFlag;
|
||||
}
|
||||
|
||||
public int getUpNumFlag() {
|
||||
return upNumFlag;
|
||||
}
|
||||
|
||||
public void setUpNumFlag(int upNumFlag) {
|
||||
this.upNumFlag = upNumFlag;
|
||||
}
|
||||
|
||||
public String getFileIds() {
|
||||
return fileIds;
|
||||
}
|
||||
|
||||
public void setFileIds(String fileIds) {
|
||||
this.fileIds = fileIds;
|
||||
}
|
||||
|
||||
public Date getNewCarPutTime() {
|
||||
return newCarPutTime;
|
||||
}
|
||||
|
||||
public void setNewCarPutTime(Date newCarPutTime) {
|
||||
this.newCarPutTime = newCarPutTime;
|
||||
}
|
||||
|
||||
public List<SarStandItems> getItemsList() {
|
||||
return itemsList;
|
||||
}
|
||||
|
||||
public void setItemsList(List<SarStandItems> itemsList) {
|
||||
this.itemsList = itemsList;
|
||||
}
|
||||
|
||||
public String getRelateStand() {
|
||||
return relateStand;
|
||||
}
|
||||
|
||||
public void setRelateStand(String relateStand) {
|
||||
this.relateStand = relateStand;
|
||||
}
|
||||
|
||||
public String getAccessCountry() {
|
||||
return accessCountry;
|
||||
}
|
||||
|
||||
public void setAccessCountry(String accessCountry) {
|
||||
this.accessCountry = accessCountry;
|
||||
}
|
||||
|
||||
public String getProcessNum() {
|
||||
return processNum;
|
||||
}
|
||||
|
||||
public void setProcessNum(String processNum) {
|
||||
this.processNum = processNum;
|
||||
}
|
||||
|
||||
public String getMenuType() {
|
||||
return menuType;
|
||||
}
|
||||
|
||||
public void setMenuType(String menuType) {
|
||||
this.menuType = menuType;
|
||||
}
|
||||
|
||||
public String getAllPutTime() {
|
||||
return allPutTime;
|
||||
}
|
||||
|
||||
public void setAllPutTime(String allPutTime) {
|
||||
this.allPutTime = allPutTime;
|
||||
}
|
||||
|
||||
public String getJspg() {
|
||||
return jspg;
|
||||
}
|
||||
|
||||
public void setJspg(String jspg) {
|
||||
this.jspg = jspg;
|
||||
}
|
||||
|
||||
public String getCHJL() {
|
||||
return CHJL;
|
||||
}
|
||||
|
||||
public void setCHJL(String CHJL) {
|
||||
this.CHJL = CHJL;
|
||||
}
|
||||
|
||||
public String getPutTime2() {
|
||||
return putTime2;
|
||||
}
|
||||
|
||||
public void setPutTime2(String putTime2) {
|
||||
this.putTime2 = putTime2;
|
||||
}
|
||||
|
||||
public String getStandSystemName() {
|
||||
return standSystemName;
|
||||
}
|
||||
|
||||
public void setStandSystemName(String standSystemName) {
|
||||
this.standSystemName = standSystemName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+152
-14
@@ -11,6 +11,7 @@ import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.dao.PersonShareEODao;
|
||||
import com.adc.da.person.entity.PersonMsgEO;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.search.service.StandLawsSearchService;
|
||||
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
|
||||
import com.adc.da.slrs.sarLawsInfo.page.SarLawsInfoEOPage;
|
||||
import com.adc.da.slrs.sarLawsInfo.page.SarLawsItemsEOPage;
|
||||
@@ -60,6 +61,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.util.PDFTextStripper;
|
||||
import org.apache.pdfbox.util.PDFTextStripperByArea;
|
||||
import org.apache.poi.hwpf.extractor.WordExtractor;
|
||||
import org.apache.poi.openxml4j.opc.OPCPackage;
|
||||
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -70,6 +78,7 @@ import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.sql.Clob;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
@@ -175,6 +184,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Autowired
|
||||
private CreateStandMQService createStandMQService;
|
||||
|
||||
@Autowired
|
||||
private StandLawsSearchService standLawsSearchService;
|
||||
|
||||
|
||||
/***
|
||||
* @Description: 分页查询
|
||||
@@ -185,16 +197,23 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
*/
|
||||
public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
List<String> getMenuIdList=tsUserService.getResourceId(new TsResource());
|
||||
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
|
||||
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(page.getMenuId() != null ){
|
||||
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.getResourceId(new TsResource());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
Integer rowCount = dao.getSarStandardsInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
@@ -601,8 +620,8 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
sarStandFileEO.setFileSuffix(fileInfo.getFileSuffix());
|
||||
sarStandFileEO.setOriAttId(fileInfo.getId());
|
||||
standFileList.add(sarStandFileEO);
|
||||
//文档转换
|
||||
if ("pdf".equals(fileInfo.getFileSuffix()) || "PDF".equals(fileInfo.getFileSuffix())) {
|
||||
//多文档转换 PPT|PPTX|ppt|pptx|PDF|pdf|DOC|doc|DOCX|docx
|
||||
if (verifyFileType(fileInfo.getFileSuffix())) {
|
||||
SarStandFile newFileEO = new SarStandFile();
|
||||
newFileEO.setCreationUser(LoginUserUtil.getUserId());
|
||||
newFileEO.setCreationTime(new Date());
|
||||
@@ -633,6 +652,11 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
private Boolean verifyFileType(String str){
|
||||
String verifyType = "^PPT|PPTX|ppt|pptx|PDF|pdf|DOC|doc|DOCX|docx*$";
|
||||
return Pattern.matches(verifyType,str);
|
||||
}
|
||||
|
||||
public void createStandPutTime(String standId, Map<String, String> multiTimeMap) throws Exception {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
if (multiTimeMap != null && multiTimeMap.size() > 0) {
|
||||
@@ -1957,12 +1981,126 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
|
||||
@Override
|
||||
public void insertIntoIndexForMap(Map<String, Object> attrInfoMap) {
|
||||
|
||||
Set<String> keys = attrInfoMap.keySet();
|
||||
for (String key:keys) {
|
||||
String value = String.valueOf(attrInfoMap.get(key));
|
||||
if (com.adc.da.util.utils.StringUtils.isNotBlank(value) && !"null".equals(value) && !"SVPPS".equals(key)){
|
||||
value = value.replace(" , ",",");
|
||||
value = value.replace(","," , ");
|
||||
attrInfoMap.put(key,value);
|
||||
}
|
||||
}
|
||||
// 根据文件attid 读取文件内容
|
||||
if (org.apache.commons.lang.StringUtils.isNotEmpty(String.valueOf(attrInfoMap.get("content")))) {
|
||||
String[] attidlist = String.valueOf(attrInfoMap.get("content")).split(" , ");
|
||||
StringBuilder content = new StringBuilder("");
|
||||
for (int i = 0; i < attidlist.length; i++) {
|
||||
if(org.apache.commons.lang.StringUtils.isNotEmpty(attidlist[i]) ){
|
||||
AttFileEO attFileEO = attFileEOService.getFileInfo(attidlist[i]);
|
||||
//String readFilePath = filePath + "/" + attFileEO.getFilePath() + attFileEO.getFileName();
|
||||
String readFilePath = "E:\\上汽企标流程总览.pdf";
|
||||
try {
|
||||
// 判断文件是docx还是PDF
|
||||
if (null != attFileEO.getFileSuffix() && (attFileEO.getFileSuffix().equals("docx") || attFileEO.getFileSuffix().equals("doc") || attFileEO.getFileSuffix().equals("ppt") || attFileEO.getFileSuffix().equals("pptx"))) {
|
||||
if(attFileEO.getFileSuffix().equals("doc")){
|
||||
FileInputStream fis = new FileInputStream(readFilePath);
|
||||
WordExtractor wordExtractor = new WordExtractor(fis);
|
||||
String txt = wordExtractor.getText();
|
||||
content.append(txt);
|
||||
}else {
|
||||
OPCPackage opcPackage = XWPFDocument.openPackage(readFilePath);
|
||||
XWPFWordExtractor extractor = new XWPFWordExtractor(opcPackage);
|
||||
String txt = extractor.getText();
|
||||
content.append(txt);
|
||||
}
|
||||
} else {
|
||||
PDDocument document = PDDocument.load(new File(readFilePath));
|
||||
document.getClass();
|
||||
if (!document.isEncrypted()) {
|
||||
PDFTextStripperByArea stripper = new PDFTextStripperByArea();
|
||||
stripper.setSortByPosition(true);
|
||||
PDFTextStripper tStripper = new PDFTextStripper();
|
||||
String pdfFileInText = tStripper.getText(document);
|
||||
// String[] lines = pdfFileInText.split("\\r?\\n");
|
||||
content.append(pdfFileInText);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("搜索中心新增数据读取文档内容时失败");
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
attrInfoMap.put("content",content.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
attrInfoMap.put("content","");
|
||||
}
|
||||
standLawsSearchService.addStandLawsSearchForMap(attrInfoMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateIntoIndexForMap(Map<String, Object> attrInfoMap) {
|
||||
|
||||
Set<String> keys = attrInfoMap.keySet();
|
||||
for (String key:keys) {
|
||||
String value = String.valueOf(attrInfoMap.get(key));
|
||||
if (com.adc.da.util.utils.StringUtils.isNotBlank(value) && !"null".equals(value) && !"SVPPS".equals(key) && !"content".equals(key)){
|
||||
value = value.replace(" , ",",");
|
||||
value = value.replace(","," , ");
|
||||
attrInfoMap.put(key,value);
|
||||
}
|
||||
}
|
||||
// 根据文件attid 读取文件内容
|
||||
if (org.apache.commons.lang.StringUtils.isNotEmpty(String.valueOf(attrInfoMap.get("content")))) {
|
||||
String[] attidlist = String.valueOf(attrInfoMap.get("content")).split(" , ");
|
||||
StringBuilder content = new StringBuilder("");
|
||||
for (int i = 0; i < attidlist.length; i++) {
|
||||
if(org.apache.commons.lang.StringUtils.isNotEmpty(attidlist[i]) && !"null".equals(attidlist[i])){
|
||||
AttFileEO attFileEO = attFileEOService.getFileInfo(attidlist[i]);
|
||||
//String readFilePath = filePath + "/" + attFileEO.getFilePath() + attFileEO.getFileName();
|
||||
try {
|
||||
// 判断文件是docx还是PDF
|
||||
/*if (attFileEO.getFileSuffix().equals("docx") || attFileEO.getFileSuffix().equals("doc")) {
|
||||
if(attFileEO.getFileSuffix().equals("doc")){
|
||||
FileInputStream fis = new FileInputStream(readFilePath);
|
||||
WordExtractor wordExtractor = new WordExtractor(fis);
|
||||
String txt = wordExtractor.getText();
|
||||
content.append(txt);
|
||||
}else {
|
||||
OPCPackage opcPackage = XWPFDocument.openPackage(readFilePath);
|
||||
XWPFWordExtractor extractor = new XWPFWordExtractor(opcPackage);
|
||||
String txt = extractor.getText();
|
||||
content.append(txt);
|
||||
}
|
||||
} else if (attFileEO.getFileSuffix().equals("pdf")){
|
||||
PDDocument document = PDDocument.load(new File(readFilePath));
|
||||
document.getClass();
|
||||
if (!document.isEncrypted()) {
|
||||
PDFTextStripperByArea stripper = new PDFTextStripperByArea();
|
||||
stripper.setSortByPosition(true);
|
||||
PDFTextStripper tStripper = new PDFTextStripper();
|
||||
String pdfFileInText = tStripper.getText(document);
|
||||
// String[] lines = pdfFileInText.split("\\r?\\n");
|
||||
content.append(pdfFileInText);
|
||||
}
|
||||
}*/
|
||||
String readFilePath = "E:\\上汽企标流程总览.pdf";
|
||||
FileInputStream fis = new FileInputStream(readFilePath);
|
||||
WordExtractor wordExtractor = new WordExtractor(fis);
|
||||
String txt = wordExtractor.getText();
|
||||
content.append(txt);
|
||||
} catch (Exception e) {
|
||||
logger.error("搜索中心修改数据读取文档内容时失败");
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
attrInfoMap.put("content",content.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
attrInfoMap.put("content","");
|
||||
}
|
||||
standLawsSearchService.updateStandLawsSearchForMap(attrInfoMap);
|
||||
}
|
||||
//
|
||||
// @Override
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.adc.da.slrs.search;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsSearchMenu;
|
||||
import com.adc.da.slrs.tsDictionaryType.service.ITsDicTypeService;
|
||||
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.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/search")
|
||||
public class SearchController {
|
||||
|
||||
@Autowired
|
||||
private ITsDicTypeService iTsDictypeService;
|
||||
|
||||
@ApiOperation("获取筛选条件")
|
||||
@PostMapping("/getMenu")
|
||||
public ResponseMessage<List<TsSearchMenu>> getSearchMenu(){
|
||||
return Result.success(iTsDictypeService.getSearchMenu());
|
||||
}
|
||||
}
|
||||
@@ -30,8 +30,9 @@ public class FieldConvertUtil {
|
||||
public static String exportBaseFieldNames = "标准体系,是否纳入认证清单,标准性质,标准类别,标准编号,标准年份,中文名称,英文名称," +
|
||||
"文本状态,发布日期"; // 导出基础表字段 //删除 实施日期 2021-05-28
|
||||
|
||||
public static String exportBaseFieldNamesForeign = "重要度,标准类别,标准编号,标准年份/系列,中文名称,英文名称," +
|
||||
"标准状态,发布日期,文本说明"; // 导出基础表字段
|
||||
public static String exportBaseFieldNamesForeign = "标准类别,标准编号,标准年份,中文名称,英文名称," +
|
||||
"文本状态,发布日期,文本说明,是否纳入认证清单,体系类别,标签,适用产品线,适用认证,能源类型,责任工程师," +
|
||||
"关联文件,发布稿,增补件,勘误件,草案"; // 导出基础表字段
|
||||
|
||||
public static String exportAttrFieldNamesInland = "归口管理部门,发布机构,工作组信息,我司参与深度,适用车辆类型,要求类型," +
|
||||
"标签,发布稿(必读),增补件(必读),报批稿,送审稿,征求意见稿,草案,相关资料,新车型实施日期(文本),在产车实施日期(文本)," +
|
||||
|
||||
Reference in New Issue
Block a user