Merge branch 'develop_migration' into 'develop_master'

feat: There is no way the,

See merge request LiuChao/foton-slrs-system-rest!220
This commit is contained in:
super_liu
2021-11-06 23:19:18 +08:00
10 changed files with 598 additions and 156 deletions
@@ -279,7 +279,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
page.setUserId(LoginUserUtil.getUserId());
}
List<SarBussionessStand> getList = sarBussionessStandEODao.getSarBussionessStand(page);
attrInfoShow(getList);
attrInfoShowExport(getList);
return getList;
}
@@ -332,6 +332,55 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
}
}
public void attrInfoShowExport (List<SarBussionessStand> sarlist) throws Exception {
for(SarBussionessStand row : sarlist){
attrInfoDetailsExport(row);
Map<String, Object> getAttrMap = row.getAttrInfoMap();
Map<String, Object> getNewMap = new LinkedHashMap<>();
if (getAttrMap != null && getAttrMap.size() > 0) {
String svppsTip = "";
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
String name = entry.getKey();
String value = "";
if ("SVPPS".equals(name)) {
Object svpps = entry.getValue();
if (svpps != null && StringUtils.isNotBlank(svpps.toString())) {
svppsTip = svpps.toString();
}
if (StringUtils.isNotBlank(svppsTip)) {
svppsTip = sysInfoEOService.getSvppsNamesTipByIds(svppsTip);
}
value = String.valueOf(getAttrMap.get("SVPPSName"));
entry.setValue(value);
} else if (entry.getValue() != null && InitStandAttrUtil.fileFieldListBuss != null && InitStandAttrUtil.fileFieldListBuss.size() > 0 && InitStandAttrUtil.fileFieldListBuss.contains(name)) {
value = entry.getValue().toString();
if (StringUtils.isNotBlank(value)) {
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
entry.setValue(fileObj);
}
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
value = entry.getValue().toString();
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
if("ZYQCR".equals(name)||"QTQCR".equals(name)){
if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){
value = String.valueOf(getAttrMap.get(name + "Name"));
}
}else{
value = String.valueOf(getAttrMap.get(name + "Name"));
}
} else {
List<String> valArr = Arrays.asList(value.split(","));
value = dicTypeEODao.getDicNamesByCodes(valArr);
}
entry.setValue(value);
}
}
getAttrMap.put("SVPPSTips",svppsTip);
}
}
}
public SarBussionessStand updateSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception {
String standId = sarBussionessStandEO.getId();
SarBussionessStand beforeStandEO = this.baseMapper.selectByPrimaryKey(standId);
@@ -724,57 +773,6 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
}
public void attrInfoShowDetails(List<SarBussionessStand> sarlist) throws Exception {
for (SarBussionessStand row : sarlist) {
attrInfoDetails(row);
Map<String, Object> getAttrMap = row.getAttrInfoMap();
@@ -1042,6 +1040,54 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
}
}
public void attrInfoDetailsExport (SarBussionessStand row) throws Exception {
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
// 查询属性表数据
if (StringUtils.isNotBlank(fieldInfo)) {
Map<String, Object> getAttrMap = sarBussStandAttrInfoEODao.selectStandFieldAndData(fieldInfo,row.getId());
if (InitStandAttrUtil.clobFieldListBuss != null && !InitStandAttrUtil.clobFieldListBuss.isEmpty()) {
// 遍历修改所有clob类型的值
for (String clobField : InitStandAttrUtil.clobFieldListBuss) {
Clob clobValue = (Clob) getAttrMap.get(clobField);
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
getAttrMap.put(clobField,fieldValue);
}
}
// 组织机构和人员
Map<String,Object> newMap = new HashMap<>();
if(getAttrMap != null){
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
String name = entry.getKey();
Object value1 = entry.getValue();
if (value1 != null && value1.toString().equals("\"null\"")){
entry.setValue("");
}
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
String value = entry.getValue().toString();
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
value = sysInfoEOService.getOrgNamesByIds(value);
newMap.put(name + "Name",value);
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
value = sysInfoEOService.getUserNamesByIds(value);
newMap.put(name + "Name",value);
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
value = sysInfoEOService.getRoleNamesByIds(value);
newMap.put(name + "Name",value);
}
}
}
getAttrMap.putAll(newMap);
}
if (getAttrMap != null && !getAttrMap.isEmpty()) {
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
}
row.setAttrInfoMap(getAttrMap);
}
}
@Override
@@ -230,6 +230,27 @@ public class SarLawsStandInfoPage extends BasePage {
private String GLWJBUSS;
private String XCSJBUSS;
private String SSRQLAWS;
private String XCXSSRQLAWS;
private String ZCXSSRQLAWS;
private String ZCWBLAWS;
private String GCWBLAWS;
private String JDWJLAWS;
private String FBJGLAWS;
private String CYSDLAWS;
private String TGRLAWS;
private String TGDWLAWS;
private String NYLXLAWS;
private String YYRZLAWS;
private String ZRBMLAWS;
private String ZRGCSLAWS;
private String DTWJHLAWS;
private String BDTWJHLAWS;
private String YYBZZCLAWS;
private String CHJLLAWS;
private String GLWJLAWS;
//页面排序
private String paixu;
private String shunxu;
@@ -298,6 +298,54 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
}
}
public void attrInfoDetailsExport (SarLawsStandInfo row) throws Exception {
String fieldInfo = InitStandAttrUtil.queryFieldLaws;
// 查询属性表数据
if (StringUtils.isNotBlank(fieldInfo)) {
Map<String, Object> getAttrMap = sarLawsAttrInfoDao.selectLawsFieldAndData(fieldInfo,row.getId());
if (InitStandAttrUtil.clobFieldListLaws != null && !InitStandAttrUtil.clobFieldListLaws.isEmpty()) {
// 遍历修改所有clob类型的值
for (String clobField : InitStandAttrUtil.clobFieldListLaws) {
Clob clobValue = (Clob) getAttrMap.get(clobField);
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
getAttrMap.put(clobField,fieldValue);
}
}
// 组织机构和人员
Map<String,Object> newMap = new HashMap<>();
if(getAttrMap != null){
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
String name = entry.getKey();
Object value1 = entry.getValue();
if (value1 != null && value1.toString().equals("\"null\"")){
entry.setValue("");
}
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
String value = entry.getValue().toString();
String selVal = InitStandAttrUtil.selectFieldMapLaws.get(name);
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
value = sysInfoEOService.getOrgNamesByIds(value);
newMap.put(name + "Name",value);
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
value = sysInfoEOService.getUserNamesByIds(value);
newMap.put(name + "Name",value);
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
value = sysInfoEOService.getRoleNamesByIds(value);
newMap.put(name + "Name",value);
}
}
}
getAttrMap.putAll(newMap);
}
if (getAttrMap != null && !getAttrMap.isEmpty()) {
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
}
row.setAttrInfoMap(getAttrMap);
}
}
private Map<String, Object> transformUpperCase(Map<String, Object> orgMap) {
Map<String, Object> resultMap = new HashMap<>();
@@ -382,14 +430,14 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
}
}
}
page.setOrderBy("SAR_LAWS_ATTR_INFO.issue_time is null,SAR_LAWS_ATTR_INFO.issue_time desc,SAR_LAWS_ATTR_INFO.id");
// page.setOrderBy("SAR_LAWS_ATTR_INFO.issue_time is null,SAR_LAWS_ATTR_INFO.issue_time desc,SAR_LAWS_ATTR_INFO.id");
if(userId != null){
page.setUserId(userId);
}else {
page.setUserId(LoginUserUtil.getUserId());
}
List<SarLawsStandInfo> rows = this.baseMapper.getSarStandardsExportInfo(page);
attrInfoShow(rows);
attrInfoShowExport(rows);
return rows;
}
@@ -432,6 +480,45 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
}
}
public void attrInfoShowExport (List<SarLawsStandInfo> sarlist) throws Exception {
for(SarLawsStandInfo row : sarlist){
attrInfoDetailsExport(row);
Map<String, Object> getAttrMap = row.getAttrInfoMap();
Map<String, Object> getNewMap = new LinkedHashMap<>();
if (getAttrMap != null && getAttrMap.size() > 0) {
String svppsTip = "";
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
String name = entry.getKey();
String value = "";
if (entry.getValue() != null && InitStandAttrUtil.fileFieldListLaws != null && InitStandAttrUtil.fileFieldListLaws.size() > 0 && InitStandAttrUtil.fileFieldListLaws.contains(name)) {
value = entry.getValue().toString();
if (StringUtils.isNotBlank(value)) {
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
entry.setValue(fileObj);
}
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
value = entry.getValue().toString();
String selVal = InitStandAttrUtil.selectFieldMapLaws.get(name);
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
if("ZYQCR".equals(name)||"QTQCR".equals(name)){
if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){
value = String.valueOf(getAttrMap.get(name + "Name"));
}
}else{
value = String.valueOf(getAttrMap.get(name + "Name"));
}
} else {
List<String> valArr = Arrays.asList(value.split(","));
value = dicTypeEODao.getDicNamesByCodes(valArr);
}
entry.setValue(value);
}
}
getAttrMap.put("SVPPSTips",svppsTip);
}
}
}
@Override
public SarLawsStandInfoPage updateStandardsMenu(SarLawsStandInfoPage standardsInfoEO) {
SarLawsMenu sarStandMenuEO = new SarLawsMenu();
@@ -413,6 +413,53 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
}
}
public void attrInfoDetailsExport(SarStandardsInfo row) throws Exception {
String fieldInfo = InitStandAttrUtil.queryField;
// 查询属性表数据
if (StringUtils.isNotBlank(fieldInfo)) {
Map<String, Object> getAttrMap = sarStandAttrInfoEODao.selectStandFieldAndData(fieldInfo, row.getId());
if (InitStandAttrUtil.clobFieldList != null && !InitStandAttrUtil.clobFieldList.isEmpty()) {
// 遍历修改所有clob类型的值
for (String clobField : InitStandAttrUtil.clobFieldList) {
Clob clobValue = (Clob) getAttrMap.get(clobField);
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
getAttrMap.put(clobField, fieldValue);
}
}
// 组织机构和人员
Map<String, Object> newMap = new HashMap<>();
if (getAttrMap != null) {
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
String name = entry.getKey();
if ("\"null\"".equals(entry.getValue())) {
entry.setValue("");
}
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
String value = entry.getValue().toString();
String selVal = InitStandAttrUtil.selectFieldMap.get(name);
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
value = sysInfoEOService.getOrgNamesByIds(value);
newMap.put(name + "Name", value);
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
value = sysInfoEOService.getUserNamesByIds(value);
newMap.put(name + "Name", value);
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
value = sysInfoEOService.getRoleNamesByIds(value);
newMap.put(name + "Name", value);
}
}
}
getAttrMap.putAll(newMap);
}
if (getAttrMap != null && !getAttrMap.isEmpty()) {
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
}
row.setAttrInfoMap(getAttrMap);
}
}
public void attrInfoSearchDetails(SarStandardsInfo row,String type) throws Exception {
String fieldInfo = InitStandAttrUtil.queryField;
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
@@ -604,6 +651,55 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
}
}
public void attrInfoShowExport(List<SarStandardsInfo> sarlist) throws Exception {
for (SarStandardsInfo row : sarlist) {
attrInfoDetailsExport(row);
Map<String, Object> getAttrMap = row.getAttrInfoMap();
Map<String, Object> getNewMap = new LinkedHashMap<>();
if (getAttrMap != null && getAttrMap.size() > 0) {
String svppsTip = "";
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
String name = entry.getKey();
String value = "";
if ("SVPPS".equals(name)) {
Object svpps = entry.getValue();
if (svpps != null && StringUtils.isNotBlank(svpps.toString())) {
svppsTip = svpps.toString();
}
if (StringUtils.isNotBlank(svppsTip)) {
svppsTip = sysInfoEOService.getSvppsNamesTipByIds(svppsTip);
}
value = String.valueOf(getAttrMap.get("SVPPSName"));
entry.setValue(value);
} else if (entry.getValue() != null && InitStandAttrUtil.fileFieldList != null && InitStandAttrUtil.fileFieldList.size() > 0 && InitStandAttrUtil.fileFieldList.contains(name)) {
value = entry.getValue().toString();
if (StringUtils.isNotBlank(value)) {
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
entry.setValue(fileObj);
}
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
value = entry.getValue().toString();
if ("GZZXX".equals(name)) {
value = sysInfoEOService.getGroupNamesByIds(value);
} else {
String selVal = InitStandAttrUtil.selectFieldMap.get(name);
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
if (getAttrMap.get(name + "Name") != null) {
value = String.valueOf(getAttrMap.get(name + "Name"));
}
} else {
List<String> valArr = Arrays.asList(value.split(","));
value = dicTypeEODao.getDicNamesByCodes(valArr);
}
}
entry.setValue(value);
}
}
getAttrMap.put("SVPPSTips", svppsTip);
}
}
}
/***
* @Description: 新增标准
@@ -1456,19 +1552,23 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
page = (SarStandardsInfoEOPage) JSONObject.toBean(jsonObject, SarStandardsInfoEOPage.class);
page.setStandType(standardsInfoExcelVO.getStandType());
//查询当前登录人角色拥有权限的菜单
List<String> getMenuIdList = new ArrayList<>();
if(standardsInfoExcelVO.getUserId() != null){
getMenuIdList= tsUserService.getResourceUserId(standardsInfoExcelVO.getUserId());
}
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList);
} else {
page.setMenuRoleList(null);
}
List<String> ids = sarMenuEOService.getChildMenuList(page.getMenuId());
if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids);
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
QueryWrapper<TsResource> qw = new QueryWrapper<>();
qw.eq("ID",page.getMenuId());
qw.isNull("PARENT_ID");
List<TsResource> children = iTsResourceService.list(qw);
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList);
} else {
page.setMenuRoleList(null);
}
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids);
}
}
}
if (org.apache.commons.lang.StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
List<SarAdvanceSearchVO> searchList = com.alibaba.fastjson.JSONObject.parseArray(page.getAdvanceSearchVOStr(), SarAdvanceSearchVO.class);
@@ -1480,14 +1580,13 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
}
}
}
page.setOrderBy("SAR_STANDARDS_INFO.issue_time is null,SAR_STANDARDS_INFO.issue_time desc,SAR_STANDARDS_INFO.id");
if(standardsInfoExcelVO.getUserId() != null){
page.setUserId(standardsInfoExcelVO.getUserId());
}else {
page.setUserId(LoginUserUtil.getUserId());
}
List<SarStandardsInfo> getList = dao.getSarStandardsExportInfo(page);
attrInfoShow(getList);
attrInfoShowExport(getList);
return getList;
}
@@ -120,7 +120,7 @@ public class LawsStandExportUtil {
break;
case "征集意见周期-起始时间":
String commentCycleStart="";
if (Date.class.equals(sarStandardsInfoEO.getCommentCycleStart().getClass())){
if (Date.class.equals(sarStandardsInfoEO.getCommentCycleStart())){
commentCycleStart = sdf.format(sarStandardsInfoEO.getCommentCycleStart());
}else {
commentCycleStart=sarStandardsInfoEO.getCommentCycleStart();
@@ -129,7 +129,7 @@ public class LawsStandExportUtil {
break;
case "征集意见周期-结束时间":
String commentCycleEnd="";
if (Date.class.equals(sarStandardsInfoEO.getCommentCycleEnd().getClass())){
if (Date.class.equals(sarStandardsInfoEO.getCommentCycleEnd())){
commentCycleEnd = sdf.format(sarStandardsInfoEO.getCommentCycleEnd());
}else {
commentCycleEnd=sarStandardsInfoEO.getCommentCycleEnd();
@@ -348,6 +348,55 @@
<!-- 分页查询条件 -->
<sql id="standSort_in">
ORDER BY
CASE tmp_tb.stand_sort
when 'Q/FT A' THEN 0
when 'Q/FT B' THEN 1
when 'Q/FT E' THEN 2
when 'Q/FT F' THEN 3
when 'Q/FT G' THEN 4
when 'Q/FT M' THEN 5
when 'Q/FT Q' THEN 6
when 'Q/FT R' THEN 7
when 'Q/FT S' THEN 8
when 'Q/FT T' THEN 9
when 'Q/FT V' THEN 10
when 'Q/FT X' THEN 11
when 'Q/FT Y' THEN 12
when 'Q/FT Z' THEN 13
when 'Q/QCBFC' THEN 14
when '雷萨企标Q/FL' THEN 15
when 'Q/QCFLC' THEN 16
ELSE 17
END,
tmp_tb.stand_sort ASC
</sql>
<sql id="standSort_out">
ORDER BY
CASE tmp_tb.stand_sort
when 'Q/FT A' THEN 0
when 'Q/FT B' THEN 1
when 'Q/FT E' THEN 2
when 'Q/FT F' THEN 3
when 'Q/FT G' THEN 4
when 'Q/FT M' THEN 5
when 'Q/FT Q' THEN 6
when 'Q/FT R' THEN 7
when 'Q/FT S' THEN 8
when 'Q/FT T' THEN 9
when 'Q/FT V' THEN 10
when 'Q/FT X' THEN 11
when 'Q/FT Y' THEN 12
when 'Q/FT Z' THEN 13
when 'Q/QCBFC' THEN 14
when '雷萨企标Q/FL' THEN 15
when 'Q/QCFLC' THEN 16
ELSE 17
END,
tmp_tb.stand_sort ASC,
tmp_tb.issue_time is null,tmp_tb.issue_time desc,tmp_tb.id
</sql>
<sql id="SarBussionInfo_Where_Clause">
left join SAR_BUSS_STAND_MENU ON SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_MENU.buss_stand_id
left join TS_RESOURCE on SAR_BUSS_STAND_MENU.menu_id = TS_RESOURCE.id
@@ -585,7 +634,9 @@
<if test="sql != null and sql != ''" >
ORDER BY ${sql}
</if>
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
) tmp_tb
<include refid="standSort_in"/>
limit ${pager.startIndex-1},${pageSize}) a
</select>
<!-- 企标复审使用-->
@@ -626,13 +677,13 @@
<!-- 条件查询后,用于导出标准信息数据-->
<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 * FROM (
select <include refid="Base_Column_List_show" />
from SAR_BUSSIONESS_STAND
<include refid="SarBussionInfo_Where_Clause"/>
GROUP BY <include refid="Group_Column_List_show"/>
) tmp_tb
<include refid="standSort_in"/>
</select>
@@ -290,7 +290,7 @@
a.*,
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow
from (select <include refid="Base_Column_List_Show"/>
from SAR_LAWS_ATTR_INFO
from SAR_LAWS_STAND_INFO
<include refid="SarStandardsInfo_in_left"/>) a
<include refid="SarStandardsInfo_out_left"/>
order by a.issue_time is null,a.issue_time desc,a.id
@@ -54,6 +54,27 @@
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.STAND_SYSTEM
</sql>
<sql id="Base_Column_List_DIS" >
DISTINCT SAR_STANDARDS_INFO.id,
SAR_STANDARDS_INFO.stand_type,
SAR_STANDARDS_INFO.country,
SAR_STANDARDS_INFO.stand_sort,
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.text_status,
SAR_STANDARDS_INFO.creation_user,
SAR_STANDARDS_INFO.valid_flag,
SAR_STANDARDS_INFO.creation_time,
SAR_STANDARDS_INFO.modify_time,
SAR_STANDARDS_INFO.STAND_SYSTEM,
SAR_STANDARDS_INFO.IS_RELATE_ACCESS
</sql>
<sql id="Base_Column_List_Show" >
SAR_STANDARDS_INFO.id, SAR_STANDARDS_INFO.stand_type, SAR_STANDARDS_INFO.country, SAR_STANDARDS_INFO.stand_sort,
@@ -544,6 +565,100 @@
</trim>
</sql>
<sql id="standSort_in">
<if test='standType != null and standType == "INLAND"'>
ORDER BY
CASE tmp_tb.stand_sort
when 'GB' THEN 0
when 'GB/T' THEN 1
when 'QC/T' THEN 2
when 'JT' THEN 3
when 'JB' THEN 4
when 'GA' THEN 5
when 'GJB' THEN 6
when 'HJ' THEN 7
ELSE 8
END,
tmp_tb.stand_sort ASC
</if>
<if test='standType != null and standType == "FOREIGN"'>
ORDER BY
CASE tmp_tb.stand_sort
when 'ECE' THEN 0
when 'EU' THEN 1
when 'EC' THEN 2
when 'EEC' THEN 3
when 'ISO' THEN 4
when 'IEC' THEN 5
when 'GTR' THEN 6
when 'CFR' THEN 7
when 'JASO' THEN 8
when 'JIS' THEN 9
when 'GSO' THEN 10
when 'GOST' THEN 11
when 'ΓOCT' THEN 12
when 'TP' THEN 13
when 'SASO' THEN 14
when 'UAE' THEN 15
when 'CONTRAN' THEN 16
when 'DENATRAN' THEN 17
when 'ABNT NBR' THEN 18
when 'NBR' THEN 19
when 'INMETRO' THEN 20
when 'CONAMA' THEN 21
when 'Normative Instruction' THEN 22
when 'ADR' THEN 23
ELSE 24
END,
tmp_tb.stand_sort ASC
</if>
</sql>
<sql id="standSort_out">
<if test='standType != null and standType == "INLAND"'>
CASE a.stand_sort
when 'GB' THEN 0
when 'GB/T' THEN 1
when 'QC/T' THEN 2
when 'JT' THEN 3
when 'JB' THEN 4
when 'GA' THEN 5
when 'GJB' THEN 6
when 'HJ' THEN 7
ELSE 8
END,
a.stand_sort ASC,
</if>
<if test='standType != null and standType == "FOREIGN"'>
CASE a.stand_sort
when 'ECE' THEN 0
when 'EU' THEN 1
when 'EC' THEN 2
when 'EEC' THEN 3
when 'ISO' THEN 4
when 'IEC' THEN 5
when 'GTR' THEN 6
when 'CFR' THEN 7
when 'JASO' THEN 8
when 'JIS' THEN 9
when 'GSO' THEN 10
when 'GOST' THEN 11
when 'ΓOCT' THEN 12
when 'TP' THEN 13
when 'SASO' THEN 14
when 'UAE' THEN 15
when 'CONTRAN' THEN 16
when 'DENATRAN' THEN 17
when 'ABNT NBR' THEN 18
when 'NBR' THEN 19
when 'INMETRO' THEN 20
when 'CONAMA' THEN 21
when 'Normative Instruction' THEN 22
when 'ADR' THEN 23
ELSE 24
END,
a.stand_sort ASC,
</if>
</sql>
<sql id="SarStandardsInfo_in_left">
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
where 1=1 and SAR_STANDARDS_INFO.valid_flag=0
@@ -605,36 +720,6 @@
</foreach>
</if>
<!-- 游离态标准查询 -->
<!-- <if test="menuId != null and menuId =='nomenu' and standType =='INLAND'">
and SAR_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide
='INLAND_STAND')
&lt;!&ndash;-查询游离态标准,编号和名称是分开的 &ndash;&gt;
<if test="standNumber != null">
and ((concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR is not null)
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) like concat(concat('%',#{standNumber}),'%')
and SAR_STANDARDS_INFO.STAND_YEAR is null))
</if>
</if>
<if test="menuId != null and menuId =='nomenu' and standType =='FOREIGN'">
and SAR_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide
='FOREIGN_STAND')
<if test="standNumber != null">
and ((concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR is not null)
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) like concat(concat('%',#{standNumber}),'%')
and SAR_STANDARDS_INFO.STAND_YEAR is null))
</if>
</if> -->
<!-- 当第一次进入页面未选择记录时-->
<!-- <if test="(menuId == null or menuId =='') and standType =='INLAND'">-->
<!-- and SAR_STAND_MENU.MENU_ID in (-->
<!-- select TS_RESOURCE.id from TS_RESOURCE start with id=(select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null-->
<!-- and sor_divide-->
<!-- ='INLAND_STAND') connect by prior id= parent_id-->
<!-- )-->
<!-- </if>-->
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
<if test="menuRoleList != null">
and SAR_STAND_MENU.MENU_ID in
@@ -747,30 +832,15 @@
(select tmp_tb.* from
(
SELECT
DISTINCT SAR_STANDARDS_INFO.id,
SAR_STANDARDS_INFO.stand_type,
SAR_STANDARDS_INFO.country,
SAR_STANDARDS_INFO.stand_sort,
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.text_status,
SAR_STANDARDS_INFO.creation_user,
SAR_STANDARDS_INFO.valid_flag,
SAR_STANDARDS_INFO.creation_time,
SAR_STANDARDS_INFO.modify_time,
SAR_STANDARDS_INFO.STAND_SYSTEM,
SAR_STANDARDS_INFO.IS_RELATE_ACCESS
<include refid="Base_Column_List_DIS"/>
from SAR_STANDARDS_INFO
<include refid="SarStandardsInfo_in_left"/>
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
) tmp_tb
<include refid="standSort_in"/>
limit ${pager.startIndex-1},${pageSize}) a
<include refid="SarStandardsInfo_out_left"/>
order by
<include refid="standSort_out"/>
${orderByA} ${order1},a.id
</select>
<!--FIELD(SAR_STANDARDS_INFO.issue_time,'已发布'), FIELD(SAR_STANDARDS_INFO.issue_time,'TBD'), FIELD(SAR_STANDARDS_INFO.issue_time,'N/A') ,-->
@@ -901,11 +971,16 @@
<select id="getSarStandardsExportInfo" resultMap="BaseResultMapExcel"
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
select<include refid="Base_Column_List_Show"/>
from SAR_STANDARDS_INFO
<include refid="SarStandardsInfo_Where_Clause"/>
GROUP BY <include refid="Group_Column_List_Show"/>
order by SAR_STANDARDS_INFO.issue_time is null,SAR_STANDARDS_INFO.issue_time desc,SAR_STANDARDS_INFO.id
select a.* from (
select<include refid="Base_Column_List_Show"/>
from SAR_STANDARDS_INFO
<include refid="SarStandardsInfo_Where_Clause"/>
GROUP BY <include refid="Group_Column_List_Show"/>
) a
order by
<include refid="standSort_out"/>
a.issue_time is null
,a.issue_time desc,a.id
</select>
<select id="selectStandardsInfoByKey" resultMap="BaseResultMap" parameterType="java.lang.String">