feat: 迁移国内标准法规部分1
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.otSvpps.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.otSvpps.entity.OtSvpps;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* SVPPS结构数据 SVPPS数据 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|OtSvpps|")
|
||||
@RequestMapping("/otSvpps/ot-svpps")
|
||||
public class OtSvppsController extends BaseController<OtSvpps> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.adc.da.slrs.otSvpps.dao;
|
||||
|
||||
import com.adc.da.slrs.otSvpps.entity.OtSvpps;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* SVPPS结构数据 SVPPS数据 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
public interface OtSvppsDao extends BaseMapper<OtSvpps> {
|
||||
|
||||
List<String> getNamesByIds(@Param("list") String[] list);
|
||||
|
||||
List<String> getNamesTipByIds(@Param("list") String[] list);
|
||||
|
||||
List<String> getIdsByNames(@Param("list") String[] list);
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.adc.da.slrs.otSvpps.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* SVPPS结构数据 SVPPS数据
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="OtSvpps对象", description="SVPPS结构数据 SVPPS数据")
|
||||
public class OtSvpps extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键 主键ID")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "父级ID 父级ID引用本表的主键")
|
||||
@TableField("P_ID")
|
||||
private String pId;
|
||||
|
||||
@ApiModelProperty(value = "一级编码 对应excel中的B列")
|
||||
@TableField("F_NUM")
|
||||
private String fNum;
|
||||
|
||||
@ApiModelProperty(value = "二级编码 对应Excel中的C列")
|
||||
@TableField("S_NUM")
|
||||
private String sNum;
|
||||
|
||||
@ApiModelProperty(value = "三级编码 对应excel中的D列")
|
||||
@TableField("T_NUM")
|
||||
private String tNum;
|
||||
|
||||
@ApiModelProperty(value = "SVPPS编码 对应Excel中的E列")
|
||||
@TableField("SVPPS_CODE")
|
||||
private String svppsCode;
|
||||
|
||||
@ApiModelProperty(value = "SVPPS英文名称 对应excel中的G列")
|
||||
@TableField("SVPPS_EN_NAME")
|
||||
private String svppsEnName;
|
||||
|
||||
@ApiModelProperty(value = "SVPPS中文名称 对应excel中的I列")
|
||||
@TableField("SVPPS_CN_NAME")
|
||||
private String svppsCnName;
|
||||
|
||||
@ApiModelProperty(value = "同步数据ID 对应同步系统中的ID")
|
||||
@TableField("SYNC_ID")
|
||||
private String syncId;
|
||||
|
||||
@ApiModelProperty(value = "是否有效 默认为0")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间 数据入库时间")
|
||||
@TableField("CREATED_TIME")
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间 数据更新时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "自定义数据标识")
|
||||
@TableField("SELF_FALG")
|
||||
private String selfFalg;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.otSvpps.service;
|
||||
|
||||
import com.adc.da.slrs.otSvpps.entity.OtSvpps;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* SVPPS结构数据 SVPPS数据 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
public interface IOtSvppsService extends IService<OtSvpps> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.otSvpps.service.impl;
|
||||
|
||||
import com.adc.da.slrs.otSvpps.entity.OtSvpps;
|
||||
import com.adc.da.slrs.otSvpps.dao.OtSvppsDao;
|
||||
import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* SVPPS结构数据 SVPPS数据 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@Service
|
||||
public class OtSvppsServiceImpl extends ServiceImpl<OtSvppsDao, OtSvpps> implements IOtSvppsService {
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarGroupMenu.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarGroupMenu.entity.SarGroupMenu;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 树形结构 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarGroupMenu|")
|
||||
@RequestMapping("/sarGroupMenu/sar-group-menu")
|
||||
public class SarGroupMenuController extends BaseController<SarGroupMenu> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.adc.da.slrs.sarGroupMenu.dao;
|
||||
|
||||
import com.adc.da.slrs.sarGroupMenu.entity.SarGroupMenu;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 树形结构 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
public interface SarGroupMenuDao extends BaseMapper<SarGroupMenu> {
|
||||
|
||||
String getNamesByIds(@Param("list") String[] list);
|
||||
|
||||
String getIdsByNames(@Param("list") String[] list);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.adc.da.slrs.sarGroupMenu.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 树形结构
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarGroupMenu对象", description="树形结构")
|
||||
public class SarGroupMenu extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "PID")
|
||||
@TableField("PID")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty(value = "节点名称")
|
||||
@TableField("MENU_NAME")
|
||||
private String menuName;
|
||||
|
||||
@ApiModelProperty(value = "节点类型")
|
||||
@TableField("MENU_TYPE")
|
||||
private String menuType;
|
||||
|
||||
@ApiModelProperty(value = "节点层级")
|
||||
@TableField("MENU_LEVEL")
|
||||
private BigDecimal menuLevel;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATE_TIME")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@TableField("CREATE_USERID")
|
||||
private String createUserid;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
@TableField("MODIFY_USERID")
|
||||
private String modifyUserid;
|
||||
|
||||
@ApiModelProperty(value = "判断标识")
|
||||
@TableField("VLAG_FLAG")
|
||||
private BigDecimal vlagFlag;
|
||||
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
@TableField("STAND_NO")
|
||||
private String standNo;
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarGroupMenu.service;
|
||||
|
||||
import com.adc.da.slrs.sarGroupMenu.entity.SarGroupMenu;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 树形结构 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
public interface ISarGroupMenuService extends IService<SarGroupMenu> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarGroupMenu.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarGroupMenu.entity.SarGroupMenu;
|
||||
import com.adc.da.slrs.sarGroupMenu.dao.SarGroupMenuDao;
|
||||
import com.adc.da.slrs.sarGroupMenu.service.ISarGroupMenuService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 树形结构 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@Service
|
||||
public class SarGroupMenuServiceImpl extends ServiceImpl<SarGroupMenuDao, SarGroupMenu> implements ISarGroupMenuService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarMenu.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarMenu|")
|
||||
@RequestMapping("/sarMenu/sar-menu")
|
||||
public class SarMenuController extends BaseController<SarMenu> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.adc.da.slrs.sarMenu.dao;
|
||||
|
||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
public interface SarMenuDao extends BaseMapper<SarMenu> {
|
||||
|
||||
List<SarMenu> queryMenuByDis(SarMenu sarMenuEO);
|
||||
|
||||
List<SarMenu> selectMenuByRole(SarMenu sarMenuEO);
|
||||
|
||||
List<SarMenu> queryMenuByPid(SarMenu sarMenuEO);
|
||||
|
||||
List<SarMenu> queryByPidExcpetSelf(SarMenu sarMenuEO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.adc.da.slrs.sarMenu.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarMenu对象", description="")
|
||||
public class SarMenu extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准法规划分")
|
||||
@TableField("SOR_DIVIDE")
|
||||
private String sorDivide;
|
||||
|
||||
@ApiModelProperty(value = "目录名称")
|
||||
@TableField("MENU_NAME")
|
||||
private String menuName;
|
||||
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@TableField("PARENT_ID")
|
||||
private String parentId;
|
||||
|
||||
@ApiModelProperty(value = "父级ID集合")
|
||||
@TableField("PARENT_IDS")
|
||||
private String parentIds;
|
||||
|
||||
@ApiModelProperty(value = "排序序号")
|
||||
@TableField("DISPLAY_SEQ")
|
||||
private Integer displaySeq;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@TableField("REMARKS")
|
||||
private String remarks;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> roleIds;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> childMenuIds;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarMenu.service;
|
||||
|
||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
public interface ISarMenuService extends IService<SarMenu> {
|
||||
|
||||
List<String> getParentMenuId(String menuId);
|
||||
|
||||
List<String> queryRoleMenuIdList(String sordDivide, String menuId) throws Exception;
|
||||
|
||||
List<String> getChildMenuList(String menuId);
|
||||
}
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
package com.adc.da.slrs.sarMenu.service.impl;
|
||||
|
||||
import com.adc.da.login.util.UserUtils;
|
||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||
import com.adc.da.slrs.sarMenu.dao.SarMenuDao;
|
||||
import com.adc.da.slrs.sarMenu.service.ISarMenuService;
|
||||
import com.adc.da.utils.treetool.Tree;
|
||||
import com.adc.da.utils.treetool.TreeNode;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@Service
|
||||
public class SarMenuServiceImpl extends ServiceImpl<SarMenuDao, SarMenu> implements ISarMenuService {
|
||||
|
||||
@Autowired
|
||||
private SarMenuDao dao;
|
||||
|
||||
public List<String> getParentMenuId (String menuId) {
|
||||
List<String> parentIds = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(menuId)) {
|
||||
List<SarMenu> sarMenuEOList = dao.selectList(new QueryWrapper<>());
|
||||
Tree tree = new Tree(sarMenuEOList);
|
||||
TreeNode treeNode = tree.getTreeNode(menuId);
|
||||
while (treeNode.getParent() != null) {
|
||||
parentIds.add(treeNode.getParent().getNodeId());
|
||||
treeNode = treeNode.getParent();
|
||||
}
|
||||
}
|
||||
return parentIds;
|
||||
}
|
||||
|
||||
public List<String> queryRoleMenuIdList(String sordDivide, String menuId) throws Exception{
|
||||
// 根据当前登录人id查出对应角色
|
||||
SarMenu sarMenu = new SarMenu();
|
||||
sarMenu.setSorDivide(sordDivide);
|
||||
String roleIds = UserUtils.getRoleIds();
|
||||
String[] roleArr = roleIds.split(",");
|
||||
List<String> roleIdList = Arrays.asList(roleArr);
|
||||
sarMenu.setRoleIds(roleIdList);
|
||||
//角色未配置根节点,手动加入根节点权限
|
||||
List<SarMenu> resultList = queryMenuByDis(sarMenu);
|
||||
List<SarMenu> list = selectMenuByRole(sarMenu);
|
||||
if(!"BUSINESS_STAND".equals(sarMenu.getSorDivide())){
|
||||
resultList.addAll(list);
|
||||
} else {
|
||||
// 如果是企标,并且两个根节点都有权限,最先只查已分配下的节点
|
||||
if (resultList != null && resultList.size() == 2) {
|
||||
SarMenu menu1 = resultList.get(0);
|
||||
SarMenu menu2 = resultList.get(1);
|
||||
if (list != null && list.size()>1) {
|
||||
int menu1Index = -1;
|
||||
int menu2Index = -1;
|
||||
for (int i = 0;i < list.size();i++) {
|
||||
if (list.get(i).getId().equals(menu1.getId())) {
|
||||
menu1Index = i;
|
||||
} else if (list.get(i).getId().equals(menu2.getId())) {
|
||||
menu2Index = i;
|
||||
}
|
||||
}
|
||||
if (menu1Index>0 && menu2Index>0 && StringUtils.isEmpty(menuId)) {
|
||||
list.remove(menu2Index);
|
||||
}
|
||||
}
|
||||
}
|
||||
resultList = list;
|
||||
}
|
||||
List<String> getMenuIds = new ArrayList<>();
|
||||
if(resultList != null && !resultList.isEmpty()){
|
||||
for(SarMenu menu : resultList){
|
||||
getMenuIds.add(menu.getId());
|
||||
}
|
||||
}
|
||||
return getMenuIds;
|
||||
}
|
||||
|
||||
public List<SarMenu> queryMenuByDis(SarMenu sarMenu) {
|
||||
return dao.queryMenuByDis(sarMenu);
|
||||
}
|
||||
|
||||
public List<SarMenu> selectMenuByRole(SarMenu sarMenu) {
|
||||
List<SarMenu> list = dao.selectMenuByRole(sarMenu);
|
||||
if (list == null) {
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
SarMenu collectMenu = new SarMenu();
|
||||
collectMenu.setId("wdsc");
|
||||
collectMenu.setSorDivide(sarMenu.getSorDivide());
|
||||
collectMenu.setMenuName("我的收藏");
|
||||
collectMenu.setParentId("1");
|
||||
collectMenu.setDisplaySeq(9999);
|
||||
list.add(collectMenu);
|
||||
SarMenu labeltMenu = new SarMenu();
|
||||
labeltMenu.setId("gxhbq");
|
||||
labeltMenu.setSorDivide(sarMenu.getSorDivide());
|
||||
labeltMenu.setMenuName("个性化标签");
|
||||
labeltMenu.setParentId("1");
|
||||
labeltMenu.setDisplaySeq(10000);
|
||||
if(!"BUSINESS_STAND".equals(sarMenu.getSorDivide())) {
|
||||
list.add(labeltMenu);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<String> queryRoleMenuIdListForLaws(String sordDivide) throws Exception{
|
||||
// 根据当前登录人id查出对应角色
|
||||
SarMenu sarMenu = new SarMenu();
|
||||
sarMenu.setSorDivide(sordDivide);
|
||||
String roleIds = UserUtils.getRoleIds();
|
||||
String[] roleArr = roleIds.split(",");
|
||||
List<String> roleIdList = Arrays.asList(roleArr);
|
||||
sarMenu.setRoleIds(roleIdList);
|
||||
//角色未配置根节点,手动加入根节点权限
|
||||
// List<SarMenu> resultList = queryMenuByDis(SarMenu);
|
||||
List<SarMenu> list = selectMenuByRole(sarMenu);
|
||||
// resultList.addAll(list);
|
||||
List<String> getMenuIds = new ArrayList<>();
|
||||
if(list != null && !list.isEmpty()){
|
||||
for(SarMenu menu : list){
|
||||
getMenuIds.add(menu.getId());
|
||||
}
|
||||
}
|
||||
return getMenuIds;
|
||||
}
|
||||
|
||||
public List<String> getChildMenuList (String menuId) {
|
||||
List<String> menuIds = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(menuId)) {
|
||||
List<SarMenu> SarMenuList = dao.selectList(new QueryWrapper<>());
|
||||
Tree tree = new Tree(SarMenuList);
|
||||
TreeNode treeNode = tree.getTreeNode(menuId);
|
||||
if (treeNode != null) {
|
||||
menuIds.add(treeNode.getNodeId());
|
||||
for (TreeNode node : treeNode.getAllChildren()) {
|
||||
menuIds.add(node.getNodeId());
|
||||
}
|
||||
}
|
||||
}
|
||||
return menuIds;
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarStandAttrDetails.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarStandAttrDetails|")
|
||||
@RequestMapping("/sarStandAttrDetails/sar-stand-attr-details")
|
||||
public class SarStandAttrDetailsController extends BaseController<SarStandAttrDetails> {
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.adc.da.slrs.sarStandAttrDetails.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
public interface SarStandAttrDetailsDao extends BaseMapper<SarStandAttrDetails> {
|
||||
|
||||
String selectNameByField(@Param("attrField") String attrField, @Param("sarType") String sarType);
|
||||
|
||||
SarStandAttrDetails selectFieldByName(@Param("attrName") String attrName, @Param("sarType") String sarType);
|
||||
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
package com.adc.da.slrs.sarStandAttrDetails.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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.data.annotation.Transient;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarStandAttrDetails对象", description="")
|
||||
public class SarStandAttrDetails extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "属性字段")
|
||||
@TableField("ATTR_FIELD")
|
||||
private String attrField;
|
||||
|
||||
@ApiModelProperty(value = "属性名称")
|
||||
@TableField("ATTR_NAME")
|
||||
private String attrName;
|
||||
|
||||
@ApiModelProperty(value = "类型(INPUT_STR字符串输入框,INPUT_NUM数字输入框,SELECT_OPTION下拉框,DATE_PICKER日期选择,FILE文件,TEXTAREA文本框)")
|
||||
@TableField("ATTR_TYPE")
|
||||
private String attrType;
|
||||
|
||||
@ApiModelProperty(value = "属性字段长度")
|
||||
@TableField("ATTR_LEN")
|
||||
private Long attrLen;
|
||||
|
||||
@ApiModelProperty(value = "展示顺序")
|
||||
@TableField("ORDER_NUM")
|
||||
private Long orderNum;
|
||||
|
||||
@ApiModelProperty(value = "是否可编辑(0是,1否)")
|
||||
@TableField("IS_EDIT")
|
||||
private String isEdit;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "是否必填")
|
||||
@TableField("IS_MUST")
|
||||
private String isMust;
|
||||
|
||||
@ApiModelProperty(value = "是否展示")
|
||||
@TableField("IS_SHOW_IMP")
|
||||
private String isShowImp;
|
||||
|
||||
@ApiModelProperty(value = "展示区域")
|
||||
@TableField("SHOW_REGION_ID")
|
||||
private String showRegionId;
|
||||
|
||||
@ApiModelProperty(value = "下拉选项所用的值")
|
||||
@TableField("SEL_VAL")
|
||||
private String selVal;
|
||||
|
||||
@ApiModelProperty(value = "模块类型(STAND标准,LAWS政策)")
|
||||
@TableField("SAR_TYPE")
|
||||
private String sarType;
|
||||
|
||||
@ApiModelProperty(value = "是否作为检索条件")
|
||||
@TableField("IS_SEARCH")
|
||||
private String isSearch;
|
||||
|
||||
@ApiModelProperty(value = "是否预警")
|
||||
@TableField("IS_WARN")
|
||||
private String isWarn;
|
||||
|
||||
@ApiModelProperty(value = "是否检索字段")
|
||||
@TableField("IS_JANSUO")
|
||||
private String isJansuo;
|
||||
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.adc.da.slrs.sarStandAttrDetails.page;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>SAR_STAND_ATTR_DETAILS SarStandAttrDetailsEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2020-08-17 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
@Data
|
||||
public class SarStandAttrDetailsEOPage extends BasePage {
|
||||
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
private String attrField;
|
||||
private String attrFieldOperator = "=";
|
||||
private String attrName;
|
||||
private String attrNameOperator = "=";
|
||||
private String attrType;
|
||||
private String attrTypeOperator = "=";
|
||||
private String orderNum;
|
||||
private String orderNumOperator = "=";
|
||||
private String isEdit;
|
||||
private String isEditOperator = "=";
|
||||
private String creationUser;
|
||||
private String creationUserOperator = "=";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String creationTime;
|
||||
private String creationTime1;
|
||||
private String creationTime2;
|
||||
private String creationTimeOperator = "=";
|
||||
private String modifyTime;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
private String modifyTimeOperator = "=";
|
||||
private String attrLen;
|
||||
private String attrLenOperator = "=";
|
||||
private String[] idList;
|
||||
private String notId;
|
||||
private String sarType;
|
||||
private String isSearch;
|
||||
private String isWarn;
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarStandAttrDetails.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
public interface ISarStandAttrDetailsService extends IService<SarStandAttrDetails> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarStandAttrDetails.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||
import com.adc.da.slrs.sarStandAttrDetails.dao.SarStandAttrDetailsDao;
|
||||
import com.adc.da.slrs.sarStandAttrDetails.service.ISarStandAttrDetailsService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@Service
|
||||
public class SarStandAttrDetailsServiceImpl extends ServiceImpl<SarStandAttrDetailsDao, SarStandAttrDetails> implements ISarStandAttrDetailsService {
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarStandAttrInfo.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarStandAttrInfo|")
|
||||
@RequestMapping("/SarStandAttrInfo/sar-stand-attr-info")
|
||||
public class SarStandAttrInfoController extends BaseController<SarStandAttrInfo> {
|
||||
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.adc.da.slrs.sarStandAttrInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
public interface SarStandAttrInfoDao extends BaseMapper<SarStandAttrInfo> {
|
||||
|
||||
void alterStandAttr(@Param("fieldInfo") String fieldInfo);
|
||||
|
||||
void deleteStandAttr(@Param("fieldInfo") String fieldInfo);
|
||||
|
||||
void updateAttrLen(@Param("fieldInfo") String fieldInfo);
|
||||
|
||||
Integer selectStandAttrColumn(@Param("columnName") String columnName);
|
||||
|
||||
Map<String, Object> selectStandFieldAndData(@Param("fieldInfo") String fieldInfo, @Param("standId") String standId);
|
||||
|
||||
int insertStandAttr(@Param("fieldInfo") String fieldInfo, @Param("fieldValue") String fieldValue);
|
||||
|
||||
int deleteStandAttrByStandId(@Param("standId") String standId);
|
||||
|
||||
int updateStandInfo(@Param("standId") String standId, @Param("field") String field, @Param("value") String value);
|
||||
|
||||
String selectFieldValByStandId(@Param("field") String field, @Param("standId") String standId);
|
||||
|
||||
List<SelectionResult> selectFieldValByContainsVal(@Param("field") String field, @Param("value") String value, @Param("standIds") List<String> standIds);
|
||||
}
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
package com.adc.da.slrs.sarStandAttrInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarStandAttrInfo对象", description="")
|
||||
public class SarStandAttrInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableField("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准基础表主键")
|
||||
@TableField("STAND_ID")
|
||||
private String standId;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
private LocalDateTime creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
@TableField("GKDW")
|
||||
private String gkdw;
|
||||
|
||||
@TableField("FBJG")
|
||||
private String fbjg;
|
||||
|
||||
@TableField("CYSD")
|
||||
private String cysd;
|
||||
|
||||
@TableField("XCXSSRQ")
|
||||
private String xcxssrq;
|
||||
|
||||
@TableField("ZCCSSRQ")
|
||||
private String zccssrq;
|
||||
|
||||
@TableField("EOPSSRQ")
|
||||
private String eopssrq;
|
||||
|
||||
@TableField("CBBH")
|
||||
private String cbbh;
|
||||
|
||||
@TableField("CLLX")
|
||||
private String cllx;
|
||||
|
||||
@TableField("GXHBQ")
|
||||
private String gxhbq;
|
||||
|
||||
@TableField("XGBM")
|
||||
private String xgbm;
|
||||
|
||||
@TableField("ZGRZLX")
|
||||
private String zgrzlx;
|
||||
|
||||
@TableField("GZZXX")
|
||||
private String gzzxx;
|
||||
|
||||
@TableField("FO")
|
||||
private String fo;
|
||||
|
||||
@TableField("XMPGJS")
|
||||
private String xmpgjs;
|
||||
|
||||
@TableField("SVPPS")
|
||||
private String svpps;
|
||||
|
||||
@TableField("CA")
|
||||
private String ca;
|
||||
|
||||
@TableField("ZQYJG")
|
||||
private String zqyjg;
|
||||
|
||||
@TableField("SSG")
|
||||
private String ssg;
|
||||
|
||||
@TableField("BPG")
|
||||
private String bpg;
|
||||
|
||||
@TableField("CGBM")
|
||||
private String cgbm;
|
||||
|
||||
@TableField("FBGBJBD")
|
||||
private String fbgbjbd;
|
||||
|
||||
@TableField("ZBJBD")
|
||||
private String zbjbd;
|
||||
|
||||
@TableField("ZRBM")
|
||||
private String zrbm;
|
||||
|
||||
@TableField("FGWHR")
|
||||
private String fgwhr;
|
||||
|
||||
@TableField("DTBJH")
|
||||
private String dtbjh;
|
||||
|
||||
@TableField("YYBJ")
|
||||
private String yybj;
|
||||
|
||||
@TableField("BYYBJ")
|
||||
private String byybj;
|
||||
|
||||
@TableField("XGLC")
|
||||
private String xglc;
|
||||
|
||||
@TableField("CHJL")
|
||||
private String chjl;
|
||||
|
||||
@TableField("XCXSSRQXM")
|
||||
private String xcxssrqxm;
|
||||
|
||||
@TableField("ZCCSSRQXM")
|
||||
private String zccssrqxm;
|
||||
|
||||
@TableField("EOPSSRQXM")
|
||||
private String eopssrqxm;
|
||||
|
||||
@TableField("CBCD")
|
||||
private String cbcd;
|
||||
|
||||
@TableField("ZRLX")
|
||||
private String zrlx;
|
||||
|
||||
@TableField("YQLX")
|
||||
private String yqlx;
|
||||
|
||||
@TableField("XXZLXX")
|
||||
private String xxzlxx;
|
||||
|
||||
@TableField("NRDBZFGQD")
|
||||
private String nrdbzfgqd;
|
||||
|
||||
@TableField("FGXXSXXX")
|
||||
private String fgxxsxxx;
|
||||
|
||||
@TableField("DXBZ")
|
||||
private String dxbz;
|
||||
|
||||
@TableField("BDTBZBH")
|
||||
private String bdtbzbh;
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarStandAttrInfo.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
public interface ISarStandAttrInfoService extends IService<SarStandAttrInfo> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarStandAttrInfo.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.service.ISarStandAttrInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@Service
|
||||
public class SarStandAttrInfoServiceImpl extends ServiceImpl<SarStandAttrInfoDao, SarStandAttrInfo> implements ISarStandAttrInfoService {
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarStandItems.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarStandItems|")
|
||||
@RequestMapping("/SarStandItems/sar-stand-items")
|
||||
public class SarStandItemsController extends BaseController<SarStandItems> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.adc.da.slrs.sarStandItems.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
public interface SarStandItemsDao extends BaseMapper<SarStandItems> {
|
||||
|
||||
List<SarStandItems> querySarStandItemsList(SarStandItemsEOPage page);
|
||||
|
||||
int querySarStandItemsListCount(SarStandItemsEOPage page);
|
||||
|
||||
List<SarStandItems> queryItemsByList(SarStandItemsEOPage page);
|
||||
|
||||
List<SarStandItems> selectItemByItemNum(SarStandItemsEOPage page);
|
||||
|
||||
|
||||
@Select("SELECT id,VALID_FLAG FROM SAR_STAND_ITEMS WHERE id = #{id}")
|
||||
SarStandItems getSarStandItemsEOById(String id);
|
||||
|
||||
List<SarStandItems> queryIdsByList(SarStandItemsEOPage page);
|
||||
|
||||
int insertForeach(List<SarStandItems> list);
|
||||
|
||||
int updateForeach(List<SarStandItems> list);
|
||||
|
||||
int deleteByStandIdAndFileType(@Param("standId") String standId, @Param("fileType") String fileType);
|
||||
|
||||
Set<String> selectClaimTypesByStandId(@Param("standId") String standId, @Param("fileType") String fileType, @Param("idList") String[] idList);
|
||||
|
||||
Set<String> selectSvppsByStandId(@Param("standId") String standId, @Param("fileType") String fileType, @Param("idList") String[] idList);
|
||||
|
||||
int deleteByIds(@Param("idList") String[] idList);
|
||||
|
||||
List<SelectionResult> selectAllItemsClaimType(SarStandItems sarStandItemsEO);
|
||||
|
||||
List<SelectionResult> selectAllItemsSvpps(SarStandItems sarStandItemsEO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.adc.da.slrs.sarStandItems.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarStandItems对象", description="")
|
||||
public class SarStandItems extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准ID")
|
||||
@TableField("STAND_ID")
|
||||
private String standId;
|
||||
|
||||
@ApiModelProperty(value = "条目编号")
|
||||
@TableField("ITEMS_NUM")
|
||||
private String itemsNum;
|
||||
|
||||
@ApiModelProperty(value = "条目内容")
|
||||
@TableField("ITEMS_NAME")
|
||||
private String itemsName;
|
||||
|
||||
@ApiModelProperty(value = "涉及零部件")
|
||||
@TableField("PARTS")
|
||||
private String parts;
|
||||
|
||||
@ApiModelProperty(value = "特殊生效时间")
|
||||
@TableField("TACK_TIME")
|
||||
private LocalDateTime tackTime;
|
||||
|
||||
@ApiModelProperty(value = "适用车型")
|
||||
@TableField("APPLY_ARCTIC")
|
||||
private String applyArctic;
|
||||
|
||||
@ApiModelProperty(value = "能源类型")
|
||||
@TableField("ENERGY_KIND")
|
||||
private String energyKind;
|
||||
|
||||
@ApiModelProperty(value = "责任部门")
|
||||
@TableField("RESPONSIBLE_UNIT")
|
||||
private String responsibleUnit;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@TableField("REMARKS")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Boolean validFlag;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
private LocalDateTime creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "条款要求")
|
||||
@TableField("TERMS_CONDITIONS")
|
||||
private String termsConditions;
|
||||
|
||||
@ApiModelProperty(value = "实施要点")
|
||||
@TableField("MAINPOINTS_IMPEMENTATION")
|
||||
private String mainpointsImpementation;
|
||||
|
||||
@ApiModelProperty(value = "FO")
|
||||
@TableField("FO")
|
||||
private String fo;
|
||||
|
||||
@ApiModelProperty(value = "责任工程师")
|
||||
@TableField("DUTY_ENGINEER")
|
||||
private String dutyEngineer;
|
||||
|
||||
@ApiModelProperty(value = "SVPPS")
|
||||
@TableField("SVPPS")
|
||||
private String svpps;
|
||||
|
||||
@ApiModelProperty(value = "要求类型")
|
||||
@TableField("CLAIM_TYPE")
|
||||
private String claimType;
|
||||
|
||||
@ApiModelProperty(value = "企标覆盖关系")
|
||||
@TableField("BUS_STAND_COVER")
|
||||
private String busStandCover;
|
||||
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
@TableField("FILE_TYPE")
|
||||
private String fileType;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.adc.da.slrs.sarStandItems.page;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>SAR_STAND_ITEMS SarStandItemsEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
@Data
|
||||
public class SarStandItemsEOPage extends BasePage {
|
||||
|
||||
private String modifyTime;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
private String modifyTimeOperator = "=";
|
||||
private String creationTime;
|
||||
private String creationTime1;
|
||||
private String creationTime2;
|
||||
private String creationTimeOperator = "=";
|
||||
private String creationUser;
|
||||
private String creationUserOperator = "=";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String remarks;
|
||||
private String remarksOperator = "=";
|
||||
private String responsibleUnit;
|
||||
private String responsibleUnitOperator = "=";
|
||||
private String energyKind;
|
||||
private String energyKindOperator = "=";
|
||||
private String applyArctic;
|
||||
private String applyArcticOperator = "=";
|
||||
private String tackTime;
|
||||
private String tackTime1;
|
||||
private String tackTime2;
|
||||
private String tackTimeOperator = "=";
|
||||
private String parts;
|
||||
private String partsOperator = "=";
|
||||
private String itemsName;
|
||||
private String itemsNameOperator = "=";
|
||||
private String itemsNum;
|
||||
private String itemsNumOperator = "=";
|
||||
private String standId;
|
||||
private String standIdOperator = "=";
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
private String nameOrRequest;
|
||||
private String standNum;
|
||||
private String processFlag;
|
||||
private String fileType;
|
||||
private String proType;
|
||||
private String[] idlist;
|
||||
private String noId;
|
||||
private String productId;
|
||||
private String lawsId;
|
||||
private String sarState;
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarStandItems.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
public interface ISarStandItemsService extends IService<SarStandItems> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarStandItems.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
|
||||
import com.adc.da.slrs.sarStandItems.service.ISarStandItemsService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@Service
|
||||
public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarStandItems> implements ISarStandItemsService {
|
||||
|
||||
}
|
||||
+124
-4
@@ -1,11 +1,45 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.common.FileUnZip;
|
||||
import com.adc.da.common.ReadExcel;
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.*;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.utils.util.*;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -16,8 +50,94 @@ import com.adc.da.base.web.BaseController;
|
||||
* @since 2021-05-31
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarStandardsInfo|")
|
||||
@Api(tags = "福田标准法规--标准法规库--国内标准法规")
|
||||
@RequestMapping("/sarStandardsInfo/sar-standards-info")
|
||||
public class SarStandardsInfoController extends BaseController<SarStandardsInfo> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SarStandardsInfoController.class);
|
||||
|
||||
@Autowired
|
||||
private ISarStandardsInfoService sarStandardsInfoEOService;
|
||||
|
||||
|
||||
@Value("${file.path}")
|
||||
private String filePath;
|
||||
|
||||
@Value("${file.downloadUrl}")
|
||||
private String fileDownloadPath;
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|自定义分页查询")
|
||||
@GetMapping("/getSarStandardsInfoPage")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:getSarStandardsInfoPage")
|
||||
public ResponseMessage<PageInfo<SarStandardsInfo>> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
|
||||
int isNull = -1;
|
||||
if (null != page.getNowOrderBy()) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
page.setOrderBy1("issueTime");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrderBy1("XCXSSRQPAIXU");
|
||||
break;
|
||||
case 3:
|
||||
page.setOrderBy1("ZCCSSRQPAIXU");
|
||||
break;
|
||||
case 4:
|
||||
page.setOrderBy1("standStateShow");
|
||||
break;
|
||||
case 5:
|
||||
page.setOrderBy1("paixu");
|
||||
break;
|
||||
default:
|
||||
page.setNowOrder(null);
|
||||
break;
|
||||
}
|
||||
if (null != page.getNowOrder()) {
|
||||
switch (page.getNowOrder()) {
|
||||
case 1:
|
||||
page.setOrder1("desc");
|
||||
break;
|
||||
case 2:
|
||||
page.setOrder1("asc");
|
||||
default:
|
||||
page.setOrder1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
int i = 0;
|
||||
for (SarAdvanceSearchVO sarAdvanceSearchVO:searchList){
|
||||
if ("SVPPS".equals(sarAdvanceSearchVO.getField()) && StringUtils.isBlank(sarAdvanceSearchVO.getValue())){
|
||||
isNull = i;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (-1 != isNull) {
|
||||
searchList.remove(isNull);
|
||||
}
|
||||
if (isNull == 0 && searchList.size() > 0){
|
||||
searchList.get(0).setConnect("");
|
||||
}
|
||||
String advanceStr = SarAdvanceSearchUtil.createSql(searchList);
|
||||
if (null != advanceStr) {
|
||||
advanceStr = advanceStr.replace("stand_number", "concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',SAR_STANDARDS_INFO.STAND_YEAR)");
|
||||
}
|
||||
if (-1 != isNull && StringUtils.isBlank(advanceStr)){
|
||||
advanceStr = advanceStr + " SVPPS is null";
|
||||
}else if (-1 != isNull && StringUtils.isNotBlank(advanceStr)){
|
||||
advanceStr = advanceStr + " and SVPPS is null";
|
||||
}
|
||||
if (StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
page.setAdvanceSearchStr(null);
|
||||
}
|
||||
}
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+50
@@ -1,7 +1,12 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +18,49 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page);
|
||||
|
||||
int getSarStandardsInfoCount(SarStandardsInfoEOPage page);
|
||||
|
||||
SarStandardsInfo selectByPrimaryKeyAndModifyTime(SarStandardsInfo page);
|
||||
|
||||
List<SarStandardsInfo> selectStandardsByStandnumber(SarStandardsInfo sarStandardsInfoEO);
|
||||
|
||||
Integer selectStandColumn(@Param("columnName") String columnName);
|
||||
|
||||
Integer selectCounterStandardsCount(SarStandardsInfo sarStandardsInfoEO);
|
||||
|
||||
int deleteByPrimaryKeyFlag(String id);
|
||||
|
||||
int updateByStandNum(SarStandardsInfo standardsInfoEO);
|
||||
|
||||
List<SarStandardsInfo> selectStandardsInfoByIdAndRole(SarStandardsInfoEOPage standEO);
|
||||
|
||||
int updateReplacedNumById(SarStandardsInfo sarStandardsInfoEO);
|
||||
|
||||
int updateCitedStandById(SarStandardsInfo sarStandardsInfoEO);
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsExportInfo(SarStandardsInfoEOPage page);
|
||||
|
||||
List<SarStandardsInfo> selectStandardsInfoByKey(String id);
|
||||
|
||||
List<RecommendVO> selectRecommendStand(SarStandardsInfoEOPage pagenew);
|
||||
|
||||
List<String> countReplaceMsg(@Param("standNum") String standNum);
|
||||
|
||||
List<SarStandardsInfo> selectStandToUpState(@Param("stateName") String stateName);
|
||||
|
||||
List<SarStandardsInfo> selectStandToUpRepState();
|
||||
|
||||
List<SarStandardsInfo> selectStandToUpRepAndTime();
|
||||
|
||||
int updateStateById(@Param("state") String state,@Param("list") List<String> list);
|
||||
|
||||
int selectIsExit(@Param("id") String id);
|
||||
|
||||
//添加一个查询标准,但是不判断标准是否删除
|
||||
List<SarStandardsInfo> selectStandardsInfoByIdAndRoleAll(SarStandardsInfoEOPage standEO);
|
||||
|
||||
List<SarStandardsInfo> selectStandardsInfoBynumber(SarStandardsInfoEOPage page);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Created by super_liu
|
||||
* 用于搜索中心的推荐
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class RecommendVO extends BaseEntity {
|
||||
|
||||
private String nameShow;
|
||||
private String numberShow;
|
||||
private String typeShow;
|
||||
private String id;
|
||||
private String module;
|
||||
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
/**
|
||||
* @Description: 标准法规库高级查询
|
||||
* @Author: yangxuenan
|
||||
* date: 2020/12/11 9:22
|
||||
*/
|
||||
public class SarAdvanceSearchVO {
|
||||
|
||||
private String field; //字段 如 标准类别
|
||||
|
||||
private String value; //值
|
||||
|
||||
private String type; //查询类型 如 = != like
|
||||
|
||||
private String connect; //连接符号 如 and or
|
||||
|
||||
private String timeSt;
|
||||
|
||||
private String timeEd;
|
||||
|
||||
public String getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
public void setField(String field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getConnect() {
|
||||
return connect;
|
||||
}
|
||||
|
||||
public void setConnect(String connect) {
|
||||
this.connect = connect;
|
||||
}
|
||||
|
||||
public String getTimeSt() {
|
||||
return timeSt;
|
||||
}
|
||||
|
||||
public void setTimeSt(String timeSt) {
|
||||
this.timeSt = timeSt;
|
||||
}
|
||||
|
||||
public String getTimeEd() {
|
||||
return timeEd;
|
||||
}
|
||||
|
||||
public void setTimeEd(String timeEd) {
|
||||
this.timeEd = timeEd;
|
||||
}
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
/***
|
||||
* @Description: 根据导入模板的标题,基础表填写对应数据
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/9/22 10:33
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
public class SarStandImportDto {
|
||||
|
||||
public static void compareFieldAndName (String name, String value,SarStandardsInfo sarStandardsInfoEO) throws Exception{
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
switch(name){
|
||||
case "适用区域":
|
||||
sarStandardsInfoEO.setCountry(value);
|
||||
break;
|
||||
case "标准类别":
|
||||
sarStandardsInfoEO.setStandSort(value);
|
||||
break;
|
||||
case "标准编号":
|
||||
sarStandardsInfoEO.setStandNumber(value);
|
||||
break;
|
||||
case "标准年份":
|
||||
sarStandardsInfoEO.setStandYear(value);
|
||||
break;
|
||||
case "中文名称":
|
||||
sarStandardsInfoEO.setStandName(value);
|
||||
break;
|
||||
case "英文名称":
|
||||
sarStandardsInfoEO.setStandEnName(value);
|
||||
break;
|
||||
case "标准状态":
|
||||
sarStandardsInfoEO.setStandState(value);
|
||||
break;
|
||||
case "标准性质":
|
||||
sarStandardsInfoEO.setStandNature(value);
|
||||
break;
|
||||
case "发布日期":
|
||||
// Date iuuseDate = sdf.parse(value);
|
||||
sarStandardsInfoEO.setIssueTime(value);
|
||||
break;
|
||||
case "实施日期":
|
||||
// Date putDate = sdf.parse(value);
|
||||
sarStandardsInfoEO.setPutTime2(value);
|
||||
break;
|
||||
case "文本说明":
|
||||
sarStandardsInfoEO.setSynopsis(value);
|
||||
break;
|
||||
case "代替标准号":
|
||||
sarStandardsInfoEO.setReplaceStandNum(value);
|
||||
break;
|
||||
case "被代替标准号":
|
||||
sarStandardsInfoEO.setReplacedStandNum(value);
|
||||
break;
|
||||
case "重要度":
|
||||
sarStandardsInfoEO.setIsRelateAccess(value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
+66
-4
@@ -1,18 +1,24 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
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.data.annotation.Transient;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
@@ -72,7 +78,8 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
@TableField("PUT_TIME")
|
||||
private LocalDateTime putTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date putTime;
|
||||
|
||||
@ApiModelProperty(value = "内容摘要")
|
||||
@TableField("SYNOPSIS")
|
||||
@@ -95,11 +102,13 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
private LocalDateTime creationTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "是否法规清单相关(0否 1是)")
|
||||
@TableField("IS_RELATE_ACCESS")
|
||||
@@ -114,4 +123,57 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
private String citedStand;
|
||||
|
||||
|
||||
// 以下为非表中字段
|
||||
@Transient
|
||||
private String collectId; // 收藏表ID
|
||||
@Transient
|
||||
private String countryShow; //国家地区显示名称
|
||||
@Transient
|
||||
private String standSortShow; // 标准类别显示名称
|
||||
@Transient
|
||||
private String standStateShow; // 标准状态显示名称
|
||||
@Transient
|
||||
private String standNatureShow; // 标准性质显示名称
|
||||
@Transient
|
||||
private String sychronId; // 同步数据ID
|
||||
@Transient
|
||||
private List<DicTypeEO> dicTypeList = new ArrayList(); // 记录标准涉及到的所有数据字典数据
|
||||
@Transient
|
||||
private Map<String, Object> attrInfoMap = new LinkedHashMap<>(); //属性表字段与值
|
||||
@Transient
|
||||
private String sarStandAttrEOStr; //新增修改时属性表信息
|
||||
@Transient
|
||||
private String menuId; //目录ID
|
||||
@Transient
|
||||
private int upReplaceNumFlag; //记录是否修改了替代文件号
|
||||
@Transient
|
||||
private int upNumFlag; //记录是否修改了文件号
|
||||
@Transient
|
||||
private String fileIds; //全部文件ID
|
||||
@Transient
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date newCarPutTime;
|
||||
@Transient
|
||||
private List<SarStandItems> itemsList = new ArrayList<>();
|
||||
@Transient
|
||||
private String relateStand;//对应其他标准
|
||||
@Transient
|
||||
private String accessCountry;//纳入清单的国家
|
||||
@Transient
|
||||
private String processNum;//流程编号
|
||||
@Transient
|
||||
private String textStatus;//文本状态
|
||||
// 在库里的标准节点类型(工作组)
|
||||
@Transient
|
||||
private String menuType;
|
||||
@Transient
|
||||
private String allPutTime;
|
||||
@Transient
|
||||
private String jspg;
|
||||
@Transient
|
||||
private String CHJL;
|
||||
|
||||
@Transient
|
||||
private String putTime2;
|
||||
|
||||
}
|
||||
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>SAR_STANDARDS_INFO SarStandardsInfoEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2020-08-19 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class SarStandardsInfoEOPage extends BasePage {
|
||||
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
private String standType;
|
||||
private String standTypeOperator = "=";
|
||||
private String country;
|
||||
private String countryOperator = "=";
|
||||
private String standSort;
|
||||
private String standSortOperator = "=";
|
||||
private String standNumber;
|
||||
private String standNumberOperator = "=";
|
||||
private String standYear;
|
||||
private String standYearOperator = "=";
|
||||
private String standName;
|
||||
private String standNameOperator = "=";
|
||||
private String standEnName;
|
||||
private String standEnNameOperator = "=";
|
||||
private String standState;
|
||||
private String standStateOperator = "=";
|
||||
private String standNature;
|
||||
private String standNatureOperator = "=";
|
||||
private String issueTime;
|
||||
private String issueTime1;
|
||||
private String issueTime2;
|
||||
private String issueTimeOperator = "=";
|
||||
private String putTime;
|
||||
private String putTime1;
|
||||
private String putTime2;
|
||||
private String putTimeOperator = "=";
|
||||
private String synopsis;
|
||||
private String synopsisOperator = "=";
|
||||
private String replaceStandNum;
|
||||
private String replaceStandNumOperator = "=";
|
||||
private String replacedStandNum;
|
||||
private String replacedStandNumOperator = "=";
|
||||
private String creationUser;
|
||||
private String creationUserOperator = "=";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String creationTime;
|
||||
private String creationTime1;
|
||||
private String creationTime2;
|
||||
private String creationTimeOperator = "=";
|
||||
private String modifyTime;
|
||||
private String isRelateAccess;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
private String modifyTimeOperator = "=";
|
||||
private List<String> menuRoleList; //有权限的目录
|
||||
private String[] idlist; //多个id
|
||||
private String menuId; //目录ID
|
||||
private String rootMenuId;
|
||||
private String attrSearchStr;
|
||||
private String advanceSearchStr;
|
||||
private Map<String,String> attrSearchMap; //属性表数据条件查询
|
||||
// 树结构增加搜索条件
|
||||
private String collectMenuId;
|
||||
private String labelMenuId;
|
||||
private String applyArctic;
|
||||
private String ids;
|
||||
private List<String> replaceStandNumList;
|
||||
private List<String> menuAllChildrenIdList;
|
||||
private List<SarAdvanceSearchVO> advanceSearchVOList;
|
||||
private String advanceSearchVOStr;
|
||||
private String proType; // 请求的流程类型
|
||||
private String userId;
|
||||
private String productId;
|
||||
private Integer nowOrder;
|
||||
private Integer nowOrderBy;
|
||||
private String orderBy1 = "SAR_STANDARDS_INFO.issue_time";
|
||||
private String order1 = "desc";
|
||||
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StandardsInfoExcelVO {
|
||||
String exportType;
|
||||
String menuId;
|
||||
String labelMenuId;
|
||||
String exportContent;
|
||||
String exportName;
|
||||
String standType;
|
||||
String standSort;
|
||||
String standNumber;
|
||||
String collectMenuId;
|
||||
|
||||
}
|
||||
+28
@@ -1,8 +1,15 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.StandardsInfoExcelVO;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
@@ -13,4 +20,25 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception;
|
||||
|
||||
// void createSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
|
||||
//
|
||||
// int updateSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
|
||||
//
|
||||
// int deleteSarStandards(String ids);
|
||||
//
|
||||
// List<SarStandardsInfo> getExportDatas (StandardsInfoExcelVO standardsInfoExcelVO) throws Exception;
|
||||
//
|
||||
// ResponseMessage<SarStandardsInfo> importSarStandardsInfoData(List<Map<String,String>> dataList, String standType, String menuId, String filepath);
|
||||
//
|
||||
// List<SarStandardsInfo> selectStandardsByStandnumber(String replaceStandNum, String standType);
|
||||
//
|
||||
// SarStandardsInfo selectStandardsInfoByKey(String id) throws Exception;
|
||||
//
|
||||
// boolean updateStandardsMenu(SarStandardsInfoEOPage standardsInfoEO);
|
||||
//
|
||||
// boolean updateStandInfo(SarStandardsInfoEOPage standardsInfoEO);
|
||||
//
|
||||
// List<RecommendVO> selectRecommendStand(SarStandardsInfoEOPage pagenew);
|
||||
}
|
||||
|
||||
+215
-1
@@ -1,11 +1,30 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.common.*;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.*;
|
||||
import com.adc.da.slrs.sarMenu.service.ISarMenuService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.utils.util.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Clob;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
@@ -17,4 +36,199 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao, SarStandardsInfo> implements ISarStandardsInfoService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SarStandardsInfoServiceImpl.class);
|
||||
|
||||
@Value("${elas.flag}")
|
||||
private boolean elasflag; //ES是否启用
|
||||
|
||||
@Autowired
|
||||
private SarStandardsInfoDao dao;
|
||||
|
||||
@Autowired
|
||||
private ISarMenuService sarMenuEOService;
|
||||
|
||||
@Autowired
|
||||
private IPersonCollectEOService personCollectEOService;
|
||||
|
||||
@Autowired
|
||||
private SarStandAttrInfoDao sarStandAttrInfoEODao;
|
||||
|
||||
@Autowired
|
||||
private IAttFileEOService attFileEOService;
|
||||
|
||||
@Autowired
|
||||
private DicTypeEODao dicTypeEODao;
|
||||
|
||||
@Autowired
|
||||
private SarStandItemsDao sarStandItemsEODao;
|
||||
|
||||
@Autowired
|
||||
private SysInfoEOService sysInfoEOService;
|
||||
|
||||
|
||||
|
||||
/***
|
||||
* @Description: 分页查询
|
||||
* @Author: super_liu
|
||||
* @Date: 2020/8/19 10:23
|
||||
* @Param: [page]
|
||||
* @Return: java.util.List<com.adc.da.lawss.entity.SarStandardsInfoEO>
|
||||
*/
|
||||
public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType()+"_STAND",null);
|
||||
if(getMenuIdList != null && !getMenuIdList.isEmpty()){
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = sarMenuEOService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
Integer rowCount = dao.getSarStandardsInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page);
|
||||
attrInfo(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 处理属性表数据
|
||||
* @Author: super_liu
|
||||
* @Date: 2021/6/1 9:37
|
||||
* @Param: [sarlist]
|
||||
* @Return: void
|
||||
*/
|
||||
public void attrInfo (List<SarStandardsInfo> sarlist) throws Exception {
|
||||
for(SarStandardsInfo row : sarlist){
|
||||
attrInfoDetails(row);
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetails (SarStandardsInfo row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarStandAttrInfoEODao.selectStandFieldAndData(fieldInfo,row.getId());
|
||||
if (InitStandAttrUtil.clobFieldList != null && !InitStandAttrUtil.clobFieldList.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldList) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField,fieldValue);
|
||||
}
|
||||
}
|
||||
// 组织机构和人员
|
||||
Map<String,Object> newMap = new HashMap<>();
|
||||
if (getAttrMap != null) {
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
if ("EOPSSRQ".equals(entry.getKey())){
|
||||
if (entry.getValue() != null && entry.getValue().toString().length()>10){
|
||||
String time = DateUtil.formatStrUTCToDateStr(entry.getValue().toString());
|
||||
entry.setValue(time);
|
||||
}
|
||||
}
|
||||
String name = entry.getKey();
|
||||
if ("\"null\"".equals(entry.getValue())) {
|
||||
entry.setValue("");
|
||||
}
|
||||
if ("SVPPS".equals(name)) {
|
||||
Set<String> set = new HashSet();
|
||||
// 查询条款svpps
|
||||
Set<String> itemSvpps = sarStandItemsEODao.selectSvppsByStandId(row.getId(),null,null);
|
||||
if (itemSvpps != null && !itemSvpps.isEmpty()) {
|
||||
set.addAll(itemSvpps);
|
||||
}
|
||||
Object value = entry.getValue();
|
||||
if (value != null && StringUtils.isNotBlank(value.toString())) {
|
||||
set.addAll(Arrays.asList(value.toString().split(",")));
|
||||
}
|
||||
String allVal = ConcatStringUtil.concatSet(set);
|
||||
if (StringUtils.isNotBlank(allVal)) {
|
||||
entry.setValue(allVal);
|
||||
value = sysInfoEOService.getSvppsNamesByIds(allVal);
|
||||
}
|
||||
newMap.put(name + "Name",value);
|
||||
} else if ("YQLX".equals(name)) {
|
||||
//要求类型来源于条款
|
||||
SarStandItems sarStandItemsEO = new SarStandItems();
|
||||
sarStandItemsEO.setStandId(row.getId());
|
||||
Set<String> itemClaimType = sarStandItemsEODao.selectClaimTypesByStandId(row.getId(),null,null);
|
||||
if (itemClaimType != null && itemClaimType.size() > 1) {
|
||||
entry.setValue("RENVECPFGT");
|
||||
} else if (itemClaimType != null && itemClaimType.size() == 1) {
|
||||
entry.setValue(itemClaimType.toArray()[0]);
|
||||
}
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMap.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getOrgNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getUserNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShow (List<SarStandardsInfo> sarlist) throws Exception {
|
||||
for(SarStandardsInfo row : sarlist){
|
||||
attrInfoDetails(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
Map<String, Object> getNewMap = new LinkedHashMap<>();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
String svppsTip = "";
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if ("SVPPS".equals(name)) {
|
||||
Object svpps = entry.getValue();
|
||||
if (svpps != null && StringUtils.isNotBlank(svpps.toString())) {
|
||||
svppsTip = svpps.toString();
|
||||
}
|
||||
if (StringUtils.isNotBlank(svppsTip)) {
|
||||
svppsTip = sysInfoEOService.getSvppsNamesTipByIds(svppsTip);
|
||||
}
|
||||
value = String.valueOf(getAttrMap.get("SVPPSName"));
|
||||
entry.setValue(value);
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.fileFieldList != null && InitStandAttrUtil.fileFieldList.size() > 0 && InitStandAttrUtil.fileFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if ("GZZXX".equals(name)) {
|
||||
value = sysInfoEOService.getGroupNamesByIds(value);
|
||||
} else {
|
||||
String selVal = InitStandAttrUtil.selectFieldMap.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
if(getAttrMap.get(name + "Name") != null){
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
getAttrMap.put("SVPPSTips",svppsTip);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,431 @@
|
||||
package com.adc.da.slrs.sysInfo.service;
|
||||
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.common.SarConformStateEnum;
|
||||
import com.adc.da.common.SelectionTypeEnum;
|
||||
import com.adc.da.slrs.otSvpps.dao.OtSvppsDao;
|
||||
import com.adc.da.slrs.sarGroupMenu.dao.SarGroupMenuDao;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.dao.OrgEODao;
|
||||
import com.adc.da.sys.dao.RoleEODao;
|
||||
import com.adc.da.sys.dao.UserEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.page.DicTypeEOPage;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: super_liu
|
||||
* date: 2020/06/02 9:43
|
||||
*/
|
||||
@Service("sysInfoEOService")
|
||||
public class SysInfoEOService {
|
||||
|
||||
@Autowired
|
||||
private DicTypeEODao dicTypeEODao;
|
||||
|
||||
@Autowired
|
||||
private OrgEODao orgEODao;
|
||||
|
||||
@Autowired
|
||||
private UserEODao userEODao;
|
||||
|
||||
@Autowired
|
||||
private RoleEODao roleEODao;
|
||||
|
||||
@Autowired
|
||||
private SarGroupMenuDao sarGroupMenuEODao;
|
||||
|
||||
@Autowired
|
||||
private OtSvppsDao otSvppsEODao;
|
||||
|
||||
@Autowired
|
||||
private IAttFileEOService attFileEOService;
|
||||
|
||||
/**
|
||||
* @Description: 根据用户id返回逗号分隔字符串名称
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/06/02 9:50
|
||||
* @Param: [userIds]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getUserNamesByIds(String userIds){
|
||||
String userNames = "";
|
||||
if (StringUtils.isNotBlank(userIds)) {
|
||||
String[] idArr = userIds.split(",");
|
||||
userNames = userEODao.getNamesByIds(idArr);
|
||||
if (StringUtils.isBlank(userNames) || "null".equals(userNames)) {
|
||||
userNames = "";
|
||||
}
|
||||
}
|
||||
return userNames;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据机构id返回逗号分隔字符串名称
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/06/02 9:50
|
||||
* @Param: [userIds]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getOrgNamesByIds(String orgIds){
|
||||
String names = "";
|
||||
if (StringUtils.isNotBlank(orgIds)) {
|
||||
String[] idArr = orgIds.split(",");
|
||||
names = orgEODao.getNamesByIds(idArr);
|
||||
if (StringUtils.isBlank(names) || "null".equals(names)) {
|
||||
names = "";
|
||||
}
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据标准法规属性code返回逗号分隔字符串名称
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/06/02 9:51
|
||||
* @Param: [userIds]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getDicNamesByCodes(String codes){
|
||||
String names = "";
|
||||
if (StringUtils.isNotBlank(codes)) {
|
||||
String[] idArr = codes.split(",");
|
||||
names = dicTypeEODao.getDicNamesByCodes(Arrays.asList(idArr));
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据角色id查询名称
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/12/17 11:28
|
||||
* @Param: [roleIds]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getRoleNamesByIds(String roleIds){
|
||||
String names = "";
|
||||
if (StringUtils.isNotBlank(roleIds)) {
|
||||
String[] idArr = roleIds.split(",");
|
||||
names = roleEODao.getNamesByIds(idArr);
|
||||
if (StringUtils.isBlank(names) || "null".equals(names)) {
|
||||
names = "";
|
||||
}
|
||||
// for (String id : idArr) {
|
||||
// RoleEO roleEO = roleEODao.selectByPrimaryKey(id);
|
||||
// if (roleEO != null) {
|
||||
// names += roleEO.getName() + ",";
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// if (StringUtils.isNotBlank(names)) {
|
||||
// names = names.substring(0,names.length()-1);
|
||||
// }
|
||||
return names;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据名称查属性id
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/11/24 9:40
|
||||
* @Param: [str]
|
||||
* @Return: com.adc.da.sys.entity.DicTypeEO
|
||||
*/
|
||||
public DicTypeEO getDicType(String str, String dicId){
|
||||
DicTypeEOPage dicTypeEO = new DicTypeEOPage();
|
||||
dicTypeEO.setDicTypeName(str);
|
||||
dicTypeEO.setDicId(dicId);
|
||||
List<DicTypeEO> resultList = dicTypeEODao.queryByList(dicTypeEO);
|
||||
if(resultList!= null && !resultList.isEmpty()){
|
||||
return resultList.get(0);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 仅根据名称查询属性数据
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/12/7 9:40
|
||||
* @Param: [str]
|
||||
* @Return: com.adc.da.sys.entity.DicTypeEO
|
||||
*/
|
||||
public DicTypeEO getDicTypeByName(String str) throws Exception {
|
||||
DicTypeEOPage dicTypeEO = new DicTypeEOPage();
|
||||
dicTypeEO.setDicTypeName(str);
|
||||
List<DicTypeEO> resultList = dicTypeEODao.queryByList(dicTypeEO);
|
||||
if(resultList!= null && !resultList.isEmpty()){
|
||||
return resultList.get(0);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String,Object> changeSelectInfo (Map<String,Object> attrInfoMap,String type,String baseSearchContent) {
|
||||
if (attrInfoMap != null && !attrInfoMap.isEmpty()) {
|
||||
Map<String,Object> nameMap = new HashMap<>();
|
||||
for (Map.Entry<String,Object> entry : attrInfoMap.entrySet()) {
|
||||
baseSearchContent += String.valueOf(entry.getValue()) + ",";
|
||||
String field = entry.getKey();
|
||||
String value = String.valueOf(entry.getValue());
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
List<String> multiTimeList = new ArrayList<>();
|
||||
if ("stand".equals(type)) {
|
||||
fieldList = InitStandAttrUtil.selectionFieldList;
|
||||
multiTimeList = InitStandAttrUtil.multiTimeFieldList;
|
||||
} else if ("laws".equals(type)) {
|
||||
fieldList = InitStandAttrUtil.selectionFieldListLaws;
|
||||
multiTimeList = InitStandAttrUtil.multiTimeFieldListLaws;
|
||||
} else {
|
||||
fieldList = InitStandAttrUtil.selectionFieldListBuss;
|
||||
multiTimeList = InitStandAttrUtil.multiTimeFieldListBuss;
|
||||
}
|
||||
if (multiTimeList != null && multiTimeList.contains(field)) {
|
||||
nameMap.put(field, " " + value);
|
||||
}
|
||||
if (fieldList.contains(field)) {
|
||||
String selVal = "";
|
||||
String valueName = "";
|
||||
if ("stand".equals(type)) {
|
||||
selVal = InitStandAttrUtil.selectFieldMap.get(field);
|
||||
} else if ("laws".equals(type)) {
|
||||
selVal = InitStandAttrUtil.selectFieldMapLaws.get(field);
|
||||
} else {
|
||||
selVal = InitStandAttrUtil.selectFieldMapBuss.get(field);
|
||||
}
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
valueName = getOrgNamesByIds(value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
valueName = getUserNamesByIds(value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
valueName = getRoleNamesByIds(value);
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
valueName = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
}
|
||||
nameMap.put(field+"Show", valueName);
|
||||
baseSearchContent += valueName + ",";
|
||||
}
|
||||
}
|
||||
attrInfoMap.putAll(nameMap);
|
||||
}
|
||||
return attrInfoMap;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据用户名称查询id
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/12/29 19:01
|
||||
* @Param: [names]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getUserIdByName (String names,String orgIds) {
|
||||
String ids = "";
|
||||
if (StringUtils.isNotBlank(names)) {
|
||||
String[] nameArr = names.split(",");
|
||||
if (StringUtils.isNotBlank(orgIds)) {
|
||||
String[] orgIdArr = orgIds.split(",");
|
||||
ids = userEODao.getIdsByNames(nameArr,orgIdArr);
|
||||
} else {
|
||||
ids = userEODao.getIdsByNames(nameArr,null);
|
||||
}
|
||||
// for (String name : nameArr) {
|
||||
// if (StringUtils.isNotBlank(name)) {
|
||||
// UserEOPage page = new UserEOPage();
|
||||
// page.setValidFlag("0");
|
||||
// page.setUname(name);
|
||||
// List<UserEO> userList = userEODao.queryUserEoList(page);
|
||||
// if (userList != null && !userList.isEmpty()) {
|
||||
// ids += userList.get(0).getUsid() + ",";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// if (StringUtils.isNotBlank(ids)) {
|
||||
// ids = ids.substring(0,ids.length()-1);
|
||||
// }
|
||||
return ids;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据机构名称查询id
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/12/29 19:04
|
||||
* @Param: [names]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getOrgIdByName (String names,String orgType) {
|
||||
String ids = "";
|
||||
if (StringUtils.isNotBlank(names)) {
|
||||
String[] nameArr = names.split(",");
|
||||
ids = orgEODao.getIdsByNames(nameArr,orgType);
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据角色名称查id
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/12/29 19:07
|
||||
* @Param: [names]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getRoleIdByName (String names) {
|
||||
String ids = "";
|
||||
if (StringUtils.isNotBlank(names)) {
|
||||
String[] nameArr = names.split(",");
|
||||
ids = roleEODao.getIdsByNames(nameArr);
|
||||
// for (String name : nameArr) {
|
||||
// if (StringUtils.isNotBlank(name)) {
|
||||
// List<RoleEO> list = roleEODao.selectByNameAndId(null,name);
|
||||
// if (list != null && !list.isEmpty()) {
|
||||
// ids += list.get(0).getId() + ",";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// if (StringUtils.isNotBlank(ids)) {
|
||||
// ids = ids.substring(0,ids.length()-1);
|
||||
// }
|
||||
return ids;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据id查询工作组信息
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/12/30 15:03
|
||||
* @Param: [ids]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getGroupNamesByIds(String ids){
|
||||
String names = "";
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
String[] idArr = ids.split(",");
|
||||
names = sarGroupMenuEODao.getNamesByIds(idArr);
|
||||
if (StringUtils.isBlank(names) || "null".equals(names)) {
|
||||
names = "";
|
||||
}
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
public String getGroupIdByNames(String names){
|
||||
String ids = "";
|
||||
if (StringUtils.isNotBlank(names)) {
|
||||
String[] nameArr = names.split(",");
|
||||
ids = sarGroupMenuEODao.getIdsByNames(nameArr);
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据id查询svpps名称
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/12/31 17:25
|
||||
* @Param: [ids]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getSvppsNamesByIds(String ids){
|
||||
String names = "";
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
String[] idArr = ids.split(",");
|
||||
List<String> getList = otSvppsEODao.getNamesByIds(idArr).parallelStream() .filter(Objects::nonNull) .collect(Collectors.toList());
|
||||
if (getList != null && !getList.isEmpty()) {
|
||||
if (getList.size() == 1) {
|
||||
names = getList.get(0);
|
||||
} else {
|
||||
names = getList.get(0) + "," + getList.get(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
public String getSvppsNamesTipByIds(String ids){
|
||||
String names = "";
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
String[] idArr = ids.split(",");
|
||||
List<String> getList = otSvppsEODao.getNamesTipByIds(idArr);
|
||||
if (getList != null && !getList.isEmpty()) {
|
||||
if (getList.size() == 1) {
|
||||
names = getList.get(0);
|
||||
} else {
|
||||
names = getList.get(0) + "," + getList.get(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isBlank(names) || "null".equals(names)) {
|
||||
names = "";
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据名称查询id
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2021/1/7 17:12
|
||||
* @Param: [names]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getSvppsIdByName (String names) {
|
||||
String ids = "";
|
||||
if (StringUtils.isNotBlank(names)) {
|
||||
String[] nameArr = names.split(",");
|
||||
List<String> getList = otSvppsEODao.getIdsByNames(nameArr);
|
||||
if (getList != null && !getList.isEmpty()) {
|
||||
if (getList.size() == 1) {
|
||||
ids = getList.get(0);
|
||||
} else {
|
||||
ids = getList.get(0) + "," + getList.get(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 根据文件id返回文件名称
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2021/1/15 14:02
|
||||
* @Param: [ids]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public String getFileNamesByIds (String ids) {
|
||||
String names = "";
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
List<AttFileEO> infos = attFileEOService.getMultiFileInfos(ids);
|
||||
if (infos != null && !infos.isEmpty()) {
|
||||
for (AttFileEO attFileEO : infos) {
|
||||
names += attFileEO.getOldFileName() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(names)) {
|
||||
names = names.substring(0,names.length()-1);
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
public String changeCompStatus (String prcStatus) {
|
||||
if (StringUtils.isBlank(prcStatus)) {
|
||||
return "";
|
||||
}
|
||||
switch (prcStatus) {
|
||||
case "1": return SarConformStateEnum.FIT.getValue().toString();
|
||||
case "2": return SarConformStateEnum.UNFIT.getValue().toString();
|
||||
case "3": return SarConformStateEnum.CHECK.getValue().toString();
|
||||
case "4": return SarConformStateEnum.NOT_INVOLVE.getValue().toString();
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user