Merge remote-tracking branch 'origin/develop_master' into develop_master
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
package com.adc.da.common;
|
||||
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class TableToExcel {
|
||||
|
||||
public static <T extends Object> Workbook createExcel(Map<String,String> columnMap, List<T> dataList, String sheelName, String fileName) {
|
||||
|
||||
if(sheelName==null)sheelName="sheet1";
|
||||
|
||||
int sheetRow=500;
|
||||
sheetRow=sheetRow<0?200:sheetRow;
|
||||
//第一步,创建一个webbook,对应一个excel文件,内存中sheetRow条记录后提交。
|
||||
Workbook wb=new SXSSFWorkbook(sheetRow);
|
||||
if(columnMap!=null&&dataList!=null) {
|
||||
//获取需要生成的sheet数,以防数据量过大报错
|
||||
int sheetCount=getSheetCount(sheetRow,dataList.size());
|
||||
//循环生成sheet
|
||||
for(int i=0;i<sheetCount;i++) {
|
||||
//第二步,在webbook中添加一个sheet,对应Excel文件中的sheet
|
||||
Sheet sheet=wb.createSheet(sheelName);
|
||||
//第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数有限制short
|
||||
Row titleRow=sheet.createRow(0);
|
||||
|
||||
Set<String> keys=columnMap.keySet();
|
||||
//第一行(标题行)合并并设置标题
|
||||
|
||||
|
||||
//创建表头行
|
||||
Row headRow=sheet.createRow(0);
|
||||
//生成表头行
|
||||
int j=0;
|
||||
for(String key:keys) {
|
||||
Cell hCell=headRow.createCell(j++);
|
||||
hCell.setCellValue(columnMap.get(key));
|
||||
}
|
||||
//从第三行开始填充数据
|
||||
int c=2;
|
||||
for(int k=i*sheetRow;k<dataList.size()&&k<(i+1)*sheetRow;k++) {
|
||||
T t=dataList.get(k);
|
||||
Row dataRow=sheet.createRow(c++);
|
||||
//循环取值进行数据填充
|
||||
int v=0;
|
||||
for(String key:keys) {
|
||||
try {
|
||||
Object val= BeanUtils.getProperty(t, key);
|
||||
if(val instanceof Long) {
|
||||
dataRow.createCell(v++).setCellValue((Long)val);
|
||||
}else if(val instanceof Double){
|
||||
dataRow.createCell(v++).setCellValue((Double)val);
|
||||
}else if(val instanceof Date) {
|
||||
dataRow.createCell(v++).setCellValue((Date)val);
|
||||
}else if(val instanceof Calendar) {
|
||||
dataRow.createCell(v++).setCellValue((Calendar)val);
|
||||
}else if(val instanceof Boolean) {
|
||||
dataRow.createCell(v++).setCellValue((Boolean)val);
|
||||
}else if(val==null) {
|
||||
dataRow.createCell(v++).setCellValue("");
|
||||
}else {
|
||||
dataRow.createCell(v++).setCellValue((String)val);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("导出Excel-表格赋值异常");
|
||||
}
|
||||
}
|
||||
}
|
||||
//设置列宽
|
||||
// setColumnWidth(sheet,columnMap);
|
||||
}
|
||||
}
|
||||
return wb;
|
||||
}
|
||||
public static void setColumnWidth(Sheet sheet, Map<String,String> columnMap) {
|
||||
if(sheet!=null&&columnMap!=null) {
|
||||
List<String> list=new ArrayList<String>(columnMap.keySet());
|
||||
for(int i=0;i<list.size();i++) {
|
||||
sheet.autoSizeColumn(i,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
public static int getSheetCount(int sheelRow,int total) {
|
||||
if(total==0||total<sheelRow)return 1;
|
||||
return total%sheelRow>0?total/sheelRow+1:total/sheelRow;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.adc.da.workFlow.controller;
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import com.adc.da.FeignClientImpl.workFlowFeignClientImpl;
|
||||
import com.adc.da.Timer.ProcessTimer;
|
||||
import com.adc.da.common.*;
|
||||
@@ -15,7 +16,11 @@ import com.adc.da.sys.common.EmailUtils;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.service.IUserEOService;
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
import com.adc.da.workFlow.dao.ExportExcelMapper;
|
||||
import com.adc.da.workFlow.entity.ExportExcel;
|
||||
import com.adc.da.workFlow.entity.ExportExcelEO;
|
||||
import com.adc.da.workFlow.entity.ProcessDetailExport;
|
||||
import com.adc.da.workFlow.service.WorkFlowService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -29,6 +34,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -42,6 +48,46 @@ public class WorkFlowController {
|
||||
@Autowired
|
||||
private workFlowFeignClientImpl workFlowFeignClient;
|
||||
|
||||
// @Autowired
|
||||
// private ExportExcelMapper exportExcelMapper;
|
||||
|
||||
@ApiOperation(value = "导出excel")
|
||||
@PostMapping("/export_excel")
|
||||
public void exportExcel(@RequestBody ExportExcelEO exportExcelEO, HttpServletResponse response, HttpServletRequest request) throws IOException {
|
||||
|
||||
// ExportExcel exportExcel = exportExcelMapper.selectById(id);
|
||||
// if(exportExcel==null||exportExcel.getJson()==null)return;
|
||||
// ExportExcelEO exportExcelEO=JSON.parseObject(exportExcel.getJson(),ExportExcelEO.class);
|
||||
|
||||
if(exportExcelEO.getFileName()==null||exportExcelEO.getFileName().trim().length()==0){
|
||||
exportExcelEO.setFileName(UUID.fastUUID().toString(true));
|
||||
}
|
||||
|
||||
Workbook excel = TableToExcel.createExcel(exportExcelEO.getColumnName(), exportExcelEO.getDataList(), null, exportExcelEO.getFileName());
|
||||
|
||||
response.reset();
|
||||
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
|
||||
response.setHeader("Content-disposition", "attachment; filename=" + exportExcelEO.getFileName() + ".xls");
|
||||
OutputStream outputStream = response.getOutputStream();
|
||||
|
||||
excel.write(outputStream);
|
||||
outputStream.flush();
|
||||
outputStream.close();
|
||||
}
|
||||
|
||||
// @ApiOperation(value = "导出excel数据暂留")
|
||||
// @PostMapping("/save_excel")
|
||||
// public ResponseMessage saveExcel(@RequestBody ExportExcel exportExcel){
|
||||
//
|
||||
// exportExcelMapper.insert(exportExcel);
|
||||
// return Result.success(exportExcel);
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "启动流程-以流程定义id")
|
||||
@GetMapping("/activiti_define_start")
|
||||
public ResponseMessage activiti_define_start(@RequestParam("id") String id, @RequestParam("userId") String userId, @RequestParam(value = "bpnId",required = false) String bpnId){
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.adc.da.workFlow.dao;
|
||||
|
||||
|
||||
import com.adc.da.workFlow.entity.ExportExcel;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
public interface ExportExcelMapper extends BaseMapper<ExportExcel> {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.workFlow.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("t_export_excel")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class ExportExcel {
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableField(value = "json")
|
||||
private String json;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.adc.da.workFlow.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class ExportExcelEO {
|
||||
|
||||
private Map<String,String> columnName;
|
||||
|
||||
private List<Map<String,Object>> dataList;
|
||||
|
||||
private String fileName;
|
||||
|
||||
}
|
||||
@@ -31,4 +31,5 @@ public class WorkFlowService {
|
||||
/**
|
||||
* 后续优化工作流
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
<artifactId>UserAgentUtils</artifactId>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
+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);
|
||||
}
|
||||
}
|
||||
-5
@@ -86,11 +86,6 @@ public class SarLawsDetailedListController extends BaseController<SarLawsDetaile
|
||||
String countryArea, String projectName,
|
||||
String detailedList,
|
||||
String detailedListName) {
|
||||
|
||||
if ("null".equals(countryArea))countryArea=null;
|
||||
if ("null".equals(projectName))projectName=null;
|
||||
if ("null".equals(detailedList))detailedList=null;
|
||||
if ("null".equals(detailedListName))detailedListName=null;
|
||||
if (StringUtils.isNotEmpty(sortKey)) {
|
||||
IPage<SarLawsDetailedList> publicList = sarLawsDetailedListService.AllSelectD(page, pageSize, sortKey,
|
||||
countryArea, projectName, detailedList, detailedListName);
|
||||
|
||||
+47
-8
@@ -3,11 +3,17 @@ package com.adc.da.slrs.sarStandIdea.controller;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.GetExcelDto;
|
||||
import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaAllServiceImpl;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
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.PostMapping;
|
||||
@@ -18,6 +24,10 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -34,6 +44,8 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
|
||||
@Autowired
|
||||
private SarPublicIdeaAllServiceImpl sarPublicIdeaAllImpl;
|
||||
@Autowired
|
||||
private SarPublicIdeaAllDao sarPublicIdeaAllDao;
|
||||
|
||||
|
||||
@ApiOperation(value = "查询全部意见")
|
||||
@@ -59,7 +71,6 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
return Result.success("200",src);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "修改意见")
|
||||
@PostMapping("/updateStand")
|
||||
public ResponseMessage updateStand(SarPublicIdeaAll sarPublicIdeaAll,String autUserId){
|
||||
@@ -67,14 +78,42 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
return Result.success("200",src);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "导出全部意见")
|
||||
@GetMapping("/tuallStand")
|
||||
public ResponseMessage getAllStand(HttpServletResponse response,String cid){
|
||||
String src=sarPublicIdeaAllImpl.stuListExcel(response,cid);
|
||||
return Result.success("200",src);
|
||||
}
|
||||
public void getAllStand(HttpServletResponse response,String cid){
|
||||
try {
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
String fileName = URLEncoder.encode("意见详情", "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
List<SarPublicIdeaAll> data=new ArrayList<>();
|
||||
if (!StringUtils.isEmpty(cid)){
|
||||
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(SarPublicIdeaAll.CID,cid);
|
||||
data=sarPublicIdeaAllDao.selectList(wrapper);
|
||||
}
|
||||
List<GetExcelDto> standExcel=new ArrayList<>();
|
||||
for (SarPublicIdeaAll sarPublicIdeaAll:data){
|
||||
GetExcelDto getExcelDto=GetExcelDto.builder()
|
||||
.partCode(sarPublicIdeaAll.getPartCode())
|
||||
.content(sarPublicIdeaAll.getContent())
|
||||
.userName(sarPublicIdeaAll.getUserName())
|
||||
.deptName(sarPublicIdeaAll.getDeptName())
|
||||
.build();
|
||||
standExcel.add(getExcelDto);
|
||||
}
|
||||
EasyExcel.write(response.getOutputStream(),GetExcelDto.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(standExcel);
|
||||
} catch (Exception e) {
|
||||
response.reset();
|
||||
response.setContentType("application/json");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
try {
|
||||
response.getWriter().println(JSON.toJSONString(Result.error()));
|
||||
} catch (IOException ioException) {
|
||||
ioException.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.adc.da.slrs.sarStandIdea.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* //用于导出
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-14
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@HeadRowHeight(20)
|
||||
@ColumnWidth(15)
|
||||
public class GetExcelDto {
|
||||
|
||||
@ExcelProperty("章节编号")
|
||||
private String partCode;
|
||||
@ExcelProperty("内容")
|
||||
private String content;
|
||||
@ExcelProperty("提出人")
|
||||
private String userName;
|
||||
@ExcelProperty("所在部门")
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
-2
@@ -25,6 +25,4 @@ public interface ISarPublicIdeaAllService extends IService<SarPublicIdeaAll> {
|
||||
String updateById(SarPublicIdeaAll sarPublicIdeaAll, String autUserid);
|
||||
String delete(DelStandDto delStandDto);
|
||||
String del(String id);
|
||||
String stuListExcel(HttpServletResponse response,String cid);
|
||||
|
||||
}
|
||||
|
||||
-70
@@ -88,74 +88,4 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
|
||||
sarPublicIdeaAllDao.deleteById(id);
|
||||
return "删除成功";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String stuListExcel(HttpServletResponse response,String cid) {
|
||||
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(SarPublicIdeaAll.CID,cid);
|
||||
List<SarPublicIdeaAll> data=sarPublicIdeaAllDao.selectList(wrapper);
|
||||
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyyMMdd hhmmss");
|
||||
Workbook wb = new XSSFWorkbook();
|
||||
//标题行抽出字段
|
||||
String[] title = {"", "标准或政策编号","章节编号", "内容","提出人","所在部门"};
|
||||
//设置sheet名称,并创建新的sheet对象
|
||||
String sheetName = "意见信息";
|
||||
Sheet stuSheet = wb.createSheet(sheetName);
|
||||
//获取表头行
|
||||
Row titleRow = stuSheet.createRow(0);
|
||||
//创建单元格,设置style居中,字体,单元格大小等
|
||||
CellStyle style = wb.createCellStyle();
|
||||
Cell cell;
|
||||
//把已经写好的标题行写入excel文件中
|
||||
for (int i = 1; i < title.length; i++) {
|
||||
cell = titleRow.createCell(i);
|
||||
cell.setCellValue(title[i]);
|
||||
cell.setCellStyle(style);
|
||||
}
|
||||
//把从数据库中取得的数据一一写入excel文件中
|
||||
Row row = null;
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
//创建list.size()行数据
|
||||
row = stuSheet.createRow(i + 1);
|
||||
//把值一一写进单元格里
|
||||
//设置第一列为自动递增的序号
|
||||
row.createCell(0).setCellValue(i + 1);
|
||||
row.createCell(1).setCellValue(data.get(i).getCid());
|
||||
row.createCell(2).setCellValue(data.get(i).getPartCode());
|
||||
row.createCell(3).setCellValue(data.get(i).getContent());
|
||||
row.createCell(4).setCellValue(data.get(i).getUserName());
|
||||
row.createCell(5).setCellValue(data.get(i).getDeptName());
|
||||
}
|
||||
//设置单元格宽度自适应,在此基础上把宽度调至1.5倍
|
||||
for (int i = 0; i < title.length; i++) {
|
||||
stuSheet.autoSizeColumn(i, true);
|
||||
stuSheet.setColumnWidth(i, stuSheet.getColumnWidth(i) * 15 / 10);
|
||||
}
|
||||
|
||||
|
||||
response.setContentType("application/octet-stream; charset=iso-8859-1");
|
||||
StringBuffer contentDisposition = new StringBuffer("attachment; filename=\"");
|
||||
String fileName = new String("Reply-content.xlsx".getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
|
||||
contentDisposition.append(fileName).append("\"");
|
||||
response.setHeader("Content-disposition", contentDisposition.toString());
|
||||
ServletOutputStream out = null;
|
||||
try {
|
||||
out = response.getOutputStream();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
wb.write(out);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
out.flush();
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "下载成功";
|
||||
}
|
||||
}
|
||||
|
||||
+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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.adc.da.slrs.sarTree.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.sarRole.entity.TsRole;
|
||||
import com.adc.da.slrs.sarTree.entity.SarModel;
|
||||
import com.adc.da.slrs.sarTree.entity.SarVPPS;
|
||||
import com.adc.da.slrs.sarTree.service.SarModelService;
|
||||
import com.adc.da.slrs.sarTree.service.SarVPPSService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "|获取树列表|")
|
||||
@RequestMapping("/api/sarVpps")
|
||||
public class TreeController extends BaseController<SarVPPS> {
|
||||
|
||||
@Autowired
|
||||
private SarVPPSService sarVPPSService;
|
||||
@Autowired
|
||||
private SarModelService sarModelService;
|
||||
|
||||
@ApiOperation("VPPS树列表")
|
||||
@GetMapping("/tree/list1")
|
||||
public ResponseMessage<List<SarVPPS>> getTreeList1(){
|
||||
List<SarVPPS> sarVpps = sarVPPSService.findTreeAll();
|
||||
return Result.success(sarVpps);
|
||||
}
|
||||
|
||||
@ApiOperation("模块结构单元树列表")
|
||||
@GetMapping("/tree/list2")
|
||||
public ResponseMessage<List<SarModel>> getTreeList2(){
|
||||
List<SarModel> sarVpps = sarModelService.findTreeAll();
|
||||
return Result.success(sarVpps);
|
||||
}
|
||||
|
||||
// @ApiOperation("根据角色名筛选角色")
|
||||
// @GetMapping("/tree/node/list")
|
||||
// public ResponseMessage<Map<String,Object>> getTreeNodeList(String code){
|
||||
// Map<String,Object> map = sarVPPSService.findTreeAll(code);
|
||||
// return Result.success(map);
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.adc.da.slrs.sarTree.dao;
|
||||
|
||||
import com.adc.da.slrs.sarTree.entity.SarModel;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import java.util.List;
|
||||
|
||||
public interface SarModelDao extends BaseMapper<SarModel> {
|
||||
|
||||
@Select("select id,pid,CONCAT(name,model) name,features from sar_model_tree where 1=1 and isnull(pid)")
|
||||
List<SarModel> findTreeAll();
|
||||
@Select("select id,pid,CONCAT(name,model) name,features from sar_model_tree where 1=1 and pid = #{pid}")
|
||||
List<SarModel> selectList(@Param("pid") String pid);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.adc.da.slrs.sarTree.dao;
|
||||
|
||||
import com.adc.da.slrs.sarTree.entity.SarVPPS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import java.util.List;
|
||||
|
||||
public interface SarVPPSDao extends BaseMapper<SarVPPS> {
|
||||
|
||||
@Select("select id,pid,CONCAT(VPPS_CODE,CHINESE_NAME,ENGLISH_NAME) name,code from sar_vpps_tree where 1=1 and isnull(pid)")
|
||||
List<SarVPPS> findTreeAll();
|
||||
@Select("select id,pid,CONCAT(VPPS_CODE,CHINESE_NAME,ENGLISH_NAME) name,code from sar_vpps_tree where 1=1 and pid = #{pid}")
|
||||
List<SarVPPS> selectList(@Param("pid") String pid);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.adc.da.slrs.sarTree.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarModel对象", description="")
|
||||
public class SarModel extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String pid;
|
||||
|
||||
private String model;
|
||||
|
||||
private String features;
|
||||
|
||||
private String delFlag;
|
||||
|
||||
@Transient
|
||||
private List<SarModel> children;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.adc.da.slrs.sarTree.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarVPPS对象", description="")
|
||||
public class SarVPPS extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
private String vppsCode;
|
||||
|
||||
private String pid;
|
||||
|
||||
private String code;
|
||||
|
||||
private String chineseName;
|
||||
|
||||
private String englishName;
|
||||
|
||||
private String delFlag;
|
||||
|
||||
@Transient
|
||||
private List<SarVPPS> children;
|
||||
|
||||
@Transient
|
||||
private String name;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.adc.da.slrs.sarTree.service;
|
||||
|
||||
import com.adc.da.slrs.sarTree.entity.SarModel;
|
||||
import com.adc.da.slrs.sarTree.entity.SarVPPS;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SarModelService {
|
||||
|
||||
List<SarModel> findTreeAll();
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.adc.da.slrs.sarTree.service;
|
||||
|
||||
import com.adc.da.slrs.sarTree.entity.SarVPPS;
|
||||
import java.util.List;
|
||||
|
||||
public interface SarVPPSService {
|
||||
|
||||
List<SarVPPS> findTreeAll();
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.adc.da.slrs.sarTree.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarTree.dao.SarModelDao;
|
||||
import com.adc.da.slrs.sarTree.entity.SarModel;
|
||||
import com.adc.da.slrs.sarTree.service.SarModelService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class SarModelServiceImpl implements SarModelService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(SarModelServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private SarModelDao sarModelDao;
|
||||
|
||||
@Override
|
||||
public List<SarModel> findTreeAll() {
|
||||
//查询父级都为null的数据
|
||||
List<SarModel> sarVppsList = sarModelDao.findTreeAll();
|
||||
for (SarModel sarVppsOne : sarVppsList) {
|
||||
sarVppsOne.setChildren(getChildren(sarVppsOne));
|
||||
}
|
||||
return sarVppsList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归调用获取子节点
|
||||
*
|
||||
* @param parent:父节点
|
||||
* @return List<TsResource>
|
||||
*/
|
||||
private List<SarModel> getChildren(SarModel parent) {
|
||||
String pid = parent.getId();
|
||||
List<SarModel> children = sarModelDao.selectList(pid);
|
||||
for (SarModel sarVppsOne : children) {
|
||||
sarVppsOne.setChildren(getChildren((sarVppsOne)));
|
||||
}
|
||||
return children;
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.adc.da.slrs.sarTree.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarTree.dao.SarVPPSDao;
|
||||
import com.adc.da.slrs.sarTree.entity.SarVPPS;
|
||||
import com.adc.da.slrs.sarTree.service.SarVPPSService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class SarVPPSServiceImpl implements SarVPPSService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(SarVPPSServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private SarVPPSDao sarVPPSDao;
|
||||
|
||||
@Override
|
||||
public List<SarVPPS> findTreeAll() {
|
||||
//查询父级都为null的数据
|
||||
List<SarVPPS> sarVppsList = sarVPPSDao.findTreeAll();
|
||||
for (SarVPPS sarVppsOne:sarVppsList) {
|
||||
sarVppsOne.setChildren(getChildren(sarVppsOne));
|
||||
}
|
||||
return sarVppsList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归调用获取子节点
|
||||
* @param parent:父节点
|
||||
* @return List<TsResource>
|
||||
*/
|
||||
private List<SarVPPS> getChildren(SarVPPS parent){
|
||||
String pid = parent.getId();
|
||||
List<SarVPPS> children = sarVPPSDao.selectList(pid);
|
||||
for(SarVPPS sarVppsOne:children){
|
||||
sarVppsOne.setChildren(getChildren((sarVppsOne)));
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
}
|
||||
+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>
|
||||
Reference in New Issue
Block a user