Merge remote-tracking branch 'origin/develop_master' into develop_master
This commit is contained in:
@@ -1068,6 +1068,7 @@ public class ActSarItemsEOService {
|
||||
}
|
||||
break;
|
||||
case "standType": sarStandardsInfoEO.setStandType(valueStr); break;
|
||||
case "standSystem": sarStandardsInfoEO.setStandSystem(valueStr); break;
|
||||
case "standYear": sarStandardsInfoEO.setStandYear(valueStr); break;
|
||||
case "standNature": sarStandardsInfoEO.setStandNature(valueStr); break;
|
||||
case "standEnName": sarStandardsInfoEO.setStandEnName(valueStr); break;
|
||||
|
||||
@@ -18,7 +18,7 @@ application.center=1
|
||||
#Eruept
|
||||
eureka.client.allow-redirects=true
|
||||
eureka.client.register-with-eureka=true
|
||||
eureka.client.service-url.defaultZone=http://192.168.10.47:8761/eureka/
|
||||
eureka.client.service-url.defaultZone=http://101.36.227.25:8761/eureka/
|
||||
|
||||
#==============================================
|
||||
# 邮箱配置1
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
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-07-13
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--企业标准信息")
|
||||
@RequestMapping("/${restPath}/lawss/sarBussionessStand")
|
||||
public class SarBussionessStandController extends BaseController<SarBussionessStand> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.dao;
|
||||
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企业标准信息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
|
||||
List<SarBussionessStand> queryByList(SarBussionessStandEOPage sarBussionessStandEOPage);
|
||||
}
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.entity;
|
||||
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandAttrDetailsEO;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企业标准信息表
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarBussionessStand对象", description="企业标准信息表")
|
||||
public class SarBussionessStand extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
@TableField("STAND_CODE")
|
||||
private String standCode;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@TableField("STAND_NAME")
|
||||
private String standName;
|
||||
|
||||
@ApiModelProperty(value = "标准英文名称")
|
||||
@TableField("STAND_EN_NAME")
|
||||
private String standEnName;
|
||||
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
@TableField("ISSUE_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date issueTime;
|
||||
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
@TableField("PUT_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date putTime;
|
||||
|
||||
@ApiModelProperty(value = "代替标准号")
|
||||
@TableField("REPLACE_STAND_NUM")
|
||||
private String replaceStandNum;
|
||||
|
||||
@ApiModelProperty(value = "被代替标准号")
|
||||
@TableField("REPLACED_STAND_NUM")
|
||||
private String replacedStandNum;
|
||||
|
||||
@ApiModelProperty(value = "标准状态")
|
||||
@TableField("STAND_STATUS")
|
||||
private String standStatus;
|
||||
|
||||
@ApiModelProperty(value = "适用国家/地区")
|
||||
@TableField("APPLY_COUNTRY")
|
||||
private String applyCountry;
|
||||
|
||||
@ApiModelProperty(value = "标准性质")
|
||||
@TableField("STAND_NATURE")
|
||||
private String standNature;
|
||||
|
||||
@ApiModelProperty(value = "标准类别")
|
||||
@TableField("STAND_SORT")
|
||||
private String standSort;
|
||||
|
||||
@ApiModelProperty(value = "标准年份")
|
||||
@TableField("STAND_YEAR")
|
||||
private String standYear;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String firstPutTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String putTimeShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String issueTimeShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String issueTimeStr;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String putTimeStr;
|
||||
|
||||
//目录ID 非标准信息表中的字段
|
||||
@TableField(exist = false)
|
||||
private String menuId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String menuParentId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standStatusShow; // 标准状态下拉框 --单选
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standNatrueShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standSortShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String applyCountryShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> standFileList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> opinionFilesList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> relevanceFileList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private String collectId;
|
||||
|
||||
//文件的类型
|
||||
@TableField(exist = false)
|
||||
private String standFileClassify;
|
||||
|
||||
//文件的下载id
|
||||
@TableField(exist = false)
|
||||
private String attId;
|
||||
|
||||
//记录是否修改了替代文件号
|
||||
@TableField(exist = false)
|
||||
private int upReplaceNumFlag;
|
||||
//记录是否修改了文件号
|
||||
@TableField(exist = false)
|
||||
private int upNumFlag;
|
||||
// 数据库新加的字段
|
||||
|
||||
@TableField(exist = false)
|
||||
private String remark;//备注
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoMap = new LinkedHashMap<>(); //属性表字段与值
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sarStandAttrEOStr; //新增修改时属性表信息
|
||||
|
||||
@TableField(exist = false)
|
||||
private String fileIds; //全部文件ID
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<SarStandAttrDetailsEO> attrInfoList = new ArrayList<>();
|
||||
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.service;
|
||||
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企业标准信息表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
public interface ISarBussionessStandService extends IService<SarBussionessStand> {
|
||||
|
||||
List<SarBussionessStand> queryByList(SarBussionessStandEOPage sarBussionessStandEOPage);
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企业标准信息表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
@Service
|
||||
public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStandDao, SarBussionessStand> implements ISarBussionessStandService {
|
||||
|
||||
@Override
|
||||
public List<SarBussionessStand> queryByList(SarBussionessStandEOPage sarBussionessStandEOPage){
|
||||
return this.baseMapper.queryByList(sarBussionessStandEOPage);
|
||||
}
|
||||
}
|
||||
-1
@@ -4,7 +4,6 @@ package com.adc.da.slrs.sarResource.controller;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import io.swagger.annotations.Api;
|
||||
|
||||
@@ -3,6 +3,8 @@ 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.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
@@ -13,4 +15,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface TsResourceDao extends BaseMapper<TsResource> {
|
||||
|
||||
List<TsResource> queryMenuByDis(TsResource sarMenuEO);
|
||||
|
||||
List<TsResource> selectMenuByRole(TsResource sarMenuEO);
|
||||
|
||||
}
|
||||
|
||||
@@ -91,4 +91,10 @@ public class TsResource extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private String parentIdsName;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> roleIds;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> childMenuIds;
|
||||
|
||||
}
|
||||
|
||||
+7
-1
@@ -1,7 +1,7 @@
|
||||
package com.adc.da.slrs.sarResource.service;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@@ -17,8 +17,12 @@ import java.util.List;
|
||||
*/
|
||||
public interface ITsResourceService extends IService<TsResource> {
|
||||
|
||||
List<TsResource> selectMenuByRole(TsResource sarMenuEO);
|
||||
|
||||
List<String> getParentMenuId(String menuId);
|
||||
|
||||
List<String> queryRoleMenuIdList(String sordDivide, String menuId) throws Exception;
|
||||
|
||||
/**
|
||||
* 通过Ids查询menu
|
||||
* @param menuIds :菜单Ids
|
||||
@@ -26,6 +30,8 @@ public interface ITsResourceService extends IService<TsResource> {
|
||||
*/
|
||||
List<TsResource> getMenuByIds(List<String> menuIds);
|
||||
|
||||
List<TsResource> queryMenuByDis(TsResource sarMenuEO);
|
||||
|
||||
List<TsResource> getAll(TsResource tsResource);
|
||||
|
||||
ResponseMessage<Object> addResource(TsResource tsResource);
|
||||
|
||||
+75
-2
@@ -3,8 +3,7 @@ package com.adc.da.slrs.sarResource.service.impl;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
|
||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandard;
|
||||
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;
|
||||
@@ -17,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -32,6 +32,79 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
@Autowired
|
||||
private TsResourceDao dao;
|
||||
|
||||
public List<TsResource> selectMenuByRole(TsResource sarMenu) {
|
||||
List<TsResource> list = dao.selectMenuByRole(sarMenu);
|
||||
if (list == null) {
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
TsResource collectMenu = new TsResource();
|
||||
collectMenu.setId("wdsc");
|
||||
collectMenu.setSorDivide(sarMenu.getSorDivide());
|
||||
collectMenu.setMenuName("我的收藏");
|
||||
collectMenu.setParentId("1");
|
||||
collectMenu.setDisplaySeq(9999);
|
||||
list.add(collectMenu);
|
||||
TsResource labeltMenu = new TsResource();
|
||||
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> queryRoleMenuIdList(String sordDivide, String menuId) throws Exception{
|
||||
// 根据当前登录人id查出对应角色
|
||||
TsResource sarMenu = new TsResource();
|
||||
sarMenu.setSorDivide(sordDivide);
|
||||
String roleIds = UserUtils.getRoleIds();
|
||||
String[] roleArr = roleIds.split(",");
|
||||
List<String> roleIdList = Arrays.asList(roleArr);
|
||||
sarMenu.setRoleIds(roleIdList);
|
||||
//角色未配置根节点,手动加入根节点权限
|
||||
List<TsResource> resultList = queryMenuByDis(sarMenu);
|
||||
List<TsResource> list = selectMenuByRole(sarMenu);
|
||||
if(!"BUSINESS_STAND".equals(sarMenu.getSorDivide())){
|
||||
resultList.addAll(list);
|
||||
} else {
|
||||
// 如果是企标,并且两个根节点都有权限,最先只查已分配下的节点
|
||||
if (resultList != null && resultList.size() == 2) {
|
||||
TsResource menu1 = resultList.get(0);
|
||||
TsResource 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(TsResource menu : resultList){
|
||||
getMenuIds.add(menu.getId());
|
||||
}
|
||||
}
|
||||
return getMenuIds;
|
||||
}
|
||||
|
||||
public List<TsResource> queryMenuByDis(TsResource sarMenu) {
|
||||
return dao.queryMenuByDis(sarMenu);
|
||||
}
|
||||
|
||||
|
||||
public List<String> getParentMenuId (String menuId) {
|
||||
List<String> parentIds = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(menuId)) {
|
||||
|
||||
+3
-6
@@ -9,12 +9,9 @@ import com.adc.da.slrs.sarStandItems.service.impl.SarStandItemsServiceImpl;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
@@ -29,7 +26,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarStandItems|")
|
||||
@RequestMapping("/SarStandItems/sar-stand-items")
|
||||
@RequestMapping("/api/SarStandItems/sar-stand-items")
|
||||
public class SarStandItemsController extends BaseController<SarStandItems> {
|
||||
|
||||
@Autowired
|
||||
@@ -37,7 +34,7 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
|
||||
|
||||
@ApiOperation(value = "分解单查询")
|
||||
@GetMapping("/findAllItems")
|
||||
public ResponseMessage findAllItems( String type,String ids){
|
||||
public ResponseMessage findAllItems( @RequestParam("type") String type,@RequestParam("ids") String ids){
|
||||
if (!StringUtils.isEmpty(ids) && ids.contains(",")){
|
||||
String[] Sids=ids.split(",");
|
||||
List<SarStandItemsDto> ItemDto = ServiceImpl.findAllItems(type,Sids);
|
||||
|
||||
+5
-3
@@ -5,6 +5,8 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||
import com.adc.da.slrs.sarMenu.service.ISarMenuService;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarStandMenu.service.ISarStandMenuService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -37,7 +39,7 @@ public class SarStandMenuController extends BaseController<SarStandMenu> {
|
||||
private ISarStandMenuService sarStandMenuEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarMenuService sarMenuEOService;
|
||||
private ITsResourceService sarMenuEOService;
|
||||
|
||||
@ApiOperation(value = "|SarStandMenuEO|修改")
|
||||
@PutMapping("/removeStandInfo")
|
||||
@@ -61,9 +63,9 @@ public class SarStandMenuController extends BaseController<SarStandMenu> {
|
||||
List<SarStandMenu> getList = sarStandMenuEOService.selectAllMenuByStandId(menuEO);
|
||||
if (getList == null || getList.isEmpty()) {
|
||||
// 查询根节点
|
||||
SarMenu sarMenuEO = new SarMenu();
|
||||
TsResource sarMenuEO = new TsResource();
|
||||
sarMenuEO.setSorDivide(standardsInfoEO.getStandType() + "_STAND");
|
||||
List<SarMenu> getRootMenu = sarMenuEOService.queryMenuByDis(sarMenuEO);
|
||||
List<TsResource> getRootMenu = sarMenuEOService.queryMenuByDis(sarMenuEO);
|
||||
menuEO.setMenuId(getRootMenu.get(0).getId());
|
||||
menuEO.setId(UUIDUtils.randomUUID20());
|
||||
menuEO.setValidFlag(0);
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandMenu.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarMenu.service.ISarMenuService;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarStandMenu.entity.SarStandMenu;
|
||||
import com.adc.da.slrs.sarStandMenu.dao.SarStandMenuDao;
|
||||
import com.adc.da.slrs.sarStandMenu.service.ISarStandMenuService;
|
||||
@@ -25,7 +26,7 @@ public class SarStandMenuServiceImpl extends ServiceImpl<SarStandMenuDao, SarSta
|
||||
private SarStandMenuDao dao;
|
||||
|
||||
@Autowired
|
||||
private ISarMenuService sarMenuEOService;
|
||||
private ITsResourceService sarMenuEOService;
|
||||
|
||||
@Override
|
||||
public int deleteByMenuId (SarStandMenu sarStandMenuEO){
|
||||
|
||||
+12
-6
@@ -10,6 +10,7 @@ import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -74,21 +75,26 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
|
||||
@GetMapping("/queryProjectManager")
|
||||
@ApiOperation("查询产品线项目经理")
|
||||
public ResponseMessage queryProjectManager(){
|
||||
List<SarStandProjectLibrary> list1 = sarStandProjectLibraryService.queryProjectManager();
|
||||
public ResponseMessage queryProjectManager(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize){
|
||||
IPage<SarStandProjectLibrary> list1 = sarStandProjectLibraryService.queryProjectManager(current,pageSize);
|
||||
// 创建一个新的list集合,用于存储去重后的元素
|
||||
List<productLineDto> listTemp = new ArrayList();
|
||||
for (SarStandProjectLibrary sarStandProjectLibrary:list1){
|
||||
for (SarStandProjectLibrary sarStandProjectLibrary:list1.getRecords()){
|
||||
productLineDto p = new productLineDto();
|
||||
p.setProductLine(sarStandProjectLibrary.getProductLine());
|
||||
p.setProjectManager(sarStandProjectLibrary.getProjectManager());
|
||||
p.setUName(sarStandProjectLibrary.getUName());
|
||||
List<SarStandProjectLibrary> list2 = sarStandProjectLibraryService.queryByProductLine(sarStandProjectLibrary.getProductLine());
|
||||
p.setSarStandProjectLibraries(list2);
|
||||
listTemp.add(p);
|
||||
}
|
||||
System.out.println(JSONObject.toJSON(listTemp));
|
||||
IPage<productLineDto> iPage = new Page<>();
|
||||
iPage.setRecords(listTemp);
|
||||
iPage.setCurrent(list1.getCurrent());
|
||||
iPage.setSize(list1.getSize());
|
||||
iPage.setTotal(list1.getTotal());
|
||||
iPage.setPages(list1.getPages());
|
||||
|
||||
return Result.success("200",listTemp);
|
||||
return Result.success("200",iPage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -2,6 +2,10 @@ package com.adc.da.slrs.sarStandProjectLibrary.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -12,5 +16,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* @since 2021-06-15
|
||||
*/
|
||||
public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLibrary> {
|
||||
List<SarStandProjectLibrary> queryProjectManagerPage(@Param("current") int current, @Param("pageSize") int pageSize);
|
||||
|
||||
}
|
||||
|
||||
+6
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarStandProjectLibrary.entity;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -63,7 +64,12 @@ public class SarStandProjectLibrary extends BaseEntity {
|
||||
@ApiModelProperty(value = "产品线")
|
||||
private String productLine;
|
||||
|
||||
@ApiModelProperty(value = "项目经理")
|
||||
private String projectManager;
|
||||
|
||||
@ApiModelProperty(value = "项目经理名称")
|
||||
@TableField(exist = false)
|
||||
private String uName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import java.util.List;
|
||||
@Data
|
||||
public class productLineDto {
|
||||
|
||||
private String projectManager;
|
||||
private String uName;
|
||||
|
||||
private String productLine;
|
||||
|
||||
|
||||
+1
-1
@@ -11,6 +11,6 @@ public interface SarStandProjectLibraryService {
|
||||
IPage<SarStandProjectLibrary> queryMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
||||
IPage<SarStandProjectLibrary> queryNotMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
||||
List<SarStandProjectLibrary> queryById(String id);
|
||||
List<SarStandProjectLibrary> queryProjectManager();
|
||||
IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize);
|
||||
List<SarStandProjectLibrary> queryByProductLine(String productLine);
|
||||
}
|
||||
|
||||
+7
-5
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandIssueControlProduct.entity.SarStandIssueControlProduct;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibraryDto;
|
||||
@@ -42,7 +43,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
sar.setProjectStatus(sarDto.getProjectStatus());
|
||||
sar.setProjectGroup(sarDto.getProjectGroup());
|
||||
sar.setCurrentNode(sarDto.getCurrentNode());
|
||||
sar.setProjectLevel(sar.getProjectLevel());
|
||||
sar.setProjectLevel(sarDto.getProjectLevel());
|
||||
sar.setProjectManager(sarDto.getProjectManager());
|
||||
sar.setProductLine(sarDto.getProductLine());
|
||||
SimpleDateFormat formater = new SimpleDateFormat();
|
||||
@@ -84,7 +85,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
sar.setProjectStatus(sarDto.getProjectStatus());
|
||||
sar.setProjectGroup(sarDto.getProjectGroup());
|
||||
sar.setCurrentNode(sarDto.getCurrentNode());
|
||||
sar.setProjectLevel(sar.getProjectLevel());
|
||||
sar.setProjectLevel(sarDto.getProjectLevel());
|
||||
sar.setProjectManager(sarDto.getProjectManager());
|
||||
sar.setProductLine(sarDto.getProductLine());
|
||||
SimpleDateFormat formater = new SimpleDateFormat();
|
||||
@@ -125,11 +126,12 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandProjectLibrary> queryProjectManager() {
|
||||
public IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
wrapper.select("product_line","project_manager");
|
||||
wrapper.groupBy("product_line");
|
||||
List<SarStandProjectLibrary> list = sarStandProjectLibraryDao.selectList(wrapper);
|
||||
IPage<SarStandProjectLibrary> list = sarStandProjectLibraryDao.selectPage(new Page<>(current,pageSize),wrapper);
|
||||
List<SarStandProjectLibrary> libraryIPage=sarStandProjectLibraryDao.queryProjectManagerPage((current-1)*pageSize,current*pageSize);
|
||||
list.setRecords(libraryIPage);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
+33
@@ -11,6 +11,8 @@ 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.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarLawsInfo.service.ISarLawsInfoService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.*;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
@@ -63,6 +65,9 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
@Autowired
|
||||
private ISarStandardsInfoService sarStandardsInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarBussionessStandService iSarBussionessStandService;
|
||||
|
||||
|
||||
@Value("${file.path}")
|
||||
private String filePath;
|
||||
@@ -556,5 +561,33 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|根据标准号查询")
|
||||
@GetMapping("/queryInfoByStandNum")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:list")
|
||||
public ResponseMessage queryInfoByStandNum(SarStandardsInfoEOPage page) throws Exception {
|
||||
if (org.apache.commons.lang.StringUtils.isNotBlank(page.getStandNumber())){
|
||||
String sort = "";
|
||||
if (page.getStandNumber().length()>3) {
|
||||
sort = page.getStandNumber().substring(0, 3);
|
||||
}
|
||||
if ("ECE".equals(sort)) {
|
||||
int length = page.getStandNumber().length();
|
||||
String number = page.getStandNumber().substring(3,length);
|
||||
page.setStandNumber("UN(ECE)" + number);
|
||||
}
|
||||
}
|
||||
List<SarStandardsInfo> getList = sarStandardsInfoEOService.selectStandardsByStandnumber(page.getStandNumber(),page.getStandType());
|
||||
SarBussionessStandEOPage sarBussionessStandEOPage = new SarBussionessStandEOPage();
|
||||
sarBussionessStandEOPage.setStandCode(page.getStandNumber());
|
||||
List<SarBussionessStand> list = iSarBussionessStandService.queryByList(sarBussionessStandEOPage);
|
||||
if(getList.size()>0){
|
||||
return Result.success(getList.get(0));
|
||||
}
|
||||
if (list.size()>0){
|
||||
return Result.success(list.get(0));
|
||||
}
|
||||
return Result.success("0","标准/企标已不存在");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+896
@@ -0,0 +1,896 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
import com.adc.da.sys.common.BasePage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>SAR_BUSSIONESS_STAND SarBussionessStandEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class SarBussionessStandEOPage 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 validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String putUser;
|
||||
private String putUserOperator = "=";
|
||||
private String citationUser;
|
||||
private String citationUserOperator = "=";
|
||||
private String responsibleUnit;
|
||||
private String responsibleUnitOperator = "=";
|
||||
private String standFile;
|
||||
private String standFileOperator = "=";
|
||||
private String tags;
|
||||
private String tagsOperator = "=";
|
||||
private String standStatus;
|
||||
private String standStatusOperator = "=";
|
||||
private String replacedStandNum;
|
||||
private String replacedStandNumOperator = "=";
|
||||
private String replaceStandNum;
|
||||
private String replaceStandNumOperator = "=";
|
||||
private String quoteStand;
|
||||
private String quoteStandOperator = "=";
|
||||
private String firstPutTime;
|
||||
private String firstPutTime1;
|
||||
private String firstPutTime2;
|
||||
private String firstPutTimeOperator = "=";
|
||||
private String putYear;
|
||||
private String putYear1;
|
||||
private String putYear2;
|
||||
private String putYearOperator = "=";
|
||||
private String putTime;
|
||||
private String putTime1;
|
||||
private String putTime2;
|
||||
private String putTimeOperator = "=";
|
||||
private String issueTime;
|
||||
private String issueTime1;
|
||||
private String issueTime2;
|
||||
private String issueTimeOperator = "=";
|
||||
private String energyKind;
|
||||
private String energyKindOperator = "=";
|
||||
private String applyArctic;
|
||||
private String applyArcticOperator = "=";
|
||||
private String standEnName;
|
||||
private String standEnNameOperator = "=";
|
||||
private String standName;
|
||||
private String standNameOperator = "=";
|
||||
private String standCode;
|
||||
private String standCodeOperator = "=";
|
||||
private String classifyCode;
|
||||
private String classifyCodeOperator = "=";
|
||||
private String standSubclass;
|
||||
private String standSubclassOperator = "=";
|
||||
private String standGenera;
|
||||
private String standGeneraOperator = "=";
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
// 数据库新增字段
|
||||
private String applyCountry;
|
||||
private String standYear;
|
||||
private String applyCountryOperator = "=";
|
||||
private String standNature;
|
||||
private String standNatureOperator = "=";
|
||||
private String synopsis;
|
||||
private String synopsisOperator = "=";
|
||||
private String standSort;
|
||||
private String standSortOperator = "=";
|
||||
private String opinionFile;
|
||||
private String opinionFileOperator = "=";
|
||||
private String relevanceFile;
|
||||
private String relevanceFileOperator = "=";
|
||||
private String remark;
|
||||
private String remarkOperator = "=";
|
||||
|
||||
private List<String> roleIds;
|
||||
private String rootMenuId;
|
||||
private String orgName;
|
||||
private List<String> menuRoleList;
|
||||
private String[] replacedStandNumList;
|
||||
private String numberName;
|
||||
// 树结构增加搜索条件
|
||||
private String collectMenuId;
|
||||
private String advanceSearchVOStr;
|
||||
private String advanceSearchStr;
|
||||
private List<String> menuAllChildrenIdList;
|
||||
private String userId;
|
||||
|
||||
private String zqcrId;
|
||||
|
||||
//页面排序
|
||||
private String paixu;
|
||||
private String shunxu;
|
||||
private String sql;
|
||||
|
||||
public String getZqcrId() {
|
||||
return zqcrId;
|
||||
}
|
||||
|
||||
public void setZqcrId(String zqcrId) {
|
||||
this.zqcrId = zqcrId;
|
||||
}
|
||||
|
||||
public String getModifyTime() {
|
||||
return this.modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(String modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getModifyTime1() {
|
||||
return this.modifyTime1;
|
||||
}
|
||||
|
||||
public void setModifyTime1(String modifyTime1) {
|
||||
this.modifyTime1 = modifyTime1;
|
||||
}
|
||||
|
||||
public String getModifyTime2() {
|
||||
return this.modifyTime2;
|
||||
}
|
||||
|
||||
public void setModifyTime2(String modifyTime2) {
|
||||
this.modifyTime2 = modifyTime2;
|
||||
}
|
||||
|
||||
public String getModifyTimeOperator() {
|
||||
return this.modifyTimeOperator;
|
||||
}
|
||||
|
||||
public void setModifyTimeOperator(String modifyTimeOperator) {
|
||||
this.modifyTimeOperator = modifyTimeOperator;
|
||||
}
|
||||
|
||||
public String getCreationTime() {
|
||||
return this.creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(String creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public String getCreationTime1() {
|
||||
return this.creationTime1;
|
||||
}
|
||||
|
||||
public void setCreationTime1(String creationTime1) {
|
||||
this.creationTime1 = creationTime1;
|
||||
}
|
||||
|
||||
public String getCreationTime2() {
|
||||
return this.creationTime2;
|
||||
}
|
||||
|
||||
public void setCreationTime2(String creationTime2) {
|
||||
this.creationTime2 = creationTime2;
|
||||
}
|
||||
|
||||
public String getCreationTimeOperator() {
|
||||
return this.creationTimeOperator;
|
||||
}
|
||||
|
||||
public void setCreationTimeOperator(String creationTimeOperator) {
|
||||
this.creationTimeOperator = creationTimeOperator;
|
||||
}
|
||||
|
||||
public String getValidFlag() {
|
||||
return this.validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getValidFlagOperator() {
|
||||
return this.validFlagOperator;
|
||||
}
|
||||
|
||||
public void setValidFlagOperator(String validFlagOperator) {
|
||||
this.validFlagOperator = validFlagOperator;
|
||||
}
|
||||
|
||||
public String getPutUser() {
|
||||
return this.putUser;
|
||||
}
|
||||
|
||||
public void setPutUser(String putUser) {
|
||||
this.putUser = putUser;
|
||||
}
|
||||
|
||||
public String getPutUserOperator() {
|
||||
return this.putUserOperator;
|
||||
}
|
||||
|
||||
public void setPutUserOperator(String putUserOperator) {
|
||||
this.putUserOperator = putUserOperator;
|
||||
}
|
||||
|
||||
public String getCitationUser() {
|
||||
return this.citationUser;
|
||||
}
|
||||
|
||||
public void setCitationUser(String citationUser) {
|
||||
this.citationUser = citationUser;
|
||||
}
|
||||
|
||||
public String getCitationUserOperator() {
|
||||
return this.citationUserOperator;
|
||||
}
|
||||
|
||||
public void setCitationUserOperator(String citationUserOperator) {
|
||||
this.citationUserOperator = citationUserOperator;
|
||||
}
|
||||
|
||||
public String getResponsibleUnit() {
|
||||
return this.responsibleUnit;
|
||||
}
|
||||
|
||||
public void setResponsibleUnit(String responsibleUnit) {
|
||||
this.responsibleUnit = responsibleUnit;
|
||||
}
|
||||
|
||||
public String getResponsibleUnitOperator() {
|
||||
return this.responsibleUnitOperator;
|
||||
}
|
||||
|
||||
public void setResponsibleUnitOperator(String responsibleUnitOperator) {
|
||||
this.responsibleUnitOperator = responsibleUnitOperator;
|
||||
}
|
||||
|
||||
public String getStandFile() {
|
||||
return this.standFile;
|
||||
}
|
||||
|
||||
public void setStandFile(String standFile) {
|
||||
this.standFile = standFile;
|
||||
}
|
||||
|
||||
public String getStandFileOperator() {
|
||||
return this.standFileOperator;
|
||||
}
|
||||
|
||||
public void setStandFileOperator(String standFileOperator) {
|
||||
this.standFileOperator = standFileOperator;
|
||||
}
|
||||
|
||||
public String getTags() {
|
||||
return this.tags;
|
||||
}
|
||||
|
||||
public void setTags(String tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public String getTagsOperator() {
|
||||
return this.tagsOperator;
|
||||
}
|
||||
|
||||
public void setTagsOperator(String tagsOperator) {
|
||||
this.tagsOperator = tagsOperator;
|
||||
}
|
||||
|
||||
public String getStandStatus() {
|
||||
return this.standStatus;
|
||||
}
|
||||
|
||||
public void setStandStatus(String standStatus) {
|
||||
this.standStatus = standStatus;
|
||||
}
|
||||
|
||||
public String getStandStatusOperator() {
|
||||
return this.standStatusOperator;
|
||||
}
|
||||
|
||||
public void setStandStatusOperator(String standStatusOperator) {
|
||||
this.standStatusOperator = standStatusOperator;
|
||||
}
|
||||
|
||||
public String getReplacedStandNum() {
|
||||
return this.replacedStandNum;
|
||||
}
|
||||
|
||||
public void setReplacedStandNum(String replacedStandNum) {
|
||||
this.replacedStandNum = replacedStandNum;
|
||||
}
|
||||
|
||||
public String getReplacedStandNumOperator() {
|
||||
return this.replacedStandNumOperator;
|
||||
}
|
||||
|
||||
public void setReplacedStandNumOperator(String replacedStandNumOperator) {
|
||||
this.replacedStandNumOperator = replacedStandNumOperator;
|
||||
}
|
||||
|
||||
public String getReplaceStandNum() {
|
||||
return this.replaceStandNum;
|
||||
}
|
||||
|
||||
public void setReplaceStandNum(String replaceStandNum) {
|
||||
this.replaceStandNum = replaceStandNum;
|
||||
}
|
||||
|
||||
public String getReplaceStandNumOperator() {
|
||||
return this.replaceStandNumOperator;
|
||||
}
|
||||
|
||||
public void setReplaceStandNumOperator(String replaceStandNumOperator) {
|
||||
this.replaceStandNumOperator = replaceStandNumOperator;
|
||||
}
|
||||
|
||||
public String getQuoteStand() {
|
||||
return this.quoteStand;
|
||||
}
|
||||
|
||||
public void setQuoteStand(String quoteStand) {
|
||||
this.quoteStand = quoteStand;
|
||||
}
|
||||
|
||||
public String getQuoteStandOperator() {
|
||||
return this.quoteStandOperator;
|
||||
}
|
||||
|
||||
public void setQuoteStandOperator(String quoteStandOperator) {
|
||||
this.quoteStandOperator = quoteStandOperator;
|
||||
}
|
||||
|
||||
public String getFirstPutTime() {
|
||||
return this.firstPutTime;
|
||||
}
|
||||
|
||||
public void setFirstPutTime(String firstPutTime) {
|
||||
this.firstPutTime = firstPutTime;
|
||||
}
|
||||
|
||||
public String getFirstPutTime1() {
|
||||
return this.firstPutTime1;
|
||||
}
|
||||
|
||||
public void setFirstPutTime1(String firstPutTime1) {
|
||||
this.firstPutTime1 = firstPutTime1;
|
||||
}
|
||||
|
||||
public String getFirstPutTime2() {
|
||||
return this.firstPutTime2;
|
||||
}
|
||||
|
||||
public void setFirstPutTime2(String firstPutTime2) {
|
||||
this.firstPutTime2 = firstPutTime2;
|
||||
}
|
||||
|
||||
public String getFirstPutTimeOperator() {
|
||||
return this.firstPutTimeOperator;
|
||||
}
|
||||
|
||||
public void setFirstPutTimeOperator(String firstPutTimeOperator) {
|
||||
this.firstPutTimeOperator = firstPutTimeOperator;
|
||||
}
|
||||
|
||||
public String getPutYear() {
|
||||
return this.putYear;
|
||||
}
|
||||
|
||||
public void setPutYear(String putYear) {
|
||||
this.putYear = putYear;
|
||||
}
|
||||
|
||||
public String getPutYear1() {
|
||||
return this.putYear1;
|
||||
}
|
||||
|
||||
public void setPutYear1(String putYear1) {
|
||||
this.putYear1 = putYear1;
|
||||
}
|
||||
|
||||
public String getPutYear2() {
|
||||
return this.putYear2;
|
||||
}
|
||||
|
||||
public void setPutYear2(String putYear2) {
|
||||
this.putYear2 = putYear2;
|
||||
}
|
||||
|
||||
public String getPutYearOperator() {
|
||||
return this.putYearOperator;
|
||||
}
|
||||
|
||||
public void setPutYearOperator(String putYearOperator) {
|
||||
this.putYearOperator = putYearOperator;
|
||||
}
|
||||
|
||||
public String getPutTime() {
|
||||
return this.putTime;
|
||||
}
|
||||
|
||||
public void setPutTime(String putTime) {
|
||||
this.putTime = putTime;
|
||||
}
|
||||
|
||||
public String getPutTime1() {
|
||||
return this.putTime1;
|
||||
}
|
||||
|
||||
public void setPutTime1(String putTime1) {
|
||||
this.putTime1 = putTime1;
|
||||
}
|
||||
|
||||
public String getPutTime2() {
|
||||
return this.putTime2;
|
||||
}
|
||||
|
||||
public void setPutTime2(String putTime2) {
|
||||
this.putTime2 = putTime2;
|
||||
}
|
||||
|
||||
public String getPutTimeOperator() {
|
||||
return this.putTimeOperator;
|
||||
}
|
||||
|
||||
public void setPutTimeOperator(String putTimeOperator) {
|
||||
this.putTimeOperator = putTimeOperator;
|
||||
}
|
||||
|
||||
public String getIssueTime() {
|
||||
return this.issueTime;
|
||||
}
|
||||
|
||||
public void setIssueTime(String issueTime) {
|
||||
this.issueTime = issueTime;
|
||||
}
|
||||
|
||||
public String getIssueTime1() {
|
||||
return this.issueTime1;
|
||||
}
|
||||
|
||||
public void setIssueTime1(String issueTime1) {
|
||||
this.issueTime1 = issueTime1;
|
||||
}
|
||||
|
||||
public String getIssueTime2() {
|
||||
return this.issueTime2;
|
||||
}
|
||||
|
||||
public void setIssueTime2(String issueTime2) {
|
||||
this.issueTime2 = issueTime2;
|
||||
}
|
||||
|
||||
public String getIssueTimeOperator() {
|
||||
return this.issueTimeOperator;
|
||||
}
|
||||
|
||||
public void setIssueTimeOperator(String issueTimeOperator) {
|
||||
this.issueTimeOperator = issueTimeOperator;
|
||||
}
|
||||
|
||||
public String getEnergyKind() {
|
||||
return this.energyKind;
|
||||
}
|
||||
|
||||
public void setEnergyKind(String energyKind) {
|
||||
this.energyKind = energyKind;
|
||||
}
|
||||
|
||||
public String getEnergyKindOperator() {
|
||||
return this.energyKindOperator;
|
||||
}
|
||||
|
||||
public void setEnergyKindOperator(String energyKindOperator) {
|
||||
this.energyKindOperator = energyKindOperator;
|
||||
}
|
||||
|
||||
public String getApplyArctic() {
|
||||
return this.applyArctic;
|
||||
}
|
||||
|
||||
public void setApplyArctic(String applyArctic) {
|
||||
this.applyArctic = applyArctic;
|
||||
}
|
||||
|
||||
public String getApplyArcticOperator() {
|
||||
return this.applyArcticOperator;
|
||||
}
|
||||
|
||||
public void setApplyArcticOperator(String applyArcticOperator) {
|
||||
this.applyArcticOperator = applyArcticOperator;
|
||||
}
|
||||
|
||||
public String getStandEnName() {
|
||||
return this.standEnName;
|
||||
}
|
||||
|
||||
public void setStandEnName(String standEnName) {
|
||||
this.standEnName = standEnName;
|
||||
}
|
||||
|
||||
public String getStandEnNameOperator() {
|
||||
return this.standEnNameOperator;
|
||||
}
|
||||
|
||||
public void setStandEnNameOperator(String standEnNameOperator) {
|
||||
this.standEnNameOperator = standEnNameOperator;
|
||||
}
|
||||
|
||||
public String getStandName() {
|
||||
return this.standName;
|
||||
}
|
||||
|
||||
public void setStandName(String standName) {
|
||||
this.standName = standName;
|
||||
}
|
||||
|
||||
public String getStandNameOperator() {
|
||||
return this.standNameOperator;
|
||||
}
|
||||
|
||||
public void setStandNameOperator(String standNameOperator) {
|
||||
this.standNameOperator = standNameOperator;
|
||||
}
|
||||
|
||||
public String getStandCode() {
|
||||
return this.standCode;
|
||||
}
|
||||
|
||||
public void setStandCode(String standCode) {
|
||||
this.standCode = standCode;
|
||||
}
|
||||
|
||||
public String getStandCodeOperator() {
|
||||
return this.standCodeOperator;
|
||||
}
|
||||
|
||||
public void setStandCodeOperator(String standCodeOperator) {
|
||||
this.standCodeOperator = standCodeOperator;
|
||||
}
|
||||
|
||||
public String getClassifyCode() {
|
||||
return this.classifyCode;
|
||||
}
|
||||
|
||||
public void setClassifyCode(String classifyCode) {
|
||||
this.classifyCode = classifyCode;
|
||||
}
|
||||
|
||||
public String getClassifyCodeOperator() {
|
||||
return this.classifyCodeOperator;
|
||||
}
|
||||
|
||||
public void setClassifyCodeOperator(String classifyCodeOperator) {
|
||||
this.classifyCodeOperator = classifyCodeOperator;
|
||||
}
|
||||
|
||||
public String getStandSubclass() {
|
||||
return this.standSubclass;
|
||||
}
|
||||
|
||||
public void setStandSubclass(String standSubclass) {
|
||||
this.standSubclass = standSubclass;
|
||||
}
|
||||
|
||||
public String getStandSubclassOperator() {
|
||||
return this.standSubclassOperator;
|
||||
}
|
||||
|
||||
public void setStandSubclassOperator(String standSubclassOperator) {
|
||||
this.standSubclassOperator = standSubclassOperator;
|
||||
}
|
||||
|
||||
public String getStandGenera() {
|
||||
return this.standGenera;
|
||||
}
|
||||
|
||||
public void setStandGenera(String standGenera) {
|
||||
this.standGenera = standGenera;
|
||||
}
|
||||
|
||||
public String getStandGeneraOperator() {
|
||||
return this.standGeneraOperator;
|
||||
}
|
||||
|
||||
public void setStandGeneraOperator(String standGeneraOperator) {
|
||||
this.standGeneraOperator = standGeneraOperator;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIdOperator() {
|
||||
return this.idOperator;
|
||||
}
|
||||
|
||||
public void setIdOperator(String idOperator) {
|
||||
this.idOperator = idOperator;
|
||||
}
|
||||
|
||||
private String menuId;
|
||||
private String[] idlist; //用于导出数据过程中传递选择的标准id
|
||||
private String[] replaceStandNumList;
|
||||
|
||||
public String getMenuId() {
|
||||
return menuId;
|
||||
}
|
||||
|
||||
public void setMenuId(String menuId) {
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public String[] getIdlist() {
|
||||
return idlist;
|
||||
}
|
||||
|
||||
public void setIdlist(String[] idlist) {
|
||||
this.idlist = idlist;
|
||||
}
|
||||
|
||||
public String[] getReplaceStandNumList() {
|
||||
return replaceStandNumList;
|
||||
}
|
||||
|
||||
public void setReplaceStandNumList(String[] replaceStandNumList) {
|
||||
this.replaceStandNumList = replaceStandNumList;
|
||||
}
|
||||
|
||||
private String[] applyArcticList;
|
||||
private String[] energyKindList;
|
||||
|
||||
public String[] getApplyArcticList() {
|
||||
return applyArcticList;
|
||||
}
|
||||
|
||||
public void setApplyArcticList(String[] applyArcticList) {
|
||||
this.applyArcticList = applyArcticList;
|
||||
}
|
||||
|
||||
public String[] getEnergyKindList() {
|
||||
return energyKindList;
|
||||
}
|
||||
|
||||
public void setEnergyKindList(String[] energyKindList) {
|
||||
this.energyKindList = energyKindList;
|
||||
}
|
||||
|
||||
public String getApplyCountry() {
|
||||
return applyCountry;
|
||||
}
|
||||
|
||||
public void setApplyCountry(String applyCountry) {
|
||||
this.applyCountry = applyCountry;
|
||||
}
|
||||
|
||||
public String getApplyCountryOperator() {
|
||||
return applyCountryOperator;
|
||||
}
|
||||
|
||||
public void setApplyCountryOperator(String applyCountryOperator) {
|
||||
this.applyCountryOperator = applyCountryOperator;
|
||||
}
|
||||
|
||||
public String getStandNature() {
|
||||
return standNature;
|
||||
}
|
||||
|
||||
public void setStandNature(String standNature) {
|
||||
this.standNature = standNature;
|
||||
}
|
||||
|
||||
public String getStandNatureOperator() {
|
||||
return standNatureOperator;
|
||||
}
|
||||
|
||||
public void setStandNatureOperator(String standNatureOperator) {
|
||||
this.standNatureOperator = standNatureOperator;
|
||||
}
|
||||
|
||||
public String getSynopsis() {
|
||||
return synopsis;
|
||||
}
|
||||
|
||||
public void setSynopsis(String synopsis) {
|
||||
this.synopsis = synopsis;
|
||||
}
|
||||
|
||||
public String getSynopsisOperator() {
|
||||
return synopsisOperator;
|
||||
}
|
||||
|
||||
public void setSynopsisOperator(String synopsisOperator) {
|
||||
this.synopsisOperator = synopsisOperator;
|
||||
}
|
||||
|
||||
public String getStandSort() {
|
||||
return standSort;
|
||||
}
|
||||
|
||||
public void setStandSort(String standSort) {
|
||||
this.standSort = standSort;
|
||||
}
|
||||
|
||||
public String getStandSortOperator() {
|
||||
return standSortOperator;
|
||||
}
|
||||
|
||||
public void setStandSortOperator(String standSortOperator) {
|
||||
this.standSortOperator = standSortOperator;
|
||||
}
|
||||
|
||||
public String getOpinionFile() {
|
||||
return opinionFile;
|
||||
}
|
||||
|
||||
public void setOpinionFile(String opinionFile) {
|
||||
this.opinionFile = opinionFile;
|
||||
}
|
||||
|
||||
public String getOpinionFileOperator() {
|
||||
return opinionFileOperator;
|
||||
}
|
||||
|
||||
public void setOpinionFileOperator(String opinionFileOperator) {
|
||||
this.opinionFileOperator = opinionFileOperator;
|
||||
}
|
||||
|
||||
public String getRelevanceFile() {
|
||||
return relevanceFile;
|
||||
}
|
||||
|
||||
public void setRelevanceFile(String relevanceFile) {
|
||||
this.relevanceFile = relevanceFile;
|
||||
}
|
||||
|
||||
public String getRelevanceFileOperator() {
|
||||
return relevanceFileOperator;
|
||||
}
|
||||
|
||||
public void setRelevanceFileOperator(String relevanceFileOperator) {
|
||||
this.relevanceFileOperator = relevanceFileOperator;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemarkOperator() {
|
||||
return remarkOperator;
|
||||
}
|
||||
|
||||
public void setRemarkOperator(String remarkOperator) {
|
||||
this.remarkOperator = remarkOperator;
|
||||
}
|
||||
|
||||
public List<String> getRoleIds() {
|
||||
return roleIds;
|
||||
}
|
||||
|
||||
public void setRoleIds(List<String> roleIds) {
|
||||
this.roleIds = roleIds;
|
||||
}
|
||||
|
||||
public String getStandYear() {
|
||||
return standYear;
|
||||
}
|
||||
|
||||
public void setStandYear(String standYear) {
|
||||
this.standYear = standYear;
|
||||
}
|
||||
|
||||
public List<String> getMenuRoleList() {
|
||||
return menuRoleList;
|
||||
}
|
||||
|
||||
public void setMenuRoleList(List<String> menuRoleList) {
|
||||
this.menuRoleList = menuRoleList;
|
||||
}
|
||||
|
||||
public String getNumberName() {
|
||||
return numberName;
|
||||
}
|
||||
|
||||
public void setNumberName(String numberName) {
|
||||
this.numberName = numberName;
|
||||
}
|
||||
|
||||
public String[] getReplacedStandNumList() {
|
||||
return replacedStandNumList;
|
||||
}
|
||||
|
||||
public void setReplacedStandNumList(String[] replacedStandNumList) {
|
||||
this.replacedStandNumList = replacedStandNumList;
|
||||
}
|
||||
|
||||
public String getRootMenuId() {
|
||||
return rootMenuId;
|
||||
}
|
||||
|
||||
public void setRootMenuId(String rootMenuId) {
|
||||
this.rootMenuId = rootMenuId;
|
||||
}
|
||||
|
||||
public String getCollectMenuId() {
|
||||
return collectMenuId;
|
||||
}
|
||||
|
||||
public void setCollectMenuId(String collectMenuId) {
|
||||
this.collectMenuId = collectMenuId;
|
||||
}
|
||||
|
||||
public String getAdvanceSearchVOStr() {
|
||||
return advanceSearchVOStr;
|
||||
}
|
||||
|
||||
public void setAdvanceSearchVOStr(String advanceSearchVOStr) {
|
||||
this.advanceSearchVOStr = advanceSearchVOStr;
|
||||
}
|
||||
|
||||
public String getAdvanceSearchStr() {
|
||||
return advanceSearchStr;
|
||||
}
|
||||
|
||||
public void setAdvanceSearchStr(String advanceSearchStr) {
|
||||
this.advanceSearchStr = advanceSearchStr;
|
||||
}
|
||||
|
||||
public String getOrgName() {
|
||||
return orgName;
|
||||
}
|
||||
|
||||
public void setOrgName(String orgName) {
|
||||
this.orgName = orgName;
|
||||
}
|
||||
|
||||
public List<String> getMenuAllChildrenIdList() {
|
||||
return menuAllChildrenIdList;
|
||||
}
|
||||
|
||||
public void setMenuAllChildrenIdList(List<String> menuAllChildrenIdList) {
|
||||
this.menuAllChildrenIdList = menuAllChildrenIdList;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getPaixu() {
|
||||
return paixu;
|
||||
}
|
||||
|
||||
public void setPaixu(String paixu) {
|
||||
this.paixu = paixu;
|
||||
}
|
||||
|
||||
public String getShunxu() {
|
||||
return shunxu;
|
||||
}
|
||||
|
||||
public void setShunxu(String shunxu) {
|
||||
this.shunxu = shunxu;
|
||||
}
|
||||
|
||||
public String getSql() {
|
||||
return sql;
|
||||
}
|
||||
|
||||
public void setSql(String sql) {
|
||||
this.sql = sql;
|
||||
}
|
||||
}
|
||||
+2
@@ -187,5 +187,7 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private String putTime2;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standSystemName;
|
||||
}
|
||||
|
||||
|
||||
+43
-19
@@ -32,6 +32,7 @@ import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
|
||||
import com.adc.da.slrs.sarStandItems.service.ISarStandItemsService;
|
||||
import com.adc.da.slrs.sarStandMenu.dao.SarStandMenuDao;
|
||||
import com.adc.da.slrs.sarStandMenu.entity.SarStandMenu;
|
||||
import com.adc.da.slrs.sarStandMenu.service.ISarStandMenuService;
|
||||
import com.adc.da.slrs.sarStandPutTime.dao.SarStandPutTimeDao;
|
||||
import com.adc.da.slrs.sarStandPutTime.entity.SarStandPutTime;
|
||||
import com.adc.da.slrs.sarStandVal.dao.SarStandValDao;
|
||||
@@ -47,6 +48,8 @@ import com.adc.da.sys.common.SelectionResult;
|
||||
import com.adc.da.sys.constant.ValueStateEnum;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.adc.da.sys.sarMenuStandard.service.ISarMenuStandardService;
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.utils.util.*;
|
||||
@@ -96,6 +99,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Autowired
|
||||
private ITsResourceService sarMenuEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarMenuStandardService sarMenuStandardService;
|
||||
|
||||
@Autowired
|
||||
private SarSarAccessInfoDao sarSarAccessInfoEODao;
|
||||
|
||||
@@ -114,6 +120,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Autowired
|
||||
private ISarSarAccessService sarSarAccessEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarStandMenuService sarStandMenuService;
|
||||
|
||||
@Autowired
|
||||
private ISarLawsInfoService sarLawsInfoEOService;
|
||||
|
||||
@@ -365,9 +374,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
//编写预警信息
|
||||
// writeWarnings(sarStandardsInfoEO);
|
||||
updateCiteStand(sarStandardsInfoEO, null, "DTBJH", "BDTBZBH");
|
||||
updateCiteStand(sarStandardsInfoEO, null, "YYBJ", "BYYBJ");
|
||||
updateRelateStand(sarStandardsInfoEO, "CBBH");
|
||||
// updateCiteStand(sarStandardsInfoEO, null, "DTBJH", "BDTBZBH");
|
||||
// updateCiteStand(sarStandardsInfoEO, null, "YYBJ", "BYYBJ");
|
||||
// updateRelateStand(sarStandardsInfoEO, "CBBH");
|
||||
// 根据代替标准号修改被代替的标准的状态 修改为已修订状态
|
||||
replaseStandState(sarStandardsInfoEO);
|
||||
// 处理属性表信息
|
||||
@@ -504,11 +513,12 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
public void createStandFile(String standId, Map<String, String> fileMap) throws Exception {
|
||||
if (fileMap != null && fileMap.size() > 0) {
|
||||
List<SarStandFile> standFileList = new ArrayList<>();
|
||||
List<AttFileEO> fileList = new ArrayList<>();
|
||||
for (Map.Entry<String, String> entry : fileMap.entrySet()) {
|
||||
String value = entry.getValue();
|
||||
String field = entry.getKey();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileList = attFileEOService.getMultiFileInfos(value);
|
||||
fileList = attFileEOService.getMultiFileInfos(value);
|
||||
if (fileList != null && !fileList.isEmpty()) {
|
||||
createStandFileAppend(standId, field, fileList, standFileList);
|
||||
}
|
||||
@@ -927,12 +937,12 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
//修改标准过程中,重新修改代替标准号对应的标准的被代替标准号
|
||||
// updateReplacedNumber(sarStandardsInfoEO,beforeSarStandardsInfo);
|
||||
// 根据引用标准修改其他被引用标准
|
||||
updateCiteStand(sarStandardsInfoEO, beforeSarStandardsInfo, "DTBJH", "BDTBZBH");
|
||||
updateCiteStand(sarStandardsInfoEO, beforeSarStandardsInfo, "YYBJ", "BYYBJ");
|
||||
// updateCiteStand(sarStandardsInfoEO, beforeSarStandardsInfo, "DTBJH", "BDTBZBH");
|
||||
// updateCiteStand(sarStandardsInfoEO, beforeSarStandardsInfo, "YYBJ", "BYYBJ");
|
||||
// 根据对应其他标准修改其他对应其他标准
|
||||
updateRelateStand(sarStandardsInfoEO, "CBBH");
|
||||
// updateRelateStand(sarStandardsInfoEO, "CBBH");
|
||||
// 根据代替标准号修改被代替的标准的状态 修改为已修订状态
|
||||
replaseStandState(sarStandardsInfoEO);
|
||||
// replaseStandState(sarStandardsInfoEO);
|
||||
// 记录修改日志
|
||||
saveUpdateLog(sarStandardsInfoEO, beforeSarStandardsInfo);
|
||||
// if(elasflag) {
|
||||
@@ -990,25 +1000,33 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
|
||||
public Map<String, Object> changeMap(SarStandardsInfo sarStandardsInfoEO, Map<String, Object> map) {
|
||||
map.put("country", sarStandardsInfoEO.getCountry());
|
||||
map.put("isRelateAccess", sarStandardsInfoEO.getIsRelateAccess());
|
||||
map.put("standSort", sarStandardsInfoEO.getStandSort());
|
||||
map.put("standNumber", sarStandardsInfoEO.getStandNumber());
|
||||
map.put("standYear", sarStandardsInfoEO.getStandYear());
|
||||
map.put("standName", sarStandardsInfoEO.getStandName());
|
||||
map.put("standEnName", sarStandardsInfoEO.getStandEnName());
|
||||
map.put("standNature", sarStandardsInfoEO.getStandNature());
|
||||
map.put("standState", sarStandardsInfoEO.getStandState());
|
||||
// map.put("country", sarStandardsInfoEO.getCountry());
|
||||
if(map == null){
|
||||
map = new TreeMap<String, Object>();
|
||||
}
|
||||
map.put("standSystem", verifyObj(sarStandardsInfoEO.getStandSystem()));
|
||||
map.put("isRelateAccess", verifyObj(sarStandardsInfoEO.getIsRelateAccess()));
|
||||
map.put("standSort", verifyObj(sarStandardsInfoEO.getStandSort()));
|
||||
map.put("standNumber", verifyObj(sarStandardsInfoEO.getStandNumber()));
|
||||
map.put("standYear", verifyObj(sarStandardsInfoEO.getStandYear()));
|
||||
map.put("standName", verifyObj(sarStandardsInfoEO.getStandName()));
|
||||
map.put("standEnName", verifyObj(sarStandardsInfoEO.getStandEnName()));
|
||||
map.put("standNature", verifyObj(sarStandardsInfoEO.getStandNature()));
|
||||
map.put("standState", verifyObj(sarStandardsInfoEO.getStandState()));
|
||||
// if (sarStandardsInfoEO.getIssueTime() != null) {
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// String issueStr = format.format(sarStandardsInfoEO.getIssueTime());
|
||||
//
|
||||
// }
|
||||
map.put("issueTime", sarStandardsInfoEO.getIssueTime());
|
||||
map.put("synopsis", sarStandardsInfoEO.getSynopsis());
|
||||
map.put("issueTime", verifyObj(sarStandardsInfoEO.getIssueTime()));
|
||||
map.put("synopsis", verifyObj(sarStandardsInfoEO.getSynopsis()));
|
||||
return map;
|
||||
}
|
||||
|
||||
private Object verifyObj(Object str){
|
||||
return str == null ? "" : str;
|
||||
}
|
||||
|
||||
|
||||
public int deleteSarStandards(String ids) {
|
||||
String[] idArr = ids.split(",");
|
||||
@@ -1787,6 +1805,12 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
// 查询纳入清单的国家地区
|
||||
if (sarStandardsInfoEO != null) {
|
||||
if(sarStandardsInfoEO.getStandSystem() != null){
|
||||
SarMenuStandard menu = sarMenuStandardService.selectMenuById(sarStandardsInfoEO.getStandSystem());
|
||||
if(menu != null){
|
||||
sarStandardsInfoEO.setStandSystemName(menu.getMenuName() == null ? "" : menu.getMenuName());
|
||||
}
|
||||
}
|
||||
String accessCountry = sarSarAccessEOService.getCountryByRes(sarStandardsInfoEO.getId(), sarStandardsInfoEO.getStandType() + "_STAND");
|
||||
sarStandardsInfoEO.setAccessCountry(accessCountry);
|
||||
}
|
||||
|
||||
+1
-1
@@ -257,7 +257,7 @@ public class SarUpdLogServiceImpl extends ServiceImpl<SarUpdLogDao, SarUpdLog> i
|
||||
sarUpdLogEO.setSarId(sarId);
|
||||
sarUpdLogEO.setSarType(sarType);
|
||||
sarUpdLogEO.setCreationTime(new Date());
|
||||
sarUpdLogEO.setCreationUser(LoginUserUtil.getUserId());
|
||||
sarUpdLogEO.setCreationUser(LoginUserUtil.getUserId() == null ? "" : LoginUserUtil.getUserId());
|
||||
sarUpdLogEO.setContent(content);
|
||||
dao.insert(sarUpdLogEO);
|
||||
}
|
||||
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
package com.adc.da.slrs.standardSplit.controller;
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsValEO;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsValEOPage;
|
||||
import com.adc.da.slrs.standardSplit.service.SarFileSplitItemsEOService;
|
||||
import com.adc.da.slrs.standardSplit.service.SarFileSplitItemsTableEOService;
|
||||
import com.adc.da.slrs.standardSplit.service.SarFileSplitItemsValEOService;
|
||||
import com.adc.da.util.http.ResponseMessage;
|
||||
import com.adc.da.util.http.Result;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/lawss/sarFileSplitItemsVal")
|
||||
@Api(description = "|SarFileSplitItemsValEO|")
|
||||
public class SarFileSplitItemsValEOController extends BaseController<SarFileSplitItemsValEO> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitItemsValEOController.class);
|
||||
|
||||
@Autowired
|
||||
private SarFileSplitItemsValEOService sarFileSplitItemsValEOService;
|
||||
|
||||
@Autowired
|
||||
private SarFileSplitItemsTableEOService sarFileSplitItemsTableEOService;
|
||||
|
||||
@Autowired
|
||||
private SarFileSplitItemsEOService sarFileSplitItemsEOService;
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsValEO|分页查询")
|
||||
@GetMapping("/page")
|
||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||
// @RequiresPermissions("lawss:sarFileSplitItemsVal:page")
|
||||
public ResponseMessage<PageInfo<SarFileSplitItemsValEO>> page(SarFileSplitItemsValEOPage page) throws Exception {
|
||||
page.setOrderBy("modify_time desc");
|
||||
List<SarFileSplitItemsValEO> rows = sarFileSplitItemsValEOService.queryByPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsValEO|查询")
|
||||
@GetMapping("/getItemsValList")
|
||||
// @RequiresPermissions("lawss:sarFileSplitItemsVal:list")
|
||||
public ResponseMessage<List<SarFileSplitItemsValEO>> list(SarFileSplitItemsValEOPage page) throws Exception {
|
||||
page.setOrderBy("DISPLAY_SEQ,ID");
|
||||
List<SarFileSplitItemsValEO> getList = sarFileSplitItemsValEOService.queryByList(page);
|
||||
if (getList != null && !getList.isEmpty()) {
|
||||
for (SarFileSplitItemsValEO sarFileSplitItemsValEO : getList) {
|
||||
String imgPath = sarFileSplitItemsValEO.getItemContent();
|
||||
if ("IMG".equals(sarFileSplitItemsValEO.getType()) && StringUtils.isNotEmpty(imgPath)) {
|
||||
String imgName = imgPath.substring(imgPath.lastIndexOf("/")+1, imgPath.length());
|
||||
sarFileSplitItemsValEO.setImgName(imgName);
|
||||
}
|
||||
/*else if ("TABLE".equals(sarFileSplitItemsValEO.getType())) {
|
||||
SarFileSplitItemsTableEOPage tablePage = new SarFileSplitItemsTableEOPage();
|
||||
tablePage.setItemsValId(sarFileSplitItemsValEO.getId());
|
||||
List<SarFileSplitItemsTableEO> tableList = sarFileSplitItemsTableEOService.queryByList(tablePage);
|
||||
List<SarFileSplitItemsTableEO> tableListRow = sarFileSplitItemsTableEOService.queryByRowNum(tablePage);
|
||||
sarFileSplitItemsValEO.setTableList(tableList);
|
||||
if (tableListRow != null && !tableListRow.isEmpty()) {
|
||||
List<List<SarFileSplitItemsTableEO>> getTableList = new ArrayList<>();
|
||||
for (int i=1; i <= tableListRow.size();i++) {
|
||||
List<SarFileSplitItemsTableEO> rowList = new ArrayList<>();
|
||||
for (int j=0; j < tableList.size();j++) {
|
||||
if (tableList.get(j).getRowNum() == i) {
|
||||
rowList.add(tableList.get(j));
|
||||
}
|
||||
}
|
||||
getTableList.add(rowList);
|
||||
}
|
||||
sarFileSplitItemsValEO.setTableListShow(getTableList);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
return Result.success(getList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsValEO|详情")
|
||||
@GetMapping("/{id}")
|
||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||
// @RequiresPermissions("lawss:sarFileSplitItemsVal:get")
|
||||
public ResponseMessage<SarFileSplitItemsValEO> find(@PathVariable String id) throws Exception {
|
||||
return Result.success(sarFileSplitItemsValEOService.selectByPrimaryKey(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsValEO|新增")
|
||||
@PostMapping(consumes = APPLICATION_JSON_UTF8_VALUE)
|
||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||
// @RequiresPermissions("lawss:sarFileSplitItemsVal:save")
|
||||
public ResponseMessage<SarFileSplitItemsValEO> create(@RequestBody SarFileSplitItemsValEO sarFileSplitItemsValEO) throws Exception {
|
||||
sarFileSplitItemsValEOService.insertSelective(sarFileSplitItemsValEO);
|
||||
return Result.success(sarFileSplitItemsValEO);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsValEO|修改")
|
||||
@PutMapping(consumes = APPLICATION_JSON_UTF8_VALUE)
|
||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||
// @RequiresPermissions("lawss:sarFileSplitItemsVal:update")
|
||||
public ResponseMessage<SarFileSplitItemsValEO> update(@RequestBody SarFileSplitItemsValEO sarFileSplitItemsValEO) throws Exception {
|
||||
sarFileSplitItemsValEOService.updateByPrimaryKeySelective(sarFileSplitItemsValEO);
|
||||
return Result.success(sarFileSplitItemsValEO);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsValEO|删除")
|
||||
@DeleteMapping("/{id}")
|
||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||
// @RequiresPermissions("lawss:sarFileSplitItemsVal:delete")
|
||||
public ResponseMessage delete(@PathVariable String id) throws Exception {
|
||||
sarFileSplitItemsValEOService.deleteByPrimaryKey(id);
|
||||
logger.info("delete from SAR_FILE_SPLIT_ITEMS_VAL where id = {}", id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitItemsEO|根据目录查询")
|
||||
@GetMapping("/getSplitItemsByMenu")
|
||||
// @RequiresPermissions("lawss:sarFileSplitItems:page")
|
||||
public ResponseMessage<List<SarFileSplitItemsValEO>> getSplitItemsByMenu(String menuId,String infoId) throws Exception {
|
||||
List<SarFileSplitItemsValEO> getList = sarFileSplitItemsValEOService.getSplitItemsByMenu(menuId,infoId);
|
||||
return Result.success(getList);
|
||||
}
|
||||
|
||||
}
|
||||
+2
@@ -30,4 +30,6 @@ public interface SarFileSplitItemsTableEODao extends BaseMapper<SarFileSplitItem
|
||||
|
||||
List<SarFileSplitItemsTableEO> queryItemsTableByMenuId(@Param("idList") List<String> idList);
|
||||
|
||||
List<SarFileSplitItemsTableEO> queryByList(@Param("pager") SarFileSplitItemsTableEOPage pager);
|
||||
|
||||
}
|
||||
|
||||
+10
@@ -36,4 +36,14 @@ public interface SarFileSplitItemsValEODao extends BaseMapper<SarFileSplitItemsV
|
||||
|
||||
List<SarFileSplitItemsValEO> queryByList(SarFileSplitItemsValEOPage valEOPage);
|
||||
|
||||
List<SarFileSplitItemsValEO> queryByPage(SarFileSplitItemsValEOPage page);
|
||||
|
||||
SarFileSplitItemsValEO selectByPrimaryKey(String id);
|
||||
|
||||
void insertSelective(SarFileSplitItemsValEO sarFileSplitItemsValEO);
|
||||
|
||||
void updateByPrimaryKeySelective(SarFileSplitItemsValEO sarFileSplitItemsValEO);
|
||||
|
||||
void deleteByPrimaryKey(String id);
|
||||
|
||||
}
|
||||
|
||||
+12
@@ -8,4 +8,16 @@ import java.util.List;
|
||||
public interface SarFileSplitItemsValEOService {
|
||||
|
||||
List<SarFileSplitItemsValEO> queryByList(SarFileSplitItemsValEOPage valEOPage);
|
||||
|
||||
List<SarFileSplitItemsValEO> queryByPage(SarFileSplitItemsValEOPage page);
|
||||
|
||||
SarFileSplitItemsValEO selectByPrimaryKey(String id);
|
||||
|
||||
void insertSelective(SarFileSplitItemsValEO sarFileSplitItemsValEO);
|
||||
|
||||
void updateByPrimaryKeySelective(SarFileSplitItemsValEO sarFileSplitItemsValEO);
|
||||
|
||||
void deleteByPrimaryKey(String id);
|
||||
|
||||
List<SarFileSplitItemsValEO> getSplitItemsByMenu(String menuId,String infoId);
|
||||
}
|
||||
|
||||
+78
-2
@@ -1,9 +1,11 @@
|
||||
package com.adc.da.slrs.standardSplit.service.impl;
|
||||
|
||||
import com.adc.da.slrs.standardSplit.dao.SarFileSplitItemsEODao;
|
||||
import com.adc.da.slrs.standardSplit.dao.SarFileSplitItemsTableEODao;
|
||||
import com.adc.da.slrs.standardSplit.dao.SarFileSplitItemsValEODao;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsValEO;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsValEOPage;
|
||||
import com.adc.da.slrs.standardSplit.entity.*;
|
||||
import com.adc.da.slrs.standardSplit.service.SarFileSplitItemsValEOService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -11,6 +13,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@@ -20,9 +23,82 @@ public class SarFileSplitItemsValEOServiceImpl implements SarFileSplitItemsValEO
|
||||
|
||||
@Autowired
|
||||
private SarFileSplitItemsValEODao sarFileSplitItemsValEODao;
|
||||
@Autowired
|
||||
private SarFileSplitItemsEODao sarFileSplitItemsEODao;
|
||||
@Autowired
|
||||
private SarFileSplitItemsTableEODao sarFileSplitItemsTableEODao;
|
||||
|
||||
@Override
|
||||
public List<SarFileSplitItemsValEO> queryByList(SarFileSplitItemsValEOPage valEOPage) {
|
||||
return sarFileSplitItemsValEODao.queryByList(valEOPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarFileSplitItemsValEO> queryByPage(SarFileSplitItemsValEOPage page) {
|
||||
return sarFileSplitItemsValEODao.queryByPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SarFileSplitItemsValEO selectByPrimaryKey(String id) {
|
||||
return sarFileSplitItemsValEODao.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertSelective(SarFileSplitItemsValEO sarFileSplitItemsValEO) {
|
||||
sarFileSplitItemsValEODao.insertSelective(sarFileSplitItemsValEO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateByPrimaryKeySelective(SarFileSplitItemsValEO sarFileSplitItemsValEO) {
|
||||
sarFileSplitItemsValEODao.updateByPrimaryKeySelective(sarFileSplitItemsValEO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByPrimaryKey(String id) {
|
||||
sarFileSplitItemsValEODao.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarFileSplitItemsValEO> getSplitItemsByMenu(String menuId, String infoId) {
|
||||
List<SarFileSplitItemsEO> rows = sarFileSplitItemsEODao.queryItemsByMenuId(menuId);;
|
||||
List<SarFileSplitItemsValEO> getList = new ArrayList<>();
|
||||
if (rows != null && !rows.isEmpty()) {
|
||||
for (SarFileSplitItemsEO sarFileSplitItemsEO : rows) {
|
||||
SarFileSplitItemsValEOPage valpage = new SarFileSplitItemsValEOPage();
|
||||
valpage.setItemId(sarFileSplitItemsEO.getId());
|
||||
valpage.setOrderBy("DISPLAY_SEQ,ID");
|
||||
List<SarFileSplitItemsValEO> getListVal = sarFileSplitItemsValEODao.queryByList(valpage);
|
||||
if (getList != null && !getList.isEmpty()) {
|
||||
for (SarFileSplitItemsValEO sarFileSplitItemsValEO : getList) {
|
||||
String imgPath = sarFileSplitItemsValEO.getItemContent();
|
||||
if ("IMG".equals(sarFileSplitItemsValEO.getType()) && StringUtils.isNotEmpty(imgPath)) {
|
||||
String imgName = imgPath.substring(imgPath.lastIndexOf("/")+1, imgPath.length());
|
||||
sarFileSplitItemsValEO.setImgName(imgName);
|
||||
} else if ("TABLE".equals(sarFileSplitItemsValEO.getType())) {
|
||||
SarFileSplitItemsTableEOPage tablePage = new SarFileSplitItemsTableEOPage();
|
||||
tablePage.setItemsValId(sarFileSplitItemsValEO.getId());
|
||||
List<SarFileSplitItemsTableEO> tableList = sarFileSplitItemsTableEODao.queryByList(tablePage);
|
||||
List<SarFileSplitItemsTableEO> tableListRow = sarFileSplitItemsTableEODao.queryByRowNum(tablePage);
|
||||
sarFileSplitItemsValEO.setTableList(tableList);
|
||||
if (tableListRow != null && !tableListRow.isEmpty()) {
|
||||
List<List<SarFileSplitItemsTableEO>> getTableList = new ArrayList<>();
|
||||
for (int i=1; i <= tableListRow.size();i++) {
|
||||
List<SarFileSplitItemsTableEO> rowList = new ArrayList<>();
|
||||
for (int j=0; j < tableList.size();j++) {
|
||||
if (tableList.get(j).getRowNum() == i) {
|
||||
rowList.add(tableList.get(j));
|
||||
}
|
||||
}
|
||||
getTableList.add(rowList);
|
||||
}
|
||||
sarFileSplitItemsValEO.setTableListShow(getTableList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
getList.addAll(getListVal);
|
||||
}
|
||||
}
|
||||
return getList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ public class InitStandAttrUtil implements ApplicationRunner {
|
||||
StringBuilder fieldInfoNameBuilderLaws = new StringBuilder();
|
||||
StringBuilder fieldInfoNameBuilderBuss = new StringBuilder();
|
||||
QueryWrapper qw = new QueryWrapper();
|
||||
qw.eq("VALID_FLAG","0");
|
||||
List<SarStandAttrDetails> getDetailsList = sarStandAttrDetailsEOService.list(qw);
|
||||
if (getDetailsList != null && !getDetailsList.isEmpty()) {
|
||||
logger.info("项目启动时加载--查询标准属性类--查询到" + getDetailsList.size() + "条属性字段数据!");
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
SELECT SEQ_SAR_UPD_LOG.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_UPD_LOG(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{sarType, jdbcType=VARCHAR}, #{sarId, jdbcType=VARCHAR}, #{content, jdbcType=CLOB}, #{creationTime, jdbcType=TIMESTAMP})
|
||||
values (#{id, jdbcType=VARCHAR}, #{sarType, jdbcType=VARCHAR}, #{sarId, jdbcType=VARCHAR}, #{content, jdbcType=CLOB}, #{creationTime, jdbcType=TIMESTAMP},#{creationUser, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
|
||||
+906
@@ -0,0 +1,906 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao">
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand" >
|
||||
<id column="id" property="id" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="stand_status" property="standStatus" />
|
||||
<result column="replaced_stand_num" property="replacedStandNum" />
|
||||
<result column="replace_stand_num" property="replaceStandNum" />
|
||||
<result column="put_time" property="putTime" />
|
||||
<result column="issue_time" property="issueTime" />
|
||||
<result column="stand_en_name" property="standEnName" />
|
||||
<result column="stand_name" property="standName" />
|
||||
<result column="stand_code" property="standCode" />
|
||||
<!-- 数据库新增字段-->
|
||||
<result column="apply_country" property="applyCountry" />
|
||||
<result column="stand_nature" property="standNature" />
|
||||
<result column="stand_sort" property="standSort" />
|
||||
<result column="stand_year" property="standYear" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="BaseResultMapExcel" type="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand" >
|
||||
<result column="replaced_stand_num" property="replacedStandNum" />
|
||||
<result column="replace_stand_num" property="replaceStandNum" />
|
||||
<result column="put_time" property="putTime" />
|
||||
<result column="issue_time" property="issueTime" />
|
||||
<result column="stand_en_name" property="standEnName" />
|
||||
<result column="stand_name" property="standName" />
|
||||
<result column="stand_code" property="standCode" />
|
||||
<!-- 数据库新增字段-->
|
||||
<result column="applyCountryShow" property="applyCountryShow" />
|
||||
<result column="standNatrueShow" property="standNatrueShow" />
|
||||
<result column="standSortShow" property="standSortShow" />
|
||||
<result column="stand_year" property="standYear" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_BUSSIONESS_STAND table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
modify_time, creation_time, valid_flag, stand_status, replaced_stand_num,replace_stand_num,
|
||||
put_time, issue_time,stand_en_name,stand_name, stand_code, id,apply_country, stand_nature, stand_sort
|
||||
</sql>
|
||||
<sql id="Base_Column_List_show" >
|
||||
stand_year,dicapplyCountry.DIC_TYPE_NAME as applyCountryShow,dicstandSort.DIC_TYPE_NAME as standSortShow,
|
||||
dicstandNature.DIC_TYPE_NAME as standNatrueShow,SAR_BUSSIONESS_STAND.modify_time,
|
||||
SAR_BUSSIONESS_STAND.creation_time, SAR_BUSSIONESS_STAND.valid_flag,
|
||||
SAR_BUSSIONESS_STAND.apply_country, SAR_BUSSIONESS_STAND.stand_nature,SAR_BUSSIONESS_STAND.stand_sort,
|
||||
stand_status, replaced_stand_num,replace_stand_num,put_time,issue_time,stand_en_name,
|
||||
stand_name, stand_code,SAR_BUSSIONESS_STAND.id,dicstandStatus.DIC_TYPE_NAME as standStatusShow
|
||||
</sql>
|
||||
|
||||
<sql id="Group_Column_List_show" >
|
||||
stand_year,dicapplyCountry.DIC_TYPE_NAME,dicstandSort.DIC_TYPE_NAME,dicstandNature.DIC_TYPE_NAME,SAR_BUSSIONESS_STAND.modify_time,
|
||||
SAR_BUSSIONESS_STAND.creation_time, SAR_BUSSIONESS_STAND.valid_flag,
|
||||
SAR_BUSSIONESS_STAND.apply_country, SAR_BUSSIONESS_STAND.stand_nature,
|
||||
SAR_BUSSIONESS_STAND.stand_sort,
|
||||
stand_status, replaced_stand_num, replace_stand_num,put_time,
|
||||
issue_time, stand_en_name, stand_name, stand_code,
|
||||
SAR_BUSSIONESS_STAND.id,dicstandStatus.DIC_TYPE_NAME
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="standStatus != null" >
|
||||
and stand_status ${standStatusOperator} #{standStatus}
|
||||
</if>
|
||||
<if test="replacedStandNum != null" >
|
||||
and replaced_stand_num ${replacedStandNumOperator} #{replacedStandNum}
|
||||
</if>
|
||||
<if test="replaceStandNum != null" >
|
||||
and replace_stand_num ${replaceStandNumOperator} #{replaceStandNum}
|
||||
</if>
|
||||
<if test="putTime != null" >
|
||||
and put_time ${putTimeOperator} #{putTime}
|
||||
</if>
|
||||
<if test="putTime1 != null" >
|
||||
and put_time >= #{putTime1}
|
||||
</if>
|
||||
<if test="putTime2 != null" >
|
||||
and put_time <= #{putTime2}
|
||||
</if>
|
||||
<if test="issueTime != null" >
|
||||
and issue_time ${issueTimeOperator} #{issueTime}
|
||||
</if>
|
||||
<if test="issueTime1 != null" >
|
||||
and issue_time >= #{issueTime1}
|
||||
</if>
|
||||
<if test="issueTime2 != null" >
|
||||
and issue_time <= #{issueTime2}
|
||||
</if>
|
||||
<if test="standEnName != null" >
|
||||
and stand_en_name ${standEnNameOperator} #{standEnName}
|
||||
</if>
|
||||
<if test="standName != null" >
|
||||
and stand_name ${standNameOperator} #{standName}
|
||||
</if>
|
||||
<if test="standCode != null" >
|
||||
and stand_code ${standCodeOperator} #{standCode}
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<!-- 数据库新加字段-->
|
||||
<if test="applyCountry != null" >
|
||||
and apply_country ${applyCountryOperator} #{applyCountry}
|
||||
</if>
|
||||
<if test="standNature != null" >
|
||||
and stand_nature ${standNatureOperator} #{standNature}
|
||||
</if>
|
||||
<if test="standSort != null" >
|
||||
and stand_sort ${standSortOperator} #{standSort}
|
||||
</if>
|
||||
<if test="opinionFile != null" >
|
||||
and opinion_file ${opinionFileOperator} #{opinionFile}
|
||||
</if>
|
||||
<if test="relevanceFile != null" >
|
||||
and relevance_file ${relevanceFileOperator} #{relevanceFile}
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
and remark ${remarkOperator} #{remark}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_BUSSIONESS_STAND.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_BUSSIONESS_STAND
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="standStatus != null" >stand_status,</if>
|
||||
<if test="replacedStandNum != null" >replaced_stand_num,</if>
|
||||
<if test="replaceStandNum != null" >replace_stand_num,</if>
|
||||
<if test="putTime != null" >put_time,</if>
|
||||
<if test="issueTime != null" >issue_time,</if>
|
||||
<if test="standEnName != null" >stand_en_name,</if>
|
||||
<if test="standName != null" >stand_name,</if>
|
||||
<if test="standCode != null" >stand_code,</if>
|
||||
<if test="id != null" >id,</if>
|
||||
<!--数据库新增字段-->
|
||||
<if test="applyCountry != null" >apply_country,</if>
|
||||
<if test="standNature != null" >stand_Nature,</if>
|
||||
<if test="standSort != null" >stand_sort,</if>
|
||||
<if test="standYear != null" >stand_year,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="standStatus != null" >#{standStatus, jdbcType=VARCHAR},</if>
|
||||
<if test="replacedStandNum != null" >#{replacedStandNum, jdbcType=VARCHAR},</if>
|
||||
<if test="replaceStandNum != null" >#{replaceStandNum, jdbcType=VARCHAR},</if>
|
||||
<if test="putTime != null" >#{putTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="issueTime != null" >#{issueTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="standEnName != null" >#{standEnName, jdbcType=VARCHAR},</if>
|
||||
<if test="standName != null" >#{standName, jdbcType=VARCHAR},</if>
|
||||
<if test="standCode != null" >#{standCode, jdbcType=VARCHAR},</if>
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<!--数据库新增字段-->
|
||||
<if test="applyCountry != null" >#{applyCountry, jdbcType=VARCHAR},</if>
|
||||
<if test="standNature != null" >#{standNature, jdbcType=VARCHAR},</if>
|
||||
<if test="standSort != null" >#{standSort, jdbcType=VARCHAR},</if>
|
||||
<if test="standYear != null" >#{standYear, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand" >
|
||||
update SAR_BUSSIONESS_STAND
|
||||
<set >
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="standStatus != null" >
|
||||
stand_status = #{standStatus},
|
||||
</if>
|
||||
<if test="replacedStandNum != null" >
|
||||
replaced_stand_num = #{replacedStandNum},
|
||||
</if>
|
||||
<if test="replaceStandNum != null" >
|
||||
replace_stand_num = #{replaceStandNum},
|
||||
</if>
|
||||
<if test="putTime != null" >
|
||||
put_time = #{putTime},
|
||||
</if>
|
||||
<if test="putTime == null">
|
||||
put_time = null,
|
||||
</if>
|
||||
<if test="issueTime != null" >
|
||||
issue_time = #{issueTime},
|
||||
</if>
|
||||
<if test="issueTime == null">
|
||||
issue_time = null,
|
||||
</if>
|
||||
<if test="standEnName != null" >
|
||||
stand_en_name = #{standEnName},
|
||||
</if>
|
||||
<if test="standName != null" >
|
||||
stand_name = #{standName},
|
||||
</if>
|
||||
<if test="standCode != null" >
|
||||
stand_code = #{standCode},
|
||||
</if>
|
||||
<!-- 数据库新加字段-->
|
||||
<if test="applyCountry != null" >
|
||||
apply_country = #{applyCountry},
|
||||
</if>
|
||||
<if test="standNature != null" >
|
||||
stand_nature = #{standNature},
|
||||
</if>
|
||||
<if test="standSort != null" >
|
||||
stand_sort = #{standSort},
|
||||
</if>
|
||||
<if test="standYear != null" >
|
||||
stand_year = #{standYear},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelectiveTimeNotNull" parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand" >
|
||||
update SAR_BUSSIONESS_STAND
|
||||
<set >
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="standStatus != null" >
|
||||
stand_status = #{standStatus},
|
||||
</if>
|
||||
<if test="replacedStandNum != null" >
|
||||
replaced_stand_num = #{replacedStandNum},
|
||||
</if>
|
||||
<if test="replaceStandNum != null" >
|
||||
replace_stand_num = #{replaceStandNum},
|
||||
</if>
|
||||
<if test="putTime != null" >
|
||||
put_time = #{putTime},
|
||||
</if>
|
||||
<if test="issueTime != null" >
|
||||
issue_time = #{issueTime},
|
||||
</if>
|
||||
<if test="standEnName != null" >
|
||||
stand_en_name = #{standEnName},
|
||||
</if>
|
||||
<if test="standName != null" >
|
||||
stand_name = #{standName},
|
||||
</if>
|
||||
<if test="standCode != null" >
|
||||
stand_code = #{standCode},
|
||||
</if>
|
||||
<!-- 数据库新加字段-->
|
||||
<if test="applyCountry != null" >
|
||||
apply_country = #{applyCountry},
|
||||
</if>
|
||||
<if test="standNature != null" >
|
||||
stand_nature = #{standNature},
|
||||
</if>
|
||||
<if test="standSort != null" >
|
||||
stand_sort = #{standSort},
|
||||
</if>
|
||||
<if test="standYear != null" >
|
||||
stand_year = #{standYear},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_BUSSIONESS_STAND -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_BUSSIONESS_STAND
|
||||
where id = #{value} and valid_flag=0
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_BUSSIONESS_STAND
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_BUSSIONESS_STAND 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_BUSSIONESS_STAND
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_BUSSIONESS_STAND列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_BUSSIONESS_STAND
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_BUSSIONESS_STAND
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 分页查询条件 -->
|
||||
<sql id="SarBussionInfo_Where_Clause">
|
||||
left join TS_DICTYPE dicstandStatus ON ( dicstandStatus.dic_type_code = SAR_BUSSIONESS_STAND.STAND_STATUS AND dicstandStatus.dic_id IS NOT NULL and dicstandStatus.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandNature ON ( dicstandNature.dic_type_code = SAR_BUSSIONESS_STAND.STAND_NATURE AND dicstandNature.dic_id IS NOT NULL and dicstandNature.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandSort ON ( dicstandSort.dic_type_code = SAR_BUSSIONESS_STAND.STAND_SORT AND dicstandSort.dic_id IS NOT NULL and dicstandSort.valid_flag = 0)
|
||||
left join TS_DICTYPE dicapplyCountry ON ( dicapplyCountry.dic_type_code = SAR_BUSSIONESS_STAND.APPLY_COUNTRY AND dicapplyCountry.dic_id IS NOT NULL and dicapplyCountry.valid_flag = 0)
|
||||
left join SAR_BUSS_STAND_MENU ON SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
left join SAR_MENU on SAR_BUSS_STAND_MENU.menu_id = SAR_MENU.id
|
||||
left join SAR_BUSS_STAND_ATTR_INFO on (SAR_BUSS_STAND_ATTR_INFO.STAND_ID = SAR_BUSSIONESS_STAND.id and SAR_BUSS_STAND_ATTR_INFO.valid_flag=0)
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="standCode != null" >
|
||||
<!-- and (
|
||||
(concat(dicstandSort.DIC_TYPE_NAME, ' ', SAR_BUSSIONESS_STAND.STAND_CODE, '-', SAR_BUSSIONESS_STAND.STAND_YEAR)
|
||||
like concat('%', #{standCode}, '%') and SAR_BUSSIONESS_STAND.STAND_YEAR != '' and SAR_BUSSIONESS_STAND.STAND_YEAR is not null)
|
||||
or
|
||||
(concat(dicstandSort.DIC_TYPE_NAME, ' ', SAR_BUSSIONESS_STAND.STAND_CODE)
|
||||
like concat('%', #{standCode}, '%') and (SAR_BUSSIONESS_STAND.STAND_YEAR = '' or SAR_BUSSIONESS_STAND.STAND_YEAR is null) )
|
||||
) -->
|
||||
and SAR_BUSSIONESS_STAND.STAND_CODE like concat('%', #{standCode}, '%')
|
||||
</if>
|
||||
<if test="numberName != null" >
|
||||
and (
|
||||
<!-- (concat(dicstandSort.DIC_TYPE_NAME,' ',SAR_BUSSIONESS_STAND.STAND_CODE,'-',
|
||||
SAR_BUSSIONESS_STAND.STAND_YEAR) like concat(concat('%',#{numberName}),'%') and SAR_BUSSIONESS_STAND.STAND_YEAR != '' and SAR_BUSSIONESS_STAND.STAND_YEAR is not null)
|
||||
or (concat(dicstandSort.DIC_TYPE_NAME,' ',SAR_BUSSIONESS_STAND.STAND_CODE) like concat(concat('%',#{numberName}),'%')
|
||||
and (SAR_BUSSIONESS_STAND.STAND_YEAR = '' or SAR_BUSSIONESS_STAND.STAND_YEAR is null)) -->
|
||||
SAR_BUSSIONESS_STAND.STAND_CODE like concat(concat('%',#{numberName}),'%')
|
||||
or stand_name like concat(concat('%',#{numberName}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="standName != null" >
|
||||
and stand_name like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<!-- 高级搜索项 -->
|
||||
<if test="putTime1 != null" >
|
||||
and DATE_FORMAT(put_time,'%Y-%m-%D') >= #{putTime1}
|
||||
</if>
|
||||
<if test="putTime2 != null" >
|
||||
and DATE_FORMAT(put_time,'%Y-%m-%D') <= #{putTime2}
|
||||
</if>
|
||||
<if test="issueTime1 != null" >
|
||||
and DATE_FORMAT(issue_time,'%Y-%m-%D') >= #{issueTime1}
|
||||
</if>
|
||||
<if test="issueTime2 != null" >
|
||||
-- and to_char(issue_time,'YYYY-MM-DD') <= #{issueTime2}
|
||||
and DATE_FORMAT(issue_time,'%Y-%m-%D') <= #{issueTime2}
|
||||
</if>
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null" >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 游离态标准查询 -->
|
||||
<if test="menuId != null and menuId =='nomenu'" >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID = (select SAR_MENU.id from SAR_MENU WHERE parent_id is null and sor_divide ='BUSINESS_STAND' and valid_flag=0)
|
||||
</if>
|
||||
<!-- 当第一次进入页面未选择记录时-->
|
||||
<if test="(menuId == null or menuId =='') and menuRoleList == null" >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in ( SELECT SAR_MENU.id FROM SAR_MENU START WITH id =(
|
||||
SELECT SAR_MENU.id FROM SAR_MENU WHERE parent_id IS NULL AND sor_divide = 'BUSINESS_STAND' and valid_flag=0 ) CONNECT BY PRIOR id = parent_id )
|
||||
</if>
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="collectMenuId != null">
|
||||
and SAR_BUSSIONESS_STAND.id in (
|
||||
select COLLECT_RES_ID from TS_PERSON_COLLECT where TS_PERSON_COLLECT.VALID_FLAG=0
|
||||
and collect_type='BUSINESS_STAND'
|
||||
and TS_PERSON_COLLECT.user_id=#{userId}
|
||||
)
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and SAR_BUSSIONESS_STAND.valid_flag = #{validFlag}
|
||||
</if>
|
||||
<!-- 导出数据过程中,选择的id -->
|
||||
<if test="idlist != null" >
|
||||
and SAR_BUSSIONESS_STAND.id in
|
||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="standSort != null" >
|
||||
and SAR_BUSSIONESS_STAND.stand_sort = #{standSort}
|
||||
</if>
|
||||
<if test="replaceStandNum != null" >
|
||||
and replace_stand_num like concat(concat('%',#{replaceStandNum}),'%')
|
||||
</if>
|
||||
<if test="standStatus != null" >
|
||||
and SAR_BUSSIONESS_STAND.STAND_STATUS = #{standStatus}
|
||||
</if>
|
||||
<if test="advanceSearchStr != null">
|
||||
and (${advanceSearchStr})
|
||||
</if>
|
||||
<if test="zqcrId != null">
|
||||
and (SELECT ZYQCR
|
||||
FROM SAR_BUSS_STAND_ATTR_INFO
|
||||
WHERE valid_flag = 0
|
||||
and stand_id = SAR_BUSSIONESS_STAND.id) = #{zqcrId}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 根据角色分页查询条件 -->
|
||||
<sql id="SarBussionInfoRole_Where_Clause">
|
||||
left join TS_DICTYPE dicstandStatus ON ( dicstandStatus.dic_type_code = SAR_BUSSIONESS_STAND.STAND_STATUS AND dicstandStatus.dic_id IS NOT NULL and dicstandStatus.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandNature ON ( dicstandNature.dic_type_code = SAR_BUSSIONESS_STAND.STAND_NATURE AND dicstandNature.dic_id IS NOT NULL and dicstandNature.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandSort ON ( dicstandSort.dic_type_code = SAR_BUSSIONESS_STAND.STAND_SORT AND dicstandSort.dic_id IS NOT NULL and dicstandSort.valid_flag = 0)
|
||||
left join TS_DICTYPE dicapplyCountry ON ( dicapplyCountry.dic_type_code = SAR_BUSSIONESS_STAND.APPLY_COUNTRY AND dicapplyCountry.dic_id IS NOT NULL and dicapplyCountry.valid_flag = 0)
|
||||
left join SAR_BUSS_STAND_MENU ON SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
left join SAR_MENU on SAR_BUSS_STAND_MENU.menu_id = SAR_MENU.id
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<!-- 基本搜索项 -->
|
||||
<if test="standCode != null" >
|
||||
and stand_code like concat(concat('%',#{standCode}),'%')
|
||||
</if>
|
||||
<if test="standName != null" >
|
||||
and stand_name like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<!-- 高级搜索项 -->
|
||||
<if test="putTime1 != null" >
|
||||
-- and to_char(put_time,'YYYY-MM-DD') >= #{putTime1}
|
||||
and DATE_FORMAT(put_time,'%Y-%m-%D') >= #{putTime1}
|
||||
</if>
|
||||
<if test="putTime2 != null" >
|
||||
-- and to_char(put_time,'YYYY-MM-DD') <= #{putTime2}
|
||||
and DATE_FORMAT(put_time,'%Y-%m-%D') <= #{putTime2}
|
||||
</if>
|
||||
<if test="issueTime1 != null" >
|
||||
-- and to_char(issue_time,'YYYY-MM-DD') >= #{issueTime1}
|
||||
and DATE_FORMAT(issue_time,'%Y-%m-%D') >= #{issueTime1}
|
||||
</if>
|
||||
<if test="issueTime2 != null" >
|
||||
and DATE_FORMAT(issue_time,'%Y-%m-%D') <= #{issueTime2}
|
||||
</if>
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu'" >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in (
|
||||
select a.* from (
|
||||
select SAR_MENU.id from SAR_MENU,TS_ROLE_SAR_MENU start with id=#{menuId} connect by prior id= parent_id
|
||||
)a,TS_ROLE_SAR_MENU
|
||||
where a.id = TS_ROLE_SAR_MENU.SAR_MENU_ID and TS_ROLE_SAR_MENU.ROLE_ID in
|
||||
<foreach collection="roleIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
GROUP BY ID
|
||||
)
|
||||
</if>
|
||||
<!-- 游离态标准查询 -->
|
||||
<if test="menuId != null and menuId =='nomenu'" >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID = (select SAR_MENU.id from SAR_MENU WHERE parent_id is null and sor_divide ='BUSINESS_STAND' and valid_flag=0)
|
||||
</if>
|
||||
<!-- 当第一次进入页面未选择记录时-->
|
||||
<if test="menuId == null or menuId ==''" >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in (
|
||||
select a.* from (
|
||||
SELECT SAR_MENU.id FROM SAR_MENU START WITH id =(
|
||||
SELECT SAR_MENU.id FROM SAR_MENU WHERE parent_id IS NULL AND sor_divide = 'BUSINESS_STAND' and valid_flag=0) connect by prior id= parent_id
|
||||
)a,TS_ROLE_SAR_MENU
|
||||
where a.id = TS_ROLE_SAR_MENU.SAR_MENU_ID and TS_ROLE_SAR_MENU.ROLE_ID in
|
||||
<foreach collection="roleIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
GROUP BY ID
|
||||
)
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and SAR_BUSSIONESS_STAND.valid_flag = #{validFlag}
|
||||
</if>
|
||||
<!-- 导出数据过程中,选择的id -->
|
||||
<if test="idlist != null" >
|
||||
and SAR_BUSSIONESS_STAND.id in
|
||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="standSort != null" >
|
||||
and SAR_BUSSIONESS_STAND.stand_sort = #{standSort}
|
||||
</if>
|
||||
<if test="replaceStandNum != null" >
|
||||
and replace_stand_num like concat(concat('%',#{replaceStandNum}),'%')
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 企标复审使用-->
|
||||
<sql id="SarBussionInfoRole_Where_Clause_Qbfs">
|
||||
left join TS_DICTYPE dicstandStatus ON ( dicstandStatus.dic_type_code = SAR_BUSSIONESS_STAND.STAND_STATUS AND dicstandStatus.dic_id IS NOT NULL and dicstandStatus.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandNature ON ( dicstandNature.dic_type_code = SAR_BUSSIONESS_STAND.STAND_NATURE AND dicstandNature.dic_id IS NOT NULL and dicstandNature.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandSort ON ( dicstandSort.dic_type_code = SAR_BUSSIONESS_STAND.STAND_SORT AND dicstandSort.dic_id IS NOT NULL and dicstandSort.valid_flag = 0)
|
||||
left join TS_DICTYPE dicapplyCountry ON ( dicapplyCountry.dic_type_code = SAR_BUSSIONESS_STAND.APPLY_COUNTRY AND dicapplyCountry.dic_id IS NOT NULL and dicapplyCountry.valid_flag = 0)
|
||||
left join SAR_BUSS_STAND_MENU ON SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
left join SAR_MENU on SAR_BUSS_STAND_MENU.menu_id = SAR_MENU.id
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<!-- 基本搜索项 -->
|
||||
<if test="standCode != null" >
|
||||
and stand_code like concat(concat('%',#{standCode}),'%')
|
||||
</if>
|
||||
<if test="standName != null" >
|
||||
and stand_name like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and SAR_BUSSIONESS_STAND.valid_flag = #{validFlag}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
<!-- 分页查询条件当页数据 -->
|
||||
<select id="getBussionessStandInfoPage" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select * from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List_show" />,
|
||||
(case WHEN dicstandStatus.DIC_TYPE_NAME = '已发布' THEN 1
|
||||
WHEN dicstandStatus.DIC_TYPE_NAME = '计划修订' THEN 2
|
||||
WHEN dicstandStatus.DIC_TYPE_NAME = '修订中' THEN 3
|
||||
WHEN dicstandStatus.DIC_TYPE_NAME = '已修订' THEN 4
|
||||
WHEN dicstandStatus.DIC_TYPE_NAME = '被替代' THEN 5
|
||||
WHEN dicstandStatus.DIC_TYPE_NAME = '废止' THEN 6
|
||||
WHEN dicstandStatus.DIC_TYPE_NAME IS NULL THEN 7 END) AS paixu
|
||||
from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfo_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_show"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
<if test="sql != null and sql != ''" >
|
||||
ORDER BY ${sql}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<!-- 企标复审使用-->
|
||||
<select id="getBussionessStandInfoQbfs" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select <include refid="Base_Column_List_show" />
|
||||
from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Qbfs"/>
|
||||
GROUP BY <include refid="Group_Column_List_show"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getBussionessStandInfoPageByRole" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select * from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List_show" />
|
||||
from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfoRole_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_show"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
<!-- 分页查询条件查询一共有多少条数据,配合分页 -->
|
||||
<select id="getBussionessStandInfoCount" resultType="java.lang.Integer" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select count(1) from (select count(*) from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfo_Where_Clause"/>
|
||||
GROUP BY SAR_BUSSIONESS_STAND.id) a
|
||||
</select>
|
||||
|
||||
<select id="getBussionessStandInfoCountByRole" resultType="java.lang.Integer" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select count(1) from (select count(*) from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfoRole_Where_Clause"/>
|
||||
GROUP BY SAR_BUSSIONESS_STAND.id)
|
||||
</select>
|
||||
|
||||
<!-- 条件查询后,用于导出标准信息数据-->
|
||||
<select id="getSarBussionessStand" resultMap="BaseResultMapExcel" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select <include refid="Base_Column_List_show" />
|
||||
from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfo_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_show"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--liwenxuan:标准法规更新数量及清单:企业标准-->
|
||||
<select id="selectBussionessStandardsCount" resultType="java.lang.Integer" parameterType="Date">
|
||||
SELECT count(1)
|
||||
FROM SAR_BUSSIONESS_STAND
|
||||
WHERE MODIFY_TIME > #{visitTime} And Valid_flag = 0
|
||||
</select>
|
||||
<!--liwenxuan:标准法规更新数量及清单:企业标准All-->
|
||||
<select id="selectBussionessStandardsCountAll" resultType="java.lang.Integer" >
|
||||
SELECT count(1)
|
||||
FROM SAR_BUSSIONESS_STAND
|
||||
WHERE Valid_flag = 0
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<!-- 根据id查询 SAR_BUSSIONESS_STAND 的详细信息-->
|
||||
<select id="selectStandardsInfoByKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List_show" />
|
||||
from SAR_BUSSIONESS_STAND
|
||||
left join TS_DICTYPE dicstandStatus ON ( dicstandStatus.dic_type_code = SAR_BUSSIONESS_STAND.STAND_STATUS AND dicstandStatus.dic_id IS NOT NULL and dicstandStatus.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandNature ON ( dicstandNature.dic_type_code = SAR_BUSSIONESS_STAND.STAND_NATURE AND dicstandNature.dic_id IS NOT NULL and dicstandNature.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandSort ON ( dicstandSort.dic_type_code = SAR_BUSSIONESS_STAND.STAND_SORT AND dicstandSort.dic_id IS NOT NULL and dicstandSort.valid_flag = 0)
|
||||
left join TS_DICTYPE dicapplyCountry ON ( dicapplyCountry.dic_type_code = SAR_BUSSIONESS_STAND.APPLY_COUNTRY AND dicapplyCountry.dic_id IS NOT NULL and dicapplyCountry.valid_flag = 0)
|
||||
left join SAR_BUSS_STAND_MENU ON SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
left join SAR_MENU on SAR_BUSS_STAND_MENU.menu_id = SAR_MENU.id
|
||||
where SAR_BUSSIONESS_STAND.id = #{id}
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectSarBussionesDownloadFileInfo" resultType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand" parameterType="string">
|
||||
SELECT SAR_BUSS_STAND_RES.stand_file_classify as standFileClassify,SAR_BUSS_STAND_FILE.att_id as attId FROM "SAR_BUSSIONESS_STAND"
|
||||
left join "SAR_BUSS_STAND_RES" on (SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_RES.stand_id)
|
||||
left join "SAR_BUSS_STAND_FILE" on (SAR_BUSS_STAND_RES.id = SAR_BUSS_STAND_FILE.res_id)
|
||||
where SAR_BUSSIONESS_STAND.id =#{id} and SAR_BUSS_STAND_FILE.use_module = 'SOURCE_FILE'
|
||||
</select>
|
||||
|
||||
<!-- gaoyan 验证代替标准号是否存在 -->
|
||||
<select id="selectStandardsByStandnumber" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
SAR_BUSSIONESS_STAND
|
||||
where SAR_BUSSIONESS_STAND.valid_flag = 0
|
||||
<if test="standCode != null">
|
||||
and SAR_BUSSIONESS_STAND.stand_code=#{standCode}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectStandByStandNumber" resultType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand" parameterType="java.util.Map">
|
||||
select id from SAR_BUSSIONESS_STAND where stand_code = #{standCode}
|
||||
</select>
|
||||
|
||||
<!-- gaoyan 搜索中心页面查询为我推荐 -->
|
||||
<select id="selectRecommendStand" resultType="com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select tmp_tb.* from
|
||||
(select
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) as numberShow,
|
||||
SAR_BUSSIONESS_STAND.stand_name as nameShow,
|
||||
SAR_BUSSIONESS_STAND.id,
|
||||
'BUSINESS_STAND' as typeShow
|
||||
from SAR_BUSSIONESS_STAND
|
||||
left join TS_DICTYPE dicstandSort ON ( dicstandSort.dic_type_code = SAR_BUSSIONESS_STAND.STAND_SORT AND dicstandSort.dic_id IS NOT NULL and dicstandSort.valid_flag = 0)
|
||||
where SAR_BUSSIONESS_STAND.valid_flag = '0' and ( 1=1
|
||||
<if test="standSort != null" >
|
||||
and STAND_SORT = #{standSort}
|
||||
</if>
|
||||
<if test="standCode != null" >
|
||||
or stand_code like concat(concat('%',#{standCode}),'%')
|
||||
</if>
|
||||
<if test="standYear != null" >
|
||||
or stand_year like concat(concat('%',#{standYear}),'%')
|
||||
</if>
|
||||
<if test="standName != null" >
|
||||
or stand_name like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<!-- 适用车型 多选需要修改-->
|
||||
<!--<if test="applyArcticList != null">
|
||||
or REGEXP_LIKE(apply_arctic,
|
||||
<foreach collection="applyArcticList" index="index" item="item" open="'(" separator="|" close=")'">
|
||||
${item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="energyKindList != null" >
|
||||
or
|
||||
REGEXP_LIKE(energy_kind,
|
||||
<foreach collection="energyKindList" index="index" item="item" open="'(" separator="|" close=")'">
|
||||
${item}
|
||||
</foreach>
|
||||
)
|
||||
</if>-->
|
||||
)
|
||||
order by SAR_BUSSIONESS_STAND.modify_time desc
|
||||
) tmp_tb limit 0,5
|
||||
</select>
|
||||
|
||||
<!-- gaoyan 查找相近标准 -->
|
||||
<select id="selectCloseStand" resultType="com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select tmp_tb.* from
|
||||
(select
|
||||
stand_code as numberShow,
|
||||
SAR_BUSSIONESS_STAND.stand_name as nameShow,
|
||||
SAR_BUSSIONESS_STAND.id,
|
||||
'BUSINESS_STAND' as typeShow
|
||||
from SAR_BUSSIONESS_STAND
|
||||
left join TS_DICTYPE dicstandSort ON ( dicstandSort.dic_type_code = SAR_BUSSIONESS_STAND.STAND_SORT AND dicstandSort.dic_id IS NOT NULL and dicstandSort.valid_flag = 0)
|
||||
where SAR_BUSSIONESS_STAND.valid_flag = '0' and (
|
||||
<if test="standName != null" >
|
||||
or stand_name like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
)
|
||||
<if test="id != null" >
|
||||
and SAR_BUSSIONESS_STAND.id != #{id}
|
||||
</if>
|
||||
order by SAR_BUSSIONESS_STAND.modify_time desc
|
||||
) tmp_tb limit 0,5
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryByPutTimeList" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand">
|
||||
select <include refid="Base_Column_List"/> from SAR_BUSSIONESS_STAND
|
||||
where 1=1
|
||||
<if test="putTime != null" >
|
||||
and put_time <= #{putTime}
|
||||
</if>
|
||||
<if test="standStatus != null" >
|
||||
and stand_status = #{standStatus}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateByStandNum" parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand" >
|
||||
update SAR_BUSSIONESS_STAND
|
||||
<set >
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="replacedStandNum != null" >
|
||||
replaced_stand_num = #{replacedStandNum},
|
||||
</if>
|
||||
<if test="replaceStandNum != null" >
|
||||
replace_stand_num = #{replaceStandNum},
|
||||
</if>
|
||||
<if test="putTime != null" >
|
||||
put_time = #{putTime},
|
||||
</if>
|
||||
<if test="issueTime != null" >
|
||||
issue_time = #{issueTime},
|
||||
</if>
|
||||
<if test="standEnName != null" >
|
||||
stand_en_name = #{standEnName},
|
||||
</if>
|
||||
<if test="standName != null" >
|
||||
stand_name = #{standName},
|
||||
</if>
|
||||
</set>
|
||||
where STAND_CODE = #{standCode}
|
||||
</update>
|
||||
|
||||
<update id="updateRelacedNumByNumber" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
update SAR_BUSSIONESS_STAND set REPLACED_STAND_NUM = #{replacedStandNum} where
|
||||
STAND_CODE in
|
||||
<foreach collection="replaceStandNumList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateRelaceNumByNumber" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
update SAR_BUSSIONESS_STAND set REPLACE_STAND_NUM = #{replaceStandNum} where
|
||||
STAND_CODE in
|
||||
<foreach collection="replacedStandNumList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectBussStandByIdAndRole" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select SAR_BUSSIONESS_STAND.id
|
||||
from
|
||||
SAR_BUSSIONESS_STAND
|
||||
left join SAR_BUSS_STAND_MENU on SAR_BUSSIONESS_STAND.id=SAR_BUSS_STAND_MENU.BUSS_STAND_ID
|
||||
where SAR_BUSSIONESS_STAND.valid_flag = 0
|
||||
and SAR_BUSS_STAND_MENU.valid_flag = 0
|
||||
<if test="id != null">
|
||||
and SAR_BUSSIONESS_STAND.id = #{id}
|
||||
</if>
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateReplacedNumById" parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand">
|
||||
update SAR_BUSSIONESS_STAND set REPLACED_STAND_NUM = #{replacedStandNum} where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectStandColumn" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'SAR_BUSSIONESS_STAND' AND column_name = #{columnName}
|
||||
</select>
|
||||
<select id="standRemindInfo" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand">
|
||||
select
|
||||
*
|
||||
from
|
||||
(
|
||||
select
|
||||
*
|
||||
from
|
||||
SAR_BUSSIONESS_STAND
|
||||
where VALID_FLAG = 0
|
||||
and
|
||||
(select count(0) from SAR_BUSSIONESS_STAND_STATE where SAR_BUSSIONESS_STAND_STATE.ID = SAR_BUSSIONESS_STAND.ID) = 0
|
||||
and date_format(ISSUE_TIME,'%Y-%m-%d') = date_format(DATE_SUB(curdate(), INTERVAL 35 MONTH),'%Y-%m-%d')
|
||||
union
|
||||
select
|
||||
sbs.*
|
||||
from
|
||||
SAR_BUSSIONESS_STAND sbs
|
||||
right join SAR_BUSSIONESS_STAND_STATE sbss on sbs.ID = sbss.ID
|
||||
where sbs.VALID_FLAG = 0
|
||||
and date_format(sbss.REVIEW_TIME,'%Y-%m-%d') = date_format(DATE_SUB(curdate(), INTERVAL 35 MONTH),'%Y-%m-%d')) as aa
|
||||
<where>
|
||||
1=1
|
||||
<if test="standCode != null and standCode !=''">
|
||||
and STAND_CODE = #{standCode}
|
||||
</if>
|
||||
<if test="standName != null and standName !=''">
|
||||
and STAND_NAME = #{standName}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="selectIsExit" resultType="java.lang.Integer">
|
||||
select count(*) from SAR_LAWS_INFO where id = #{id} and valid_flag != 0
|
||||
</select>
|
||||
|
||||
<insert id="insertPerson">
|
||||
insert into SAR_BUSSIONESS_PERSON(ID,QBID,USID) VALUE
|
||||
<foreach collection ="list" item="Person" separator =",">
|
||||
(#{Person.id}, #{Person.qbid}, #{Person.usid})
|
||||
</foreach >
|
||||
</insert>
|
||||
|
||||
<insert id="deletePerson" parameterType="java.lang.String">
|
||||
DELETE FROM SAR_BUSSIONESS_PERSON
|
||||
where qbid=#{qbid}
|
||||
</insert>
|
||||
|
||||
<select id="selectPerson" parameterType="java.lang.String" resultType="java.lang.String">
|
||||
select usid from SAR_BUSSIONESS_PERSON where QBID=#{qbid}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,4 +1,260 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.sarResource.dao.TsResourceDao">
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarResource.entity.TsResource" >
|
||||
<id column="id" property="id" />
|
||||
<result column="parent_id" property="parentId" />
|
||||
<result column="menu_name" property="menuName" />
|
||||
<result column="sor_divide" property="sorDivide" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="display_seq" property="displaySeq" />
|
||||
<result column="parent_ids" property="parentIds" />
|
||||
<result column="remarks" property="remarks" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_MENU table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
parent_id, menu_name, sor_divide, id, modify_time, creation_time, valid_flag, display_seq, parent_ids, remarks
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="parentId != null" >
|
||||
and parent_id ${parentIdOperator} #{parentId}
|
||||
</if>
|
||||
<if test="menuName != null" >
|
||||
and menu_name ${menuNameOperator} #{menuName}
|
||||
</if>
|
||||
<if test="sorDivide != null" >
|
||||
and sor_divide ${sorDivideOperator} #{sorDivide}
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="displaySeq != null" >
|
||||
and display_seq ${displaySeqOperator} #{displaySeq}
|
||||
</if>
|
||||
<if test="parentIds != null" >
|
||||
and parent_ids ${parentIdsOperator} #{parentIds}
|
||||
</if>
|
||||
<if test="remarks != null" >
|
||||
and remarks = #{remarks}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.sarResource.entity.TsResource" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_MENU.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into TS_RESOURCE(<include refid="Base_Column_List" />)
|
||||
values (#{parentId, jdbcType=VARCHAR}, #{menuName, jdbcType=VARCHAR}, #{sorDivide, jdbcType=VARCHAR}, #{id, jdbcType=VARCHAR}, #{modifyTime, jdbcType=TIMESTAMP}, #{creationTime, jdbcType=TIMESTAMP}, #{validFlag, jdbcType=INTEGER}, #{displaySeq, jdbcType=INTEGER}, #{parentIds, jdbcType=VARCHAR},#{remarks, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarResource.entity.TsResource" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_MENU.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into TS_RESOURCE
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="parentId != null" >parent_id,</if>
|
||||
<if test="menuName != null" >menu_name,</if>
|
||||
<if test="sorDivide != null" >sor_divide,</if>
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="displaySeq != null" >display_seq,</if>
|
||||
<if test="parentIds != null" >parent_ids,</if>
|
||||
<if test="remarks != null" >remarks,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="parentId != null" >#{parentId, jdbcType=VARCHAR},</if>
|
||||
<if test="menuName != null" >#{menuName, jdbcType=VARCHAR},</if>
|
||||
<if test="sorDivide != null" >#{sorDivide, jdbcType=VARCHAR},</if>
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="displaySeq != null" >#{displaySeq, jdbcType=INTEGER},</if>
|
||||
<if test="parentIds != null" >#{parentIds, jdbcType=VARCHAR},</if>
|
||||
<if test="remarks != null" >#{remarks, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.sarResource.entity.TsResource" >
|
||||
update TS_RESOURCE
|
||||
set parent_id = #{parentId},
|
||||
menu_name = #{menuName},
|
||||
sor_divide = #{sorDivide},
|
||||
modify_time = #{modifyTime},
|
||||
creation_time = #{creationTime},
|
||||
valid_flag = #{validFlag},
|
||||
display_seq = #{displaySeq},
|
||||
parent_ids = #{parentIds}
|
||||
remarks = #{remarks}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.sarResource.entity.TsResource" >
|
||||
update TS_RESOURCE
|
||||
<set >
|
||||
<if test="parentId != null" >
|
||||
parent_id = #{parentId},
|
||||
</if>
|
||||
<if test="menuName != null" >
|
||||
menu_name = #{menuName},
|
||||
</if>
|
||||
<if test="sorDivide != null" >
|
||||
sor_divide = #{sorDivide},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="displaySeq != null" >
|
||||
display_seq = #{displaySeq},
|
||||
</if>
|
||||
<if test="parentIds != null" >
|
||||
parent_ids = #{parentIds},
|
||||
</if>
|
||||
<if test="remarks != null" >
|
||||
remarks = #{remarks},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_MENU -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from TS_RESOURCE
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from TS_RESOURCE
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_MENU 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from TS_RESOURCE
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_MENU列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from TS_RESOURCE
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from TS_RESOURCE
|
||||
<include refid="Base_Where_Clause"/> and valid_flag=0
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryMenuByPid" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarResource.entity.TsResource">
|
||||
select TS_RESOURCE.* from TS_RESOURCE
|
||||
where id in
|
||||
<foreach collection="childMenuIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="queryByPidExcpetSelf" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarResource.entity.TsResource">
|
||||
select TS_RESOURCE.* from TS_RESOURCE
|
||||
where valid_flag=0 and id != #{id}
|
||||
and id in
|
||||
<foreach collection="childMenuIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 根据目录类型查询最外一层节点 -->
|
||||
<select id="queryMenuByDis" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarResource.entity.TsResource">
|
||||
select <include refid="Base_Column_List"/> from TS_RESOURCE
|
||||
where valid_flag = 0
|
||||
and (parent_id is null or parent_id='1')
|
||||
<if test='sorDivide != null and sorDivide != "ALL_STAND"' >
|
||||
and sor_divide = #{sorDivide}
|
||||
</if>
|
||||
<if test='sorDivide != null and sorDivide == "ALL_STAND"' >
|
||||
and (sor_divide = 'INLAND_STAND' or sor_divide = 'FOREIGN_STAND')
|
||||
</if>
|
||||
order by display_seq asc
|
||||
</select>
|
||||
|
||||
<select id="selectMenuByRole" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarResource.entity.TsResource">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from TS_RESOURCE sm
|
||||
LEFT JOIN TS_ROLE_SAR_MENU trsm ON sm.ID = trsm.sar_menu_id
|
||||
where valid_flag = 0
|
||||
<if test='sorDivide != null and sorDivide != "ALL_STAND"' >
|
||||
and sor_divide = #{sorDivide}
|
||||
</if>
|
||||
<if test='sorDivide != null and sorDivide == "ALL_STAND"' >
|
||||
and (sor_divide = 'INLAND_STAND' or sor_divide = 'FOREIGN_STAND')
|
||||
</if>
|
||||
<if test="roleIds != null" >
|
||||
and trsm.ROLE_ID in
|
||||
<foreach collection="roleIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY parent_id, menu_name, sor_divide, id, modify_time, creation_time, valid_flag, display_seq, parent_ids, remarks
|
||||
order by display_seq asc,creation_time DESC
|
||||
</select>
|
||||
|
||||
<select id="queryParentMenuById" resultType="java.lang.String" parameterType="java.lang.String">
|
||||
select TS_RESOURCE.id
|
||||
from TS_RESOURCE where valid_flag=0 and parent_id is not null start with id=#{id} connect by prior parent_id=id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+9
@@ -2,4 +2,13 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao">
|
||||
|
||||
|
||||
<select id="queryProjectManagerPage" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">
|
||||
select s.product_line,t.UNAME as uName
|
||||
from sar_stand_project_library s
|
||||
INNER JOIN ts_user t
|
||||
ON s.project_manager=t.USID
|
||||
GROUP BY s.product_line
|
||||
limit #{current},#{pageSize}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+3
-3
@@ -52,7 +52,7 @@
|
||||
SAR_STANDARDS_INFO.stand_number, SAR_STANDARDS_INFO.stand_year, SAR_STANDARDS_INFO.stand_name, SAR_STANDARDS_INFO.stand_en_name,
|
||||
SAR_STANDARDS_INFO.stand_state, SAR_STANDARDS_INFO.stand_nature, SAR_STANDARDS_INFO.issue_time, SAR_STANDARDS_INFO.put_time,
|
||||
SAR_STANDARDS_INFO.synopsis, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
||||
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,SAR_STANDARDS_INFO.is_relate_access,SAR_STANDARDS_INFO.cite_stand,SAR_STANDARDS_INFO.cited_stand,SAR_STANDARDS_INFO.text_status
|
||||
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,SAR_STANDARDS_INFO.is_relate_access,SAR_STANDARDS_INFO.cite_stand,SAR_STANDARDS_INFO.cited_stand,SAR_STANDARDS_INFO.text_status,SAR_STANDARDS_INFO.STAND_SYSTEM
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List_Show" >
|
||||
@@ -61,7 +61,7 @@
|
||||
SAR_STANDARDS_INFO.stand_state, SAR_STANDARDS_INFO.stand_nature, SAR_STANDARDS_INFO.issue_time, SAR_STANDARDS_INFO.put_time,
|
||||
concat(SAR_STANDARDS_INFO.synopsis, '') as synopsis, concat(replace_stand_num, '') as replace_stand_num, replaced_stand_num, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
||||
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,dicountry.DIC_TYPE_NAME as countryShow, dicstandSort.DIC_TYPE_NAME as standSortShow,
|
||||
dicstandState.DIC_TYPE_NAME as standStateShow,dicstandNature.DIC_TYPE_NAME as standNatureShow,is_relate_access,cite_stand,cited_stand,SAR_STANDARDS_INFO.text_status
|
||||
dicstandState.DIC_TYPE_NAME as standStateShow,dicstandNature.DIC_TYPE_NAME as standNatureShow,is_relate_access,cite_stand,cited_stand,SAR_STANDARDS_INFO.text_status,SAR_STANDARDS_INFO.STAND_SYSTEM
|
||||
</sql>
|
||||
|
||||
<sql id="Group_Column_List_Show">
|
||||
@@ -70,7 +70,7 @@
|
||||
SAR_STANDARDS_INFO.stand_state, SAR_STANDARDS_INFO.stand_nature, SAR_STANDARDS_INFO.issue_time, SAR_STANDARDS_INFO.put_time,
|
||||
concat(SAR_STANDARDS_INFO.synopsis, ''), concat(replace_stand_num, ''), replaced_stand_num, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
||||
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,dicountry.DIC_TYPE_NAME, dicstandSort.DIC_TYPE_NAME,
|
||||
dicstandState.DIC_TYPE_NAME,dicstandNature.DIC_TYPE_NAME,is_relate_access,cite_stand,cited_stand,SAR_STANDARDS_INFO.text_status
|
||||
dicstandState.DIC_TYPE_NAME,dicstandNature.DIC_TYPE_NAME,is_relate_access,cite_stand,cited_stand,SAR_STANDARDS_INFO.text_status,SAR_STANDARDS_INFO.STAND_SYSTEM
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
|
||||
@@ -136,7 +136,8 @@ public class AttFileEOController {
|
||||
String fileOldName = fileNameEncoding(attFileEO.getOldFileName(),request);
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\""+ fileOldName +"\"");
|
||||
response.setContentType("application/octet-stream");
|
||||
is = iFileStore.loadFile(attFileEO.getFilePath()+attFileEO.getFileName());
|
||||
File file = new File(filePath+attFileEO.getFilePath()+attFileEO.getFileName());
|
||||
is = new FileInputStream(file);
|
||||
os = response.getOutputStream();
|
||||
IOUtils.copy(is, os);
|
||||
os.flush();
|
||||
@@ -232,7 +233,8 @@ public class AttFileEOController {
|
||||
String fileOldName = fileNameEncoding(attFileEO.getOldFileName(),request);
|
||||
response.setHeader("Content-Disposition", "attachment;filename=\""+fileOldName+"\"");
|
||||
response.setContentType("application/octet-stream");
|
||||
is = iFileStore.loadFile(attFileEO.getFilePath()+attFileEO.getFileName());
|
||||
File file = new File(filePath+attFileEO.getFilePath()+attFileEO.getFileName());
|
||||
is = new FileInputStream(file);
|
||||
os = response.getOutputStream();
|
||||
IOUtils.copy(is, os);
|
||||
os.flush();
|
||||
@@ -280,7 +282,8 @@ public class AttFileEOController {
|
||||
// WaterMarkUtil.waterMark(oldFilePath,waterFilePath,waterContent);
|
||||
response.setHeader("Content-Disposition", "attachment;filename=\""+fileOldName+"\"");
|
||||
response.setContentType("application/octet-stream");
|
||||
is = iFileStore.loadFile(attFileEO.getFilePath()+"waterPath/"+attFileEO.getOldFileName());
|
||||
File file = new File(filePath+attFileEO.getFilePath()+attFileEO.getFileName());
|
||||
is = new FileInputStream(file);
|
||||
os = response.getOutputStream();
|
||||
IOUtils.copy(is, os);
|
||||
os.flush();
|
||||
@@ -356,7 +359,8 @@ public class AttFileEOController {
|
||||
String fileOldName = fileNameEncoding(fileName,request);
|
||||
response.setHeader("Content-Disposition", "attachment; filename=" + fileOldName);
|
||||
response.setContentType("application/octet-stream");
|
||||
is = iFileStore.loadFile("/modal/"+fileName);
|
||||
File file = new File(filePath+"/modal/"+fileName);
|
||||
is = new FileInputStream(file);
|
||||
os = response.getOutputStream();
|
||||
IOUtils.copy(is, os);
|
||||
os.flush();
|
||||
|
||||
@@ -281,7 +281,7 @@ public class AttFileEOServiceImpl extends ServiceImpl<AttFileEODao, AttFileEO> i
|
||||
if(StringUtils.isNotEmpty(idList[i])){
|
||||
attFileEO.setId(idList[i]);
|
||||
AttFileEO getFile = this.baseMapper.selectFileInfoById(attFileEO);
|
||||
if(attFileEO != null){
|
||||
if(attFileEO != null && getFile != null){
|
||||
fileObj.add(getFile);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-7
@@ -1,19 +1,17 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.controller;
|
||||
package com.adc.da.sys.sarMenuStandard.controller;
|
||||
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||
import com.adc.da.slrs.sarMenu.service.ISarMenuService;
|
||||
import com.adc.da.slrs.sarMenuStandard.service.ISarMenuStandardService;
|
||||
import com.adc.da.sys.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.adc.da.sys.sarMenuStandard.service.ISarMenuStandardService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandard;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.dao;
|
||||
package com.adc.da.sys.sarMenuStandard.dao;
|
||||
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.adc.da.sys.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
+6
-8
@@ -1,15 +1,11 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.entity;
|
||||
package com.adc.da.sys.sarMenuStandard.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.utils.treetool.annotation.TreeNodeName;
|
||||
import com.adc.da.utils.treetool.annotation.TreeNodeParentId;
|
||||
import com.adc.da.sys.utils.treetool.annotation.TreeNodeName;
|
||||
import com.adc.da.sys.utils.treetool.annotation.TreeNodeParentId;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
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 com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -18,6 +14,8 @@ import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
+5
-2
@@ -1,7 +1,7 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.service;
|
||||
package com.adc.da.sys.sarMenuStandard.service;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.adc.da.sys.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
@@ -48,4 +48,7 @@ public interface ISarMenuStandardService extends IService<SarMenuStandard> {
|
||||
* @return List<Menu>
|
||||
*/
|
||||
List<SarMenuStandard> getMenuByIds(List<String> menuIds);
|
||||
|
||||
SarMenuStandard selectMenuById(String id);
|
||||
|
||||
}
|
||||
+9
-5
@@ -1,11 +1,10 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.service.impl;
|
||||
package com.adc.da.sys.sarMenuStandard.service.impl;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.adc.da.slrs.sarMenuStandard.dao.SarMenuStandardDao;
|
||||
import com.adc.da.slrs.sarMenuStandard.service.ISarMenuStandardService;
|
||||
import com.adc.da.sys.sarMenuStandard.dao.SarMenuStandardDao;
|
||||
import com.adc.da.sys.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.adc.da.sys.sarMenuStandard.service.ISarMenuStandardService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -30,6 +29,11 @@ public class SarMenuStandardServiceImpl extends ServiceImpl<SarMenuStandardDao,
|
||||
@Autowired
|
||||
private SarMenuStandardDao dao;
|
||||
|
||||
@Override
|
||||
public SarMenuStandard selectMenuById(String id){
|
||||
return dao.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有菜单
|
||||
*/
|
||||
@@ -1,11 +1,12 @@
|
||||
package com.adc.da.sys.service.impl;
|
||||
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.adc.da.sys.dao.DicEODao;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.entity.DictionaryEO;
|
||||
import com.adc.da.sys.page.DicTypeEOPage;
|
||||
import com.adc.da.sys.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.adc.da.sys.sarMenuStandard.service.ISarMenuStandardService;
|
||||
import com.adc.da.sys.service.IDicEOService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
@@ -33,6 +34,9 @@ public class DicTypeEOServiceImpl extends ServiceImpl<DicTypeEODao,DicTypeEO> im
|
||||
@Autowired
|
||||
private IDicEOService dicEODao;
|
||||
|
||||
@Autowired
|
||||
private ISarMenuStandardService iSarMenuStandardService;
|
||||
|
||||
|
||||
|
||||
public DicTypeEODao getDao() {
|
||||
@@ -168,8 +172,13 @@ public class DicTypeEOServiceImpl extends ServiceImpl<DicTypeEODao,DicTypeEO> im
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
List<DictionaryEO> diclist = dicEODao.getDictionaryEO();
|
||||
for (DictionaryEO dictionaryEO : diclist){
|
||||
List<Map<String,String >> relist = getDicTypeByDicCode(dictionaryEO.getDictionaryCode());
|
||||
resultMap.put(dictionaryEO.getDictionaryCode(),relist);
|
||||
if(dictionaryEO.getDictionType().equals("TREE")){
|
||||
List<SarMenuStandard> treeList = iSarMenuStandardService.getAll(dictionaryEO.getId());
|
||||
resultMap.put(dictionaryEO.getDictionaryCode(),treeList);
|
||||
}else {
|
||||
List<Map<String,String >> relist = getDicTypeByDicCode(dictionaryEO.getDictionaryCode());
|
||||
resultMap.put(dictionaryEO.getDictionaryCode(),relist);
|
||||
}
|
||||
}
|
||||
// 查询细类
|
||||
List<Map<String,String >> relist = getDicTypeByDicCode("BUSSFINECLASSSHOW");
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.adc.da.sys.utils.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 操作树的接口类
|
||||
*
|
||||
*/
|
||||
public interface ITree {
|
||||
/**
|
||||
* 获取构建数的list,因为根节点可能不止一个,所有返回List
|
||||
* 获取的结构与getRoot基本一致,但是后边增加了另外的数据,不建议调用
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<TreeNode> getTree();
|
||||
|
||||
/**
|
||||
* 获取根节点树结构,因为根节点可能不止一个,所有返回List
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<TreeNode> getRoot();
|
||||
|
||||
/**
|
||||
* 获取指定节点数据
|
||||
*
|
||||
* @param nodeId
|
||||
* @return
|
||||
*/
|
||||
TreeNode getTreeNode(String nodeId);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.adc.da.sys.utils.tree;
|
||||
|
||||
/**
|
||||
* 需要实现树的实体类需要实现的接口,获取关键数据
|
||||
*
|
||||
*/
|
||||
public interface ITreeNode<T> {
|
||||
/**
|
||||
* TreeNode获取nodeId
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getNodeId();
|
||||
|
||||
/**
|
||||
* TreeNode获取nodeName
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getNodeName();
|
||||
|
||||
/**
|
||||
* TreeNode获取nodeParentId(父id)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getNodeParentId();
|
||||
|
||||
/**
|
||||
* TreeNode获取orderNum(排序字段用于排序)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Integer getOrderNum();
|
||||
|
||||
/**
|
||||
* TreeNode获取nodeLevel(当前属于第几层级)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Integer getNodeLevel();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.adc.da.sys.utils.tree;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 构建树形建构
|
||||
*/
|
||||
public class Tree implements ITree {
|
||||
/**
|
||||
* 用于存放treeNode的Map
|
||||
*/
|
||||
private LinkedHashMap<String, TreeNode> treeNodesMap = new LinkedHashMap<>();
|
||||
/**
|
||||
* 用于存放treeNode的list
|
||||
*/
|
||||
private List<TreeNode> treeNodesList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
public Tree(List<ITreeNode> list) {
|
||||
initTreeNodeMap(list);
|
||||
initTreeNodeList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 将List对象数据转为TreeNodeMap
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
private void initTreeNodeMap(List<ITreeNode> list) {
|
||||
TreeNode treeNode;
|
||||
for (ITreeNode item : list) {
|
||||
treeNode = new TreeNode(item);
|
||||
treeNode.setLastNodeNum(1);
|
||||
treeNodesMap.put(treeNode.getNodeId(), treeNode);
|
||||
}
|
||||
Iterator<TreeNode> iterator = treeNodesMap.values().iterator();
|
||||
TreeNode parentTreeNode;
|
||||
while (iterator.hasNext()) {
|
||||
treeNode = iterator.next();
|
||||
if (StringUtils.isEmpty(treeNode.getParentNodeId())) {
|
||||
continue;
|
||||
}
|
||||
parentTreeNode = treeNodesMap.get(treeNode.getParentNodeId());
|
||||
if (parentTreeNode != null) {
|
||||
treeNode.setParent(parentTreeNode);
|
||||
parentTreeNode.addChild(treeNode);
|
||||
// 按照orderNum排序
|
||||
Collections.sort(parentTreeNode.getChildren(), new OrdNamComparator());
|
||||
// 判断这个节点是否是最子节点
|
||||
if (treeNode.getChildren().size() == 0) {
|
||||
treeNode.setLastNode(true);
|
||||
}
|
||||
// 计算每一个节点的最子节点的数量
|
||||
List<TreeNode> children = parentTreeNode.getChildren();
|
||||
if (children.size() > 0) {
|
||||
int sum = 0;
|
||||
for (TreeNode treeNode2 : children) {
|
||||
sum += treeNode2.getLastNodeNum();
|
||||
}
|
||||
parentTreeNode.setLastNodeNum(sum);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据treeNodesMap转为treeNodesList
|
||||
*/
|
||||
private void initTreeNodeList() {
|
||||
if (treeNodesList.size() > 0) {
|
||||
return;
|
||||
}
|
||||
if (treeNodesMap.size() == 0) {
|
||||
return;
|
||||
}
|
||||
Iterator<TreeNode> iterator = treeNodesMap.values().iterator();
|
||||
TreeNode treeNode;
|
||||
while (iterator.hasNext()) {
|
||||
treeNode = iterator.next();
|
||||
if (treeNode.getParent() == null) {
|
||||
this.treeNodesList.add(treeNode);
|
||||
this.treeNodesList.addAll(treeNode.getAllChildren());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreeNode> getTree() {
|
||||
return this.treeNodesList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreeNode> getRoot() {
|
||||
List<TreeNode> rootList = new ArrayList<>();
|
||||
if (this.treeNodesList.size() > 0) {
|
||||
for (TreeNode node : treeNodesList) {
|
||||
if (node.getParent() == null) {
|
||||
rootList.add(node);
|
||||
Collections.sort(rootList, new OrdNamComparator());
|
||||
}
|
||||
}
|
||||
}
|
||||
return rootList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TreeNode getTreeNode(String nodeId) {
|
||||
return this.treeNodesMap.get(nodeId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义排序,按照orderNum排序
|
||||
*/
|
||||
class OrdNamComparator implements Comparator<TreeNode> {
|
||||
@Override
|
||||
public int compare(TreeNode t1, TreeNode t2) {
|
||||
if (t1.getOrderNum() > t2.getOrderNum()) {
|
||||
return 1;
|
||||
}
|
||||
if (t1.getOrderNum() < t2.getOrderNum()) {
|
||||
return -1;
|
||||
}
|
||||
return t1.getNodeName().compareTo(t2.getNodeName());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
package com.adc.da.sys.utils.tree;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TreeNode {
|
||||
|
||||
/**
|
||||
* 树节点ID
|
||||
*/
|
||||
@JSONField(ordinal = 1)
|
||||
private String nodeId;
|
||||
/**
|
||||
* 树节点名称
|
||||
*/
|
||||
@JSONField(ordinal = 2)
|
||||
private String nodeName;
|
||||
/**
|
||||
* 父节点ID
|
||||
*/
|
||||
@JSONField(ordinal = 3)
|
||||
private String parentNodeId;
|
||||
/**
|
||||
* 节点在树中的排序号
|
||||
*/
|
||||
@JSONField(ordinal = 4)
|
||||
private int orderNum;
|
||||
/**
|
||||
* 节点所在的层级
|
||||
*/
|
||||
@JSONField(ordinal = 5)
|
||||
private int level;
|
||||
/**
|
||||
* 最子节点的数量
|
||||
*/
|
||||
@JSONField(ordinal = 6)
|
||||
private int lastNodeNum;
|
||||
|
||||
/**
|
||||
* 是否是最子节点
|
||||
*/
|
||||
@JSONField(ordinal = 7)
|
||||
private boolean lastNode;
|
||||
|
||||
/**
|
||||
* 当前节点的儿子节点
|
||||
*/
|
||||
@JSONField(ordinal = 8)
|
||||
private List<TreeNode> children = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 当前节点的完整路径
|
||||
*/
|
||||
@JSONField(ordinal = 9)
|
||||
private String completeName;
|
||||
|
||||
/**
|
||||
* 当前节点的父级节点
|
||||
* 转json的时候忽略此属性,因为此属性到前端无作用
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
private TreeNode parent;
|
||||
|
||||
/**
|
||||
* 当前节点的子孙节点
|
||||
* 转json的时候忽略此属性,因为此属性到前端无作用
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
private List<TreeNode> allChildren = new ArrayList<>();
|
||||
|
||||
public TreeNode(ITreeNode obj) {
|
||||
this.nodeId = obj.getNodeId();
|
||||
this.nodeName = obj.getNodeName();
|
||||
this.parentNodeId = obj.getNodeParentId();
|
||||
this.orderNum = obj.getOrderNum();
|
||||
this.level = obj.getNodeLevel();
|
||||
}
|
||||
|
||||
public TreeNode(TreeNode obj) {
|
||||
this.orderNum = obj.getOrderNum();
|
||||
this.level = obj.getLevel();
|
||||
this.lastNodeNum = obj.getLastNodeNum();
|
||||
}
|
||||
|
||||
public TreeNode() {
|
||||
}
|
||||
|
||||
public void addChild(TreeNode treeNode) {
|
||||
this.children.add(treeNode);
|
||||
}
|
||||
|
||||
public void removeChild(TreeNode treeNode) {
|
||||
this.children.remove(treeNode);
|
||||
}
|
||||
|
||||
public String getNodeId() {
|
||||
return nodeId;
|
||||
}
|
||||
|
||||
public void setNodeId(String nodeId) {
|
||||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public String getNodeName() {
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName) {
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getParentNodeId() {
|
||||
return parentNodeId;
|
||||
}
|
||||
|
||||
public void setParentNodeId(String parentNodeId) {
|
||||
this.parentNodeId = parentNodeId;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public TreeNode getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(TreeNode parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public List<TreeNode> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<TreeNode> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public int getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(int orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public int getLastNodeNum() {
|
||||
return lastNodeNum;
|
||||
}
|
||||
|
||||
public void setLastNodeNum(int lastNodeNum) {
|
||||
this.lastNodeNum = lastNodeNum;
|
||||
}
|
||||
|
||||
public boolean isLastNode() {
|
||||
return lastNode;
|
||||
}
|
||||
|
||||
public void setLastNode(boolean lastNode) {
|
||||
this.lastNode = lastNode;
|
||||
}
|
||||
|
||||
public List<TreeNode> getAllChildren() {
|
||||
if (this.allChildren.isEmpty()) {
|
||||
for (TreeNode treeNode : this.children) {
|
||||
this.allChildren.add(treeNode);
|
||||
this.allChildren.addAll(treeNode.getAllChildren());
|
||||
}
|
||||
}
|
||||
return this.allChildren;
|
||||
}
|
||||
|
||||
public String getCompleteName() {
|
||||
return completeName;
|
||||
}
|
||||
|
||||
public void setCompleteName(String completeName) {
|
||||
this.completeName = completeName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.adc.da.sys.utils.treetool;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
* List 排序 Comparator
|
||||
* @author david
|
||||
*/
|
||||
public class OrdNamComparator implements Comparator<TreeNode> {
|
||||
|
||||
@Override
|
||||
public int compare(TreeNode t1, TreeNode t2) {
|
||||
if (t1.getOrderNum() > t2.getOrderNum()) {
|
||||
return 1;
|
||||
}
|
||||
if (t1.getOrderNum() < t2.getOrderNum()) {
|
||||
return -1;
|
||||
}
|
||||
return t1.getNodeName().compareTo(t2.getNodeName());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
package com.adc.da.sys.utils.treetool;
|
||||
|
||||
import com.adc.da.sys.utils.treetool.annotation.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
|
||||
//import group.ipp.tree.util.annotation.TreeNodeLevel;
|
||||
//import group.ipp.tree.util.annotation.TreeNodeName;
|
||||
//import group.ipp.tree.util.annotation.TreeNodeOrder;
|
||||
//import group.ipp.tree.util.annotation.TreeNodeParentId;
|
||||
|
||||
/**
|
||||
* 构建树形建构
|
||||
*
|
||||
* @author David
|
||||
*/
|
||||
public class Tree<T> {
|
||||
/**
|
||||
* 用于存放treeNode的Map
|
||||
*/
|
||||
private LinkedHashMap<String, TreeNode> treeNodesMap = new LinkedHashMap<>();
|
||||
/**
|
||||
* 用于存放treeNode的list
|
||||
*/
|
||||
private List<TreeNode> treeNodesList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
public Tree(List<T> list) {
|
||||
initTreeNodeMap(list);
|
||||
initTreeNodeList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 将List对象数据转为TreeNodeMap
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
private void initTreeNodeMap(List<T> list) {
|
||||
TreeNode treeNode;
|
||||
for (Object item : list) {
|
||||
treeNode = new TreeNode();
|
||||
treeNode.setNodeId(getFieldValue(item, "TreeNodeId"));
|
||||
treeNode.setNodeName(getFieldValue(item, "TreeNodeName"));
|
||||
treeNode.setParentNodeId(getFieldValue(item, "TreeNodeParentId"));
|
||||
if(StringUtils.isEmpty(getFieldValue(item, "TreeNodeLevel"))) {
|
||||
treeNode.setLevel(0);
|
||||
} else {
|
||||
treeNode.setLevel(Integer.parseInt(getFieldValue(item, "TreeNodeLevel")));
|
||||
}
|
||||
if(StringUtils.isEmpty(getFieldValue(item, "TreeNodeOrder"))) {
|
||||
treeNode.setOrderNum(0);
|
||||
} else {
|
||||
treeNode.setOrderNum(Integer.parseInt(getFieldValue(item, "TreeNodeOrder")));
|
||||
}
|
||||
treeNode.setLastNodeNum(1);
|
||||
treeNode.setData(item);
|
||||
treeNodesMap.put(treeNode.getNodeId(), treeNode);
|
||||
}
|
||||
Iterator<TreeNode> iterator = treeNodesMap.values().iterator();
|
||||
TreeNode parentTreeNode;
|
||||
while (iterator.hasNext()) {
|
||||
treeNode = iterator.next();
|
||||
if (StringUtils.isEmpty(treeNode.getParentNodeId())) {
|
||||
continue;
|
||||
}
|
||||
parentTreeNode = treeNodesMap.get(treeNode.getParentNodeId());
|
||||
if (parentTreeNode != null) {
|
||||
treeNode.setParent(parentTreeNode);
|
||||
parentTreeNode.addChild(treeNode);
|
||||
// 按照orderNum排序
|
||||
Collections.sort(parentTreeNode.getChildren(), new OrdNamComparator());
|
||||
// 判断这个节点是否是最子节点
|
||||
if (treeNode.getChildren().size() == 0) {
|
||||
treeNode.setLastNode(true);
|
||||
}
|
||||
// 计算每一个节点的最子节点的数量
|
||||
List<TreeNode> children = parentTreeNode.getChildren();
|
||||
if (children.size() > 0) {
|
||||
int sum = 0;
|
||||
for (TreeNode treeNode2 : children) {
|
||||
sum += treeNode2.getLastNodeNum();
|
||||
}
|
||||
parentTreeNode.setLastNodeNum(sum);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getFieldValue(Object obj, String type) {
|
||||
Class clz = obj.getClass();
|
||||
Field[] fields = clz.getDeclaredFields();
|
||||
String value = null;
|
||||
try {
|
||||
for(Field field : fields){
|
||||
field.setAccessible(true);
|
||||
switch (type){
|
||||
case "TreeNodeId":
|
||||
if(field.isAnnotationPresent(TreeNodeId.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeParentId":
|
||||
if(field.isAnnotationPresent(TreeNodeParentId.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeName":
|
||||
if(field.isAnnotationPresent(TreeNodeName.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeOrder":
|
||||
if(field.isAnnotationPresent(TreeNodeOrder.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeLevel":
|
||||
if(field.isAnnotationPresent(TreeNodeLevel.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据treeNodesMap转为treeNodesList
|
||||
*/
|
||||
private void initTreeNodeList() {
|
||||
if (treeNodesList.size() > 0) {
|
||||
return;
|
||||
}
|
||||
if (treeNodesMap.size() == 0) {
|
||||
return;
|
||||
}
|
||||
Iterator<TreeNode> iterator = treeNodesMap.values().iterator();
|
||||
TreeNode treeNode;
|
||||
while (iterator.hasNext()) {
|
||||
treeNode = iterator.next();
|
||||
if (treeNode.getParent() == null) {
|
||||
this.treeNodesList.add(treeNode);
|
||||
this.treeNodesList.addAll(treeNode.getAllChildren());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<TreeNode> getTree() {
|
||||
return this.treeNodesList;
|
||||
}
|
||||
|
||||
public List<TreeNode> getRoot() {
|
||||
List<TreeNode> rootList = new ArrayList<>();
|
||||
if (this.treeNodesList.size() > 0) {
|
||||
for (TreeNode node : treeNodesList) {
|
||||
if (node.getParent() == null) {
|
||||
rootList.add(node);
|
||||
Collections.sort(rootList, new OrdNamComparator());
|
||||
}
|
||||
}
|
||||
}
|
||||
return rootList;
|
||||
}
|
||||
|
||||
public TreeNode getTreeNode(String nodeId) {
|
||||
return this.treeNodesMap.get(nodeId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
package com.adc.da.sys.utils.treetool;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author David
|
||||
*/
|
||||
public class TreeNode {
|
||||
|
||||
/**
|
||||
* 树节点ID
|
||||
*/
|
||||
@JSONField(ordinal = 1)
|
||||
private String nodeId;
|
||||
/**
|
||||
* 树节点名称
|
||||
*/
|
||||
@JSONField(ordinal = 2)
|
||||
private String nodeName;
|
||||
/**
|
||||
* 父节点ID
|
||||
*/
|
||||
@JSONField(ordinal = 3)
|
||||
private String parentNodeId;
|
||||
/**
|
||||
* 节点在树中的排序号
|
||||
*/
|
||||
@JSONField(ordinal = 4)
|
||||
private int orderNum;
|
||||
/**
|
||||
* 节点所在的层级
|
||||
*/
|
||||
@JSONField(ordinal = 5)
|
||||
private int level;
|
||||
/**
|
||||
* 最子节点的数量
|
||||
*/
|
||||
@JSONField(ordinal = 6)
|
||||
private int lastNodeNum;
|
||||
|
||||
/**
|
||||
* 是否是最子节点
|
||||
*/
|
||||
@JSONField(ordinal = 7)
|
||||
private boolean lastNode;
|
||||
|
||||
private Object data;
|
||||
|
||||
/**
|
||||
* 当前节点的儿子节点
|
||||
*/
|
||||
@JSONField(ordinal = 8)
|
||||
private List<TreeNode> children = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 当前节点的完整路径
|
||||
*/
|
||||
@JSONField(ordinal = 9)
|
||||
private String completeName;
|
||||
|
||||
/**
|
||||
* 当前节点的父级节点
|
||||
* 转json的时候忽略此属性,因为此属性到前端无作用
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
private TreeNode parent;
|
||||
|
||||
/**
|
||||
* 当前节点的子孙节点
|
||||
* 转json的时候忽略此属性,因为此属性到前端无作用
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
private List<TreeNode> allChildren = new ArrayList<>();
|
||||
|
||||
private int standFlag;
|
||||
|
||||
public TreeNode(TreeNode obj) {
|
||||
this.orderNum = obj.getOrderNum();
|
||||
this.level = obj.getLevel();
|
||||
this.lastNodeNum = obj.getLastNodeNum();
|
||||
}
|
||||
|
||||
public TreeNode() {
|
||||
}
|
||||
|
||||
public void addChild(TreeNode treeNode) {
|
||||
this.children.add(treeNode);
|
||||
}
|
||||
|
||||
public void removeChild(TreeNode treeNode) {
|
||||
this.children.remove(treeNode);
|
||||
}
|
||||
|
||||
public String getNodeId() {
|
||||
return nodeId;
|
||||
}
|
||||
|
||||
public void setNodeId(String nodeId) {
|
||||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public String getNodeName() {
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName) {
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getParentNodeId() {
|
||||
return parentNodeId;
|
||||
}
|
||||
|
||||
public void setParentNodeId(String parentNodeId) {
|
||||
this.parentNodeId = parentNodeId;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public TreeNode getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(TreeNode parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public List<TreeNode> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<TreeNode> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public int getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(int orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public int getLastNodeNum() {
|
||||
return lastNodeNum;
|
||||
}
|
||||
|
||||
public void setLastNodeNum(int lastNodeNum) {
|
||||
this.lastNodeNum = lastNodeNum;
|
||||
}
|
||||
|
||||
public boolean isLastNode() {
|
||||
return lastNode;
|
||||
}
|
||||
|
||||
public void setLastNode(boolean lastNode) {
|
||||
this.lastNode = lastNode;
|
||||
}
|
||||
|
||||
public List<TreeNode> getAllChildren() {
|
||||
if (this.allChildren.isEmpty()) {
|
||||
for (TreeNode treeNode : this.children) {
|
||||
this.allChildren.add(treeNode);
|
||||
this.allChildren.addAll(treeNode.getAllChildren());
|
||||
}
|
||||
}
|
||||
return this.allChildren;
|
||||
}
|
||||
|
||||
public String getCompleteName() {
|
||||
return completeName;
|
||||
}
|
||||
|
||||
public void setCompleteName(String completeName) {
|
||||
this.completeName = completeName;
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int getStandFlag() {
|
||||
return standFlag;
|
||||
}
|
||||
|
||||
public void setStandFlag(int standFlag) {
|
||||
this.standFlag = standFlag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.adc.da.sys.utils.treetool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeId {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.adc.da.sys.utils.treetool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeLevel {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.adc.da.sys.utils.treetool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeName {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.adc.da.sys.utils.treetool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeOrder {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.adc.da.sys.utils.treetool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeParentId {
|
||||
}
|
||||
Reference in New Issue
Block a user