zhangy il y a 2 ans
Parent
commit
f986a9a5e5
17 fichiers modifiés avec 1894 ajouts et 6 suppressions
  1. 1 1
      src/main/java/com/steerinfo/ems/emsprodplanround/controller/EmsProdplanRoundController.java
  2. 314 0
      src/main/java/com/steerinfo/ems/emssafeinfo/controller/EmsSafeinfoController.java
  3. 10 0
      src/main/java/com/steerinfo/ems/emssafeinfo/mapper/EmsSafeinfoMapper.java
  4. 369 0
      src/main/java/com/steerinfo/ems/emssafeinfo/mapper/EmsSafeinfoMapper.xml
  5. 182 0
      src/main/java/com/steerinfo/ems/emssafeinfo/model/EmsSafeinfo.java
  6. 30 0
      src/main/java/com/steerinfo/ems/emssafeinfo/service/IEmsSafeinfoService.java
  7. 107 0
      src/main/java/com/steerinfo/ems/emssafeinfo/service/impl/EmsSafeinfoServiceImpl.java
  8. 127 0
      src/main/java/com/steerinfo/ems/emssecuernode/controller/EmsSecuerNodeController.java
  9. 18 0
      src/main/java/com/steerinfo/ems/emssecuernode/mapper/EmsSecuerNodeMapper.java
  10. 373 0
      src/main/java/com/steerinfo/ems/emssecuernode/mapper/EmsSecuerNodeMapper.xml
  11. 211 0
      src/main/java/com/steerinfo/ems/emssecuernode/model/EmsSecuerNode.java
  12. 28 0
      src/main/java/com/steerinfo/ems/emssecuernode/service/IEmsSecuerNodeService.java
  13. 84 0
      src/main/java/com/steerinfo/ems/emssecuernode/service/impl/EmsSecuerNodeServiceImpl.java
  14. 1 1
      src/main/java/com/steerinfo/ems/trmcalpoint/service/impl/TRmCalpointServiceImpl.java
  15. 36 1
      src/main/java/com/steerinfo/ftp/uploadfile/controller/UploadFileController.java
  16. 1 1
      src/main/java/com/steerinfo/ftp/uploadfile/utils/POIExcelToHtml.java
  17. 2 2
      src/main/java/com/steerinfo/ftp/uploadfile/utils/POIPptToHtml.java

+ 1 - 1
src/main/java/com/steerinfo/ems/emsprodplanround/controller/EmsProdplanRoundController.java

@@ -77,7 +77,7 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
         PageList<EmsProdplanRound> list = emsProdplanRoundService.queryLikeForPage(parmas, pageNum, pageSize);
         return success(list);
     }
-    
+
     @ApiOperation(value="创建", notes="根据EmsProdplanRound对象创建")
     @ApiImplicitParam(name = "emsProdplanRound", value = "详细实体emsProdplanRound", required = true, dataType = "EmsProdplanRound")
     @PostMapping(value = "/")

+ 314 - 0
src/main/java/com/steerinfo/ems/emssafeinfo/controller/EmsSafeinfoController.java

@@ -0,0 +1,314 @@
+package com.steerinfo.ems.emssafeinfo.controller;
+
+import com.steerinfo.auth.utils.JwtUtil;
+import com.steerinfo.ems.Utils.DateUtils;
+import com.steerinfo.ems.emssafeinfo.mapper.EmsSafeinfoMapper;
+import com.steerinfo.ems.emssafeinfo.model.EmsSafeinfo;
+import com.steerinfo.ems.emssafeinfo.service.IEmsSafeinfoService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.framework.utils.text.Charsets;
+import com.steerinfo.ftp.uploadfile.utils.IDutils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * EmsSafeinfo RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-04-24 10:51
+ * 类描述
+ * 修订历史:
+ * 日期:2023-04-24
+ * 作者:generator
+ * 参考:
+ * 描述:EmsSafeinfo RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/emssafeinfos")
+public class EmsSafeinfoController extends BaseRESTfulController {
+
+    @Autowired
+    IEmsSafeinfoService emsSafeinfoService;
+
+    @Autowired
+    EmsSafeinfoMapper emsSafeinfoMapper;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emssafeinfo:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsSafeinfo> list = emsSafeinfoService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emssafeinfo:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsSafeinfo> list = emsSafeinfoService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据EmsSafeinfo对象创建")
+    @ApiImplicitParam(name = "emsSafeinfo", value = "详细实体emsSafeinfo", required = true, dataType = "EmsSafeinfo")
+    //@RequiresPermissions("emssafeinfo:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute EmsSafeinfo model){
+
+        String selectmaxid = emsSafeinfoMapper.selectmaxid();
+        if(selectmaxid == null){
+            String qqq="AQ"+DateUtils.getCurrentTime("yyyyMMdd")+"0001";
+            model.setId(qqq);
+        }else {
+            String id1 = selectmaxid.substring(10,14);
+
+            int maxid = Integer.parseInt(id1);
+            int maxid2=maxid+1;
+            String  newmaxid ="AQ"+DateUtils.getCurrentTime("yyyyMMdd")+ String.format("%04d", maxid2);
+            model.setId(newmaxid);
+        }
+
+        model.setCreatetime(DateUtils.getCurrentTime("yyyy-MM-dd HH:mm:ss"));
+        model.setCreateman(JwtUtil.getUseridByToken());
+        EmsSafeinfo emsSafeinfo = emsSafeinfoService.add(model);
+        return success(emsSafeinfo);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short")
+    //@RequiresPermissions("emssafeinfo:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable Short id){
+        EmsSafeinfo emsSafeinfo = emsSafeinfoService.getById(id);
+        return success(emsSafeinfo);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsSafeinfo信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short"),
+        @ApiImplicitParam(name = "emsSafeinfo", value = "详细实体emsSafeinfo", required = true, dataType = "EmsSafeinfo")
+    })
+    //@RequiresPermissions("emssafeinfo:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody EmsSafeinfo model){
+        model.setId(id);
+        model.setUpdateman(DateUtils.getCurrentTime("yyyy-MM-dd HH:mm:ss"));
+        model.setUpdatetime(JwtUtil.getUseridByToken());
+        EmsSafeinfo emsSafeinfo = emsSafeinfoService.modify(model);
+        return success(emsSafeinfo);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short")
+    //@RequiresPermissions("emssafeinfo:delete")
+    @DeleteMapping(value = "/{id}")//Short
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<Short> ids = ListUtils.convertList(list);
+			  emsSafeinfoService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value="excel导入数据", notes="根据上传的excel导入数据")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short")
+    @PostMapping("/insertExcel")
+    public RESTfulResult insertExcel (String fileName, MultipartFile file) throws Exception {
+        RESTfulResult R = new RESTfulResult();
+        List<EmsSafeinfo> list = emsSafeinfoService.batchImport(fileName, file);
+        List<EmsSafeinfo> list2 = new ArrayList<>();
+        for (EmsSafeinfo e: list
+             ) {
+             e.setId("AQ"+IDutils.getImageName());
+             e.setCreateman(JwtUtil.getUseridByToken());
+             e.setCreatetime(DateUtils.getCurrentTime("yyyy-MM-dd HH:mm:ss"));
+            list2.add(e);
+        }
+        int res = emsSafeinfoService.batchAdd(list2);
+        if (res>0){
+            R.setCode("200");
+            return  success(R);
+        }else {
+            return failed();
+        }
+
+    }
+    @GetMapping("/downloadExcel")
+    public void downloadExcel(HttpServletResponse response,@RequestParam HashMap parmas) throws IOException {
+        List<EmsSafeinfo> list = emsSafeinfoService.getList(parmas);
+
+                if (list.size()>0){
+                    OutputStream out = null;
+                    InputStream is = null;
+                    //创建Excel文件
+                    Workbook wb = new XSSFWorkbook();
+                    //生成sheet
+                    Sheet sheet = wb.createSheet("sheet1");
+                    //创建行
+                    Row row = null;
+                    //创建列
+                    Cell cell = null;
+                    //创建表头单元格样式
+                    CellStyle cs_header = wb.createCellStyle();
+                    //设置字体样式
+                    Font boldFont = wb.createFont();
+                    //设置文字类型
+                    boldFont.setFontName("宋体");
+                    //设置加粗
+                    boldFont.setBold(true);
+                    //设置文字大小
+                    boldFont.setFontHeightInPoints((short) 16);
+                    //应用设置的字体
+                    cs_header.setFont(boldFont);
+                    //设置边框下、左、右、上
+                    cs_header.setBorderBottom(BorderStyle.THIN);
+                    cs_header.setBorderLeft(BorderStyle.THIN);
+                    cs_header.setBorderRight(BorderStyle.THIN);
+                    cs_header.setBorderTop(BorderStyle.THIN);
+                    //水平居中
+                    cs_header.setAlignment(HorizontalAlignment.CENTER);
+                    //垂直居中
+                    cs_header.setVerticalAlignment(VerticalAlignment.CENTER);
+                    //前景填充色
+                    cs_header.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.index);
+                    //设置前景填充样式
+                    cs_header.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+                    //设置标题
+                    row = sheet.createRow(0);
+                    //设置单元格行高
+                    row.setHeightInPoints(24);
+                    //设置标题
+                    String[] headers=new String[]{
+                            "日期","类型","地点","ID","内容","创建时间","创建人","修改时间","修改人","备注"
+                    };
+                    //逐个设置标题样式
+                    for (int i = 0; i < headers.length; i++) {
+                        //创建单元格
+                        cell = row.createCell(i);
+                        //设置单元格内容
+                        cell.setCellValue(headers[i]);
+                        //设置单元格样式
+                        cell.setCellStyle(cs_header);
+                    }
+                    //创建文本单元格样式
+                    CellStyle cs_text = wb.createCellStyle();
+                    //创建文字设置
+                    Font textFont = wb.createFont();
+                    //设置文字类型
+                    textFont.setFontName("Consolas");
+                    //设置文字大小
+                    textFont.setFontHeightInPoints((short) 10);
+                    //应用设置
+                    cs_text.setFont(textFont);
+                    //设置边框
+                    cs_text.setBorderBottom(BorderStyle.THIN);
+                    cs_text.setBorderLeft(BorderStyle.THIN);
+                    cs_text.setBorderRight(BorderStyle.THIN);
+                    cs_text.setBorderTop(BorderStyle.THIN);
+                    //水平居中
+                    cs_text.setAlignment(HorizontalAlignment.CENTER);
+                    //垂直居中
+                    cs_text.setVerticalAlignment(VerticalAlignment.CENTER);
+                    //调取数据
+
+                    //记录总共多少列(由于接口查询出来的实体类集合,所以不好循环,使用)
+                    Integer cellSum = 10;
+                    //将数据写入表格
+                    for(int i=0; i<list.size(); i++){
+                        //将实体类集合转成string数组,通过‘,’,获取总共多少列
+//                        String[] split = list.get(i).toString().split(",");
+//                        cellSum=split.length;
+                        //创建行,由于0行是标题,所以+1
+                        row = sheet.createRow(i+1);
+                        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
+                        //实体类集合不太好循环,所以逐一设置,如果是其他则可使用for循环
+                        EmsSafeinfo wpa = (EmsSafeinfo) list.get(i);
+                        row.createCell(0).setCellValue(wpa.getDates()!=null?wpa.getDates():df.format(Calendar.getInstance().getTime()));
+                        row.createCell(1).setCellValue(wpa.getType()!=null?wpa.getType():"暂无");
+                        row.createCell(2).setCellValue(wpa.getProcess()!=null?wpa.getProcess():"暂无");
+                        row.createCell(3).setCellValue(wpa.getId()!=null?wpa.getId():"暂无");
+                        row.createCell(4).setCellValue(wpa.getContent()!=null?wpa.getContent():"暂无");
+                        row.createCell(5).setCellValue(wpa.getCreatetime()!=null?wpa.getCreatetime():"暂无");
+                        row.createCell(6).setCellValue(wpa.getCreateman()!=null?wpa.getCreateman():"暂无");
+                        row.createCell(7).setCellValue(wpa.getUpdatetime()!=null?wpa.getUpdatetime():"暂无");
+                        row.createCell(8).setCellValue(wpa.getUpdateman()!=null?wpa.getUpdateman():"暂无");
+                        row.createCell(9).setCellValue(wpa.getMemo()!=null?wpa.getMemo():"暂无");
+                        //为每一个单元格设置样式
+                        for (int j=0;j<cellSum;j++){
+                            row.getCell(j).setCellStyle(cs_text);
+                        }
+                    }
+                    //合并单元格,横向
+                    sheet.addMergedRegionUnsafe(new CellRangeAddress(0, 0, 11, 12));
+                    sheet.addMergedRegionUnsafe(new CellRangeAddress(1,1,3,4));
+                    //竖着合并
+                    sheet.addMergedRegionUnsafe(new CellRangeAddress(1,list.size(),4,4));
+                    //设置单元格宽度自适应
+                    for (int i = 0; i <= cellSum; i++)
+                    {
+                        sheet.autoSizeColumn((short)i,true); //自动调整列宽
+                    }
+                    //设置中文文件名称
+                    int year = Calendar.getInstance().get(Calendar.YEAR);
+                    String fileName = year+"";
+//                    response.reset();
+//                    //浏览器默认服务器传过去的是html,不是excel文件
+//                    //设置响应类型:传输内容是流,并支持中文
+//                    response.setContentType("application/vnd.ms-excel");
+//                    response.setCharacterEncoding("utf-8");
+//                    //设置响应头信息header,下载时以文件附件下载
+//                    response.setHeader("Content-Disposition", "attachment;filename="+new String(fileName.getBytes("gbk"), "iso8859-1")+".xlsx");
+//                    //输出流对象
+//                    wb.write(out);
+//                    wb.close();
+                    String transferName = new String(fileName.getBytes(Charsets.UTF_8),Charsets.ISO_8859_1);
+
+                    out = response.getOutputStream();
+                    response.setCharacterEncoding("UTF-8");
+                    response.setContentType("multipart/form-data;charset=UTF-8");
+                   // response.setContentType("application/vnd.ms-excel");
+                   // response.setHeader("Content-Disposition", "attachment; filename=\"" + transferName + "\"");
+                    response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+                    response.setHeader("Content-Disposition", "attachment;filename="+new String(fileName.getBytes("gbk"), "iso8859-1")+".xlsx");
+                    wb.write(out);
+                    wb.close();
+                    out.flush();
+                    out.close();
+
+            }else {
+                   //return failed();
+                }
+            //强制刷新
+    }
+
+
+}

+ 10 - 0
src/main/java/com/steerinfo/ems/emssafeinfo/mapper/EmsSafeinfoMapper.java

@@ -0,0 +1,10 @@
+package com.steerinfo.ems.emssafeinfo.mapper;
+
+import com.steerinfo.ems.emssafeinfo.model.EmsSafeinfo;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface EmsSafeinfoMapper extends IBaseMapper<EmsSafeinfo, Short> {
+    String selectmaxid();
+}

+ 369 - 0
src/main/java/com/steerinfo/ems/emssafeinfo/mapper/EmsSafeinfoMapper.xml

@@ -0,0 +1,369 @@
+<?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.steerinfo.ems.emssafeinfo.mapper.EmsSafeinfoMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.emssafeinfo.model.EmsSafeinfo">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="PROCESS" jdbcType="VARCHAR" property="process" />
+    <result column="CREATEMAN" jdbcType="VARCHAR" property="createman" />
+    <result column="CREATETIME" jdbcType="VARCHAR" property="createtime" />
+    <result column="UPDATEMAN" jdbcType="VARCHAR" property="updateman" />
+    <result column="UPDATETIME" jdbcType="VARCHAR" property="updatetime" />
+    <result column="CONTENT" jdbcType="VARCHAR" property="content" />
+    <result column="FILENAME" jdbcType="VARCHAR" property="filename" />
+    <result column="TYPE" jdbcType="VARCHAR" property="type" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="DATES" jdbcType="VARCHAR" property="dates" />
+  </resultMap>
+  <sql id="columns">
+    ID, PROCESS, CREATEMAN, CREATETIME, UPDATEMAN, UPDATETIME, CONTENT, FILENAME, TYPE, 
+    MEMO,DATES
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.PROCESS, t.CREATEMAN, t.CREATETIME, t.UPDATEMAN, t.UPDATETIME, t.CONTENT, 
+    t.FILENAME, t.TYPE, t.MEMO,t.DATES
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM EMS_SAFEINFO
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM EMS_SAFEINFO t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null">
+        and ID = #{id}
+      </if>
+      <if test="process != null and process != ''">
+        and PROCESS = #{process}
+      </if>
+      <if test="createman != null and createman != ''">
+        and CREATEMAN = #{createman}
+      </if>
+      <if test="createtime != null and createtime != ''">
+        and CREATETIME = #{createtime}
+      </if>
+      <if test="updateman != null and updateman != ''">
+        and UPDATEMAN = #{updateman}
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        and UPDATETIME = #{updatetime}
+      </if>
+      <if test="content != null and content != ''">
+        and CONTENT = #{content}
+      </if>
+      <if test="filename != null and filename != ''">
+        and FILENAME = #{filename}
+      </if>
+      <if test="type != null and type != ''">
+        and TYPE = #{type}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </if>
+      <if test="dates != null and dates != ''">
+        and DATES BETWEEN #{dates} and #{dates2}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null">
+        and ID = #{id}
+      </if>
+      <if test="process != null and process != ''">
+        and PROCESS LIKE '%${process}%'
+      </if>
+      <if test="createman != null and createman != ''">
+        and CREATEMAN LIKE '%${createman}%'
+      </if>
+      <if test="createtime != null and createtime != ''">
+        and CREATETIME LIKE '%${createtime}%'
+      </if>
+      <if test="updateman != null and updateman != ''">
+        and UPDATEMAN LIKE '%${updateman}%'
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        and UPDATETIME LIKE '%${updatetime}%'
+      </if>
+      <if test="content != null and content != ''">
+        and CONTENT LIKE '%${content}%'
+      </if>
+      <if test="filename != null and filename != ''">
+        and FILENAME LIKE '%${filename}%'
+      </if>
+      <if test="type != null and type != ''">
+        and TYPE LIKE '%${type}%'
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+      <if test="dates != null and dates != ''">
+        and DATES LIKE '%${dates}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="string">
+    delete from EMS_SAFEINFO
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from EMS_SAFEINFO
+    where 1!=1 
+      <if test="process != null and process != ''">
+        or PROCESS = #{process}
+      </if>
+      <if test="createman != null and createman != ''">
+        or CREATEMAN = #{createman}
+      </if>
+      <if test="createtime != null and createtime != ''">
+        or CREATETIME = #{createtime}
+      </if>
+      <if test="updateman != null and updateman != ''">
+        or UPDATEMAN = #{updateman}
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        or UPDATETIME = #{updatetime}
+      </if>
+      <if test="content != null and content != ''">
+        or CONTENT = #{content}
+      </if>
+      <if test="filename != null and filename != ''">
+        or FILENAME = #{filename}
+      </if>
+      <if test="type != null and type != ''">
+        or TYPE = #{type}
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </if>
+    <if test="dates != null and dates != ''">
+      or DATES = #{dates}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.emssafeinfo.model.EmsSafeinfo">
+    insert into EMS_SAFEINFO (ID, PROCESS, CREATEMAN, 
+      CREATETIME, UPDATEMAN, UPDATETIME, 
+      CONTENT, FILENAME, TYPE, 
+      MEMO,DATES)
+    values (#{id,jdbcType=DECIMAL}, #{process,jdbcType=VARCHAR}, #{createman,jdbcType=VARCHAR}, 
+      #{createtime,jdbcType=VARCHAR}, #{updateman,jdbcType=VARCHAR}, #{updatetime,jdbcType=VARCHAR}, 
+      #{content,jdbcType=VARCHAR}, #{filename,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, 
+      #{memo,jdbcType=VARCHAR},#{dates,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.emssafeinfo.model.EmsSafeinfo">
+    insert into EMS_SAFEINFO
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="process != null">
+        PROCESS,
+      </if>
+      <if test="createman != null">
+        CREATEMAN,
+      </if>
+      <if test="createtime != null">
+        CREATETIME,
+      </if>
+      <if test="updateman != null">
+        UPDATEMAN,
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME,
+      </if>
+      <if test="content != null">
+        CONTENT,
+      </if>
+      <if test="filename != null">
+        FILENAME,
+      </if>
+      <if test="type != null">
+        TYPE,
+      </if>
+      <if test="memo != null">
+        MEMO,
+      </if>
+      <if test="dates != null">
+        DATES,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="process != null">
+        #{process,jdbcType=VARCHAR},
+      </if>
+      <if test="createman != null">
+        #{createman,jdbcType=VARCHAR},
+      </if>
+      <if test="createtime != null">
+        #{createtime,jdbcType=VARCHAR},
+      </if>
+      <if test="updateman != null">
+        #{updateman,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetime != null">
+        #{updatetime,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="filename != null">
+        #{filename,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=VARCHAR},
+      </if>
+      <if test="memo != null">
+        #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="memo != null">
+        #{dates,jdbcType=VARCHAR}
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emssafeinfo.model.EmsSafeinfo">
+    update EMS_SAFEINFO
+    set PROCESS = #{process,jdbcType=VARCHAR},
+      CREATEMAN = #{createman,jdbcType=VARCHAR},
+      CREATETIME = #{createtime,jdbcType=VARCHAR},
+      UPDATEMAN = #{updateman,jdbcType=VARCHAR},
+      UPDATETIME = #{updatetime,jdbcType=VARCHAR},
+      CONTENT = #{content,jdbcType=VARCHAR},
+      FILENAME = #{filename,jdbcType=VARCHAR},
+      TYPE = #{type,jdbcType=VARCHAR},
+      MEMO = #{memo,jdbcType=VARCHAR},
+        DATES = #{dates,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emssafeinfo.model.EmsSafeinfo">
+    update EMS_SAFEINFO
+    <set>
+      <if test="process != null">
+        PROCESS = #{process,jdbcType=VARCHAR},
+      </if>
+      <if test="createman != null">
+        CREATEMAN = #{createman,jdbcType=VARCHAR},
+      </if>
+      <if test="createtime != null">
+        CREATETIME = #{createtime,jdbcType=VARCHAR},
+      </if>
+      <if test="updateman != null">
+        UPDATEMAN = #{updateman,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME = #{updatetime,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        CONTENT = #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="filename != null">
+        FILENAME = #{filename,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        TYPE = #{type,jdbcType=VARCHAR},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="dates != null">
+        DATES = #{dates,jdbcType=VARCHAR}
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="string" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into EMS_SAFEINFO 
+      (ID, 
+      PROCESS, CREATEMAN, CREATETIME, 
+      UPDATEMAN, UPDATETIME, CONTENT, 
+      FILENAME, TYPE, MEMO,DATES
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=DECIMAL}, 
+      #{item.process,jdbcType=VARCHAR}, #{item.createman,jdbcType=VARCHAR}, #{item.createtime,jdbcType=VARCHAR}, 
+      #{item.updateman,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=VARCHAR}, #{item.content,jdbcType=VARCHAR}, 
+      #{item.filename,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR,},#{item.dates,jdbcType=VARCHAR}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update EMS_SAFEINFO
+     set
+       ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.id,jdbcType=DECIMAL}
+       </foreach>
+       ,PROCESS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.process,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATEMAN=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.createman,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.createtime,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATEMAN=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.updateman,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.updatetime,jdbcType=VARCHAR}
+       </foreach>
+       ,CONTENT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.content,jdbcType=VARCHAR}
+       </foreach>
+       ,FILENAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.filename,jdbcType=VARCHAR}
+       </foreach>
+       ,TYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.type,jdbcType=VARCHAR}
+       </foreach>
+       ,MEMO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+    ,DATES=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+      when #{item.id,jdbcType=DECIMAL} then #{item.dates,jdbcType=VARCHAR}
+    </foreach>
+
+     where ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.id,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from EMS_SAFEINFO
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="selectmaxid" resultType="string">
+     select max(t.id) as maxid from EMS_SAFEINFO t
+  </select>
+</mapper>

+ 182 - 0
src/main/java/com/steerinfo/ems/emssafeinfo/model/EmsSafeinfo.java

@@ -0,0 +1,182 @@
+package com.steerinfo.ems.emssafeinfo.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(value="null")
+public class EmsSafeinfo implements IBasePO<String> {
+    @ApiModelProperty(value="",required=true)
+    private String id;
+
+    /**
+     * 工序(PROCESS,VARCHAR,10)
+     */
+    @ApiModelProperty(value="工序",required=false)
+    private String process;
+
+    /**
+     * 创建人(CREATEMAN,VARCHAR,10)
+     */
+    @ApiModelProperty(value="创建人",required=false)
+    private String createman;
+
+    /**
+     * 创建时间(CREATETIME,VARCHAR,10)
+     */
+    @ApiModelProperty(value="创建时间",required=false)
+    private String createtime;
+
+    /**
+     * 修改人(UPDATEMAN,VARCHAR,10)
+     */
+    @ApiModelProperty(value="修改人",required=false)
+    private String updateman;
+
+    /**
+     * 修改时间(UPDATETIME,VARCHAR,10)
+     */
+    @ApiModelProperty(value="修改时间",required=false)
+    private String updatetime;
+
+    /**
+     * 内容(CONTENT,VARCHAR,100)
+     */
+    @ApiModelProperty(value="内容",required=false)
+    private String content;
+
+    /**
+     * 文件名(FILENAME,VARCHAR,50)
+     */
+    @ApiModelProperty(value="文件名",required=false)
+    private String filename;
+
+    /**
+     * 类型(TYPE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="类型",required=false)
+    private String type;
+
+    /**
+     * 备注(MEMO,VARCHAR,100)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String memo;
+
+    public String getDates() {
+        return dates;
+    }
+
+    public void setDates(String dates) {
+        this.dates = dates;
+    }
+
+    /**
+     * 备注(MEMO,VARCHAR,100)
+     */
+    @ApiModelProperty(value="日期",required=false)
+    private String dates;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getProcess() {
+        return process;
+    }
+
+    public void setProcess(String process) {
+        this.process = process == null ? null : process.trim();
+    }
+
+    public String getCreateman() {
+        return createman;
+    }
+
+    public void setCreateman(String createman) {
+        this.createman = createman == null ? null : createman.trim();
+    }
+
+    public String getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(String createtime) {
+        this.createtime = createtime == null ? null : createtime.trim();
+    }
+
+    public String getUpdateman() {
+        return updateman;
+    }
+
+    public void setUpdateman(String updateman) {
+        this.updateman = updateman == null ? null : updateman.trim();
+    }
+
+    public String getUpdatetime() {
+        return updatetime;
+    }
+
+    public void setUpdatetime(String updatetime) {
+        this.updatetime = updatetime == null ? null : updatetime.trim();
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content == null ? null : content.trim();
+    }
+
+    public String getFilename() {
+        return filename;
+    }
+
+    public void setFilename(String filename) {
+        this.filename = filename == null ? null : filename.trim();
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type == null ? null : type.trim();
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", process=").append(process);
+        sb.append(", createman=").append(createman);
+        sb.append(", createtime=").append(createtime);
+        sb.append(", updateman=").append(updateman);
+        sb.append(", updatetime=").append(updatetime);
+        sb.append(", content=").append(content);
+        sb.append(", filename=").append(filename);
+        sb.append(", type=").append(type);
+        sb.append(", memo=").append(memo);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 30 - 0
src/main/java/com/steerinfo/ems/emssafeinfo/service/IEmsSafeinfoService.java

@@ -0,0 +1,30 @@
+package com.steerinfo.ems.emssafeinfo.service;
+
+import com.steerinfo.ems.emssafeinfo.model.EmsSafeinfo;
+import com.steerinfo.framework.service.IBaseService;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * EmsSafeinfo服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-04-24 10:51
+ * 类描述
+ * 修订历史:
+ * 日期:2023-04-24
+ * 作者:generator
+ * 参考:
+ * 描述:EmsSafeinfo服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IEmsSafeinfoService extends IBaseService<EmsSafeinfo, Short>{
+    List<EmsSafeinfo> batchImport(String fileName, MultipartFile file) throws Exception;
+
+    List<EmsSafeinfo> getList(Map<String, Object> parameters);
+
+
+
+}

+ 107 - 0
src/main/java/com/steerinfo/ems/emssafeinfo/service/impl/EmsSafeinfoServiceImpl.java

@@ -0,0 +1,107 @@
+package com.steerinfo.ems.emssafeinfo.service.impl;
+
+import com.steerinfo.ems.Utils.ExcelToolUtils;
+import com.steerinfo.ems.emssafeinfo.mapper.EmsSafeinfoMapper;
+import com.steerinfo.ems.emssafeinfo.model.EmsSafeinfo;
+import com.steerinfo.ems.emssafeinfo.service.IEmsSafeinfoService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * EmsSafeinfo服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-04-24 10:51
+ * 类描述
+ * 修订历史:
+ * 日期:2023-04-24
+ * 作者:generator
+ * 参考:
+ * 描述:EmsSafeinfo服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "emsSafeinfoService")
+@Transactional(rollbackFor=Exception.class)
+public class EmsSafeinfoServiceImpl extends BaseServiceImpl<EmsSafeinfo, Short> implements IEmsSafeinfoService {
+
+    @Autowired
+    private EmsSafeinfoMapper emsSafeinfoMapper;
+
+    @Override
+    protected IBaseMapper<EmsSafeinfo, Short> getMapper() {
+        return emsSafeinfoMapper;
+    }
+
+    @Override
+    public List<EmsSafeinfo> batchImport(String fileName, MultipartFile file) throws Exception {
+        String year = fileName.substring(0,4);
+        InputStream inputStream = file.getInputStream();
+        List<List<String[]>> list = ExcelToolUtils.parseExcels(inputStream, fileName, 0);
+        List<EmsSafeinfo>emsSafeinfoList = new ArrayList<>();
+
+        for (int i = 0; i < list.size(); i++) {
+            String[] arr2 = list.get(i).get(1);
+            for (int j = 1; j < list.get(i).size(); j++) {
+                EmsSafeinfo emsSafeinfo= new EmsSafeinfo();
+                String[] arr = list.get(i).get(j);
+                String[] arr1 = list.get(i).get(0);
+                for (int k = 1; k < arr1.length; k++) {
+
+                    if (arr1[k].trim().indexOf("序号")!=-1){
+
+                    }
+                    else if (arr1[k].trim().indexOf("日期")!=-1){
+                         emsSafeinfo.setDates(arr[k].trim());
+                     }else  if (arr1[k].trim().indexOf("工序")!=-1) {
+                            emsSafeinfo.setProcess(arr[k].trim());
+
+                        }else  if(arr1[k].trim().indexOf("地点")!=-1) {
+                        emsSafeinfo.setProcess(arr[k].trim());
+
+                    }
+                    else if(arr1[k].trim().indexOf("内容")!=-1){
+                         emsSafeinfo.setContent(arr[k].trim());
+
+                     }else if(arr1[k].trim().indexOf("备注")!=-1){
+                         emsSafeinfo.setMemo(arr[k].trim());
+
+                     }
+                }
+                emsSafeinfoList.add(emsSafeinfo);
+            }
+        }
+        if (emsSafeinfoList.size()>0){
+
+            return emsSafeinfoList;
+        }else {
+            return null;
+        }
+    }
+
+    @Override
+    public List<EmsSafeinfo> getList(Map<String, Object> parameters) {
+        List<EmsSafeinfo> list = this.getMapper().selectByParameters(parameters);
+        return list;
+    }
+}

+ 127 - 0
src/main/java/com/steerinfo/ems/emssecuernode/controller/EmsSecuerNodeController.java

@@ -0,0 +1,127 @@
+package com.steerinfo.ems.emssecuernode.controller;
+
+import com.steerinfo.ems.Utils.DateUtils;
+import com.steerinfo.ems.emssecuernode.model.EmsSecuerNode;
+import com.steerinfo.ems.emssecuernode.service.IEmsSecuerNodeService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * EmsSecuerNode RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-04-20 03:07
+ * 类描述
+ * 修订历史:
+ * 日期:2023-04-20
+ * 作者:generator
+ * 参考:
+ * 描述:EmsSecuerNode RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/emssecuernodes")
+public class EmsSecuerNodeController extends BaseRESTfulController {
+
+    @Autowired
+    IEmsSecuerNodeService emsSecuerNodeService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emssecuernode:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsSecuerNode> list = emsSecuerNodeService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emssecuernode:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsSecuerNode> list = emsSecuerNodeService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据EmsSecuerNode对象创建")
+    @ApiImplicitParam(name = "emsSecuerNode", value = "详细实体emsSecuerNode", required = true, dataType = "EmsSecuerNode")
+    //@RequiresPermissions("emssecuernode:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute EmsSecuerNode model){
+        String createTime= DateUtils.getCurrentTime("yyyy-MM-dd HH:mm:ss");
+            model.setItemstatus((short) 100);
+            model.setItemtype((short) 100);
+        model.setCreatetime(createTime);
+        model.setId(UUID.randomUUID().toString().trim());
+        EmsSecuerNode emsSecuerNode = emsSecuerNodeService.add(model);
+        return success(emsSecuerNode);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("emssecuernode:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        EmsSecuerNode emsSecuerNode = emsSecuerNodeService.getById(id);
+        return success(emsSecuerNode);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsSecuerNode信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "emsSecuerNode", value = "详细实体emsSecuerNode", required = true, dataType = "EmsSecuerNode")
+    })
+    //@RequiresPermissions("emssecuernode:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody EmsSecuerNode model){
+        model.setId(id);
+        EmsSecuerNode emsSecuerNode = emsSecuerNodeService.modify(model);
+        return success(emsSecuerNode);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("emssecuernode:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  emsSecuerNodeService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value="查询节点结构", notes="全部查询")
+    @PostMapping(value = "/findAll")
+    public RESTfulResult findAll(){
+        List<EmsSecuerNode> list = emsSecuerNodeService.getNode();
+        return success(list);
+    }
+
+    @ApiOperation(value="根据id和层级查询节点结构", notes="全部查询")
+    @PostMapping(value = "/findIDAll")
+    public RESTfulResult findIdAll(@RequestBody String id,Short tlevel){
+        List<EmsSecuerNode> list = emsSecuerNodeService.getIDNode(id,tlevel);
+        return success(list);
+    }
+
+}

+ 18 - 0
src/main/java/com/steerinfo/ems/emssecuernode/mapper/EmsSecuerNodeMapper.java

@@ -0,0 +1,18 @@
+package com.steerinfo.ems.emssecuernode.mapper;
+
+import com.steerinfo.ems.emssecuernode.model.EmsSecuerNode;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface EmsSecuerNodeMapper extends IBaseMapper<EmsSecuerNode, String> {
+
+   List<EmsSecuerNode> findAll();
+
+   List<EmsSecuerNode> findnodeId(String id);
+
+
+
+}

+ 373 - 0
src/main/java/com/steerinfo/ems/emssecuernode/mapper/EmsSecuerNodeMapper.xml

@@ -0,0 +1,373 @@
+<?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.steerinfo.ems.emssecuernode.mapper.EmsSecuerNodeMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.emssecuernode.model.EmsSecuerNode">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="USERNAME" jdbcType="VARCHAR" property="username" />
+    <result column="ITEMSTATUS" jdbcType="DECIMAL" property="itemstatus" />
+    <result column="ITEMTYPE" jdbcType="DECIMAL" property="itemtype" />
+    <result column="PARENTID" jdbcType="VARCHAR" property="parentid" />
+    <result column="NAME" jdbcType="VARCHAR" property="name" />
+    <result column="EMPLOYEESTOTAL" jdbcType="DECIMAL" property="employeestotal" />
+    <result column="CREATETIME" jdbcType="VARCHAR" property="createtime" />
+    <result column="UPDATETIME" jdbcType="VARCHAR" property="updatetime" />
+    <result column="CONTENT" jdbcType="VARCHAR" property="content" />
+    <result column="TLEVEL" jdbcType="DECIMAL" property="tlevel" />
+    <result column="FILE_NAME" jdbcType="VARCHAR" property="file_name" />
+    <result column="FILE_URL" jdbcType="VARCHAR" property="file_url" />
+  </resultMap>
+  <sql id="columns">
+    ID, USERNAME, ITEMSTATUS, ITEMTYPE, PARENTID, NAME, EMPLOYEESTOTAL, CREATETIME, UPDATETIME, 
+    CONTENT, TLEVEL
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.USERNAME, t.ITEMSTATUS, t.ITEMTYPE, t.PARENTID, t.NAME, t.EMPLOYEESTOTAL, 
+    t.CREATETIME, t.UPDATETIME, t.CONTENT, t.TLEVEL
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM EMS_SECUER_NODE
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM EMS_SECUER_NODE t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID = #{id}
+      </if>
+      <if test="username != null and username != ''">
+        and USERNAME = #{username}
+      </if>
+      <if test="itemstatus != null">
+        and ITEMSTATUS = #{itemstatus}
+      </if>
+      <if test="itemtype != null">
+        and ITEMTYPE = #{itemtype}
+      </if>
+      <if test="parentid != null and parentid != ''">
+        and PARENTID = #{parentid}
+      </if>
+      <if test="name != null and name != ''">
+        and NAME = #{name}
+      </if>
+      <if test="employeestotal != null">
+        and EMPLOYEESTOTAL = #{employeestotal}
+      </if>
+      <if test="createtime != null and createtime != ''">
+        and CREATETIME = #{createtime}
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        and UPDATETIME = #{updatetime}
+      </if>
+      <if test="content != null and content != ''">
+        and CONTENT = #{content}
+      </if>
+      <if test="tlevel != null">
+        and TLEVEL = #{tlevel}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID LIKE '%${id}%'
+      </if>
+      <if test="username != null and username != ''">
+        and USERNAME LIKE '%${username}%'
+      </if>
+      <if test="itemstatus != null">
+        and ITEMSTATUS = #{itemstatus}
+      </if>
+      <if test="itemtype != null">
+        and ITEMTYPE = #{itemtype}
+      </if>
+      <if test="parentid != null and parentid != ''">
+        and PARENTID LIKE '%${parentid}%'
+      </if>
+      <if test="name != null and name != ''">
+        and NAME LIKE '%${name}%'
+      </if>
+      <if test="employeestotal != null">
+        and EMPLOYEESTOTAL = #{employeestotal}
+      </if>
+      <if test="createtime != null and createtime != ''">
+        and CREATETIME LIKE '%${createtime}%'
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        and UPDATETIME LIKE '%${updatetime}%'
+      </if>
+      <if test="content != null and content != ''">
+        and CONTENT LIKE '%${content}%'
+      </if>
+      <if test="tlevel != null">
+        and TLEVEL = #{tlevel}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from EMS_SECUER_NODE
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from EMS_SECUER_NODE
+    where 1!=1 
+      <if test="username != null and username != ''">
+        or USERNAME = #{username}
+      </if>
+      <if test="itemstatus != null">
+        or ITEMSTATUS = #{itemstatus}
+      </if>
+      <if test="itemtype != null">
+        or ITEMTYPE = #{itemtype}
+      </if>
+      <if test="parentid != null and parentid != ''">
+        or PARENTID = #{parentid}
+      </if>
+      <if test="name != null and name != ''">
+        or NAME = #{name}
+      </if>
+      <if test="employeestotal != null">
+        or EMPLOYEESTOTAL = #{employeestotal}
+      </if>
+      <if test="createtime != null and createtime != ''">
+        or CREATETIME = #{createtime}
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        or UPDATETIME = #{updatetime}
+      </if>
+      <if test="content != null and content != ''">
+        or CONTENT = #{content}
+      </if>
+      <if test="tlevel != null">
+        or TLEVEL = #{tlevel}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.emssecuernode.model.EmsSecuerNode">
+    insert into EMS_SECUER_NODE (ID, USERNAME, ITEMSTATUS, 
+      ITEMTYPE, PARENTID, NAME, 
+      EMPLOYEESTOTAL, CREATETIME, UPDATETIME, 
+      CONTENT, TLEVEL)
+    values (#{id,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{itemstatus,jdbcType=DECIMAL}, 
+      #{itemtype,jdbcType=DECIMAL}, #{parentid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{employeestotal,jdbcType=DECIMAL}, #{createtime,jdbcType=VARCHAR}, #{updatetime,jdbcType=VARCHAR}, 
+      #{content,jdbcType=VARCHAR}, #{tlevel,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.emssecuernode.model.EmsSecuerNode">
+    insert into EMS_SECUER_NODE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="username != null">
+        USERNAME,
+      </if>
+      <if test="itemstatus != null">
+        ITEMSTATUS,
+      </if>
+      <if test="itemtype != null">
+        ITEMTYPE,
+      </if>
+      <if test="parentid != null">
+        PARENTID,
+      </if>
+      <if test="name != null">
+        NAME,
+      </if>
+      <if test="employeestotal != null">
+        EMPLOYEESTOTAL,
+      </if>
+      <if test="createtime != null">
+        CREATETIME,
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME,
+      </if>
+      <if test="content != null">
+        CONTENT,
+      </if>
+      <if test="tlevel != null">
+        TLEVEL,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="username != null">
+        #{username,jdbcType=VARCHAR},
+      </if>
+      <if test="itemstatus != null">
+        #{itemstatus,jdbcType=DECIMAL},
+      </if>
+      <if test="itemtype != null">
+        #{itemtype,jdbcType=DECIMAL},
+      </if>
+      <if test="parentid != null">
+        #{parentid,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="employeestotal != null">
+        #{employeestotal,jdbcType=DECIMAL},
+      </if>
+      <if test="createtime != null">
+        #{createtime,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetime != null">
+        #{updatetime,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="tlevel != null">
+        #{tlevel,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emssecuernode.model.EmsSecuerNode">
+    update EMS_SECUER_NODE
+    set USERNAME = #{username,jdbcType=VARCHAR},
+      ITEMSTATUS = #{itemstatus,jdbcType=DECIMAL},
+      ITEMTYPE = #{itemtype,jdbcType=DECIMAL},
+      PARENTID = #{parentid,jdbcType=VARCHAR},
+      NAME = #{name,jdbcType=VARCHAR},
+      EMPLOYEESTOTAL = #{employeestotal,jdbcType=DECIMAL},
+      CREATETIME = #{createtime,jdbcType=VARCHAR},
+      UPDATETIME = #{updatetime,jdbcType=VARCHAR},
+      CONTENT = #{content,jdbcType=VARCHAR},
+      TLEVEL = #{tlevel,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emssecuernode.model.EmsSecuerNode">
+    update EMS_SECUER_NODE
+    <set>
+      <if test="username != null">
+        USERNAME = #{username,jdbcType=VARCHAR},
+      </if>
+      <if test="itemstatus != null">
+        ITEMSTATUS = #{itemstatus,jdbcType=DECIMAL},
+      </if>
+      <if test="itemtype != null">
+        ITEMTYPE = #{itemtype,jdbcType=DECIMAL},
+      </if>
+      <if test="parentid != null">
+        PARENTID = #{parentid,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        NAME = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="employeestotal != null">
+        EMPLOYEESTOTAL = #{employeestotal,jdbcType=DECIMAL},
+      </if>
+      <if test="createtime != null">
+        CREATETIME = #{createtime,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME = #{updatetime,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        CONTENT = #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="tlevel != null">
+        TLEVEL = #{tlevel,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into EMS_SECUER_NODE 
+      (ID, 
+      USERNAME, ITEMSTATUS, ITEMTYPE, 
+      PARENTID, NAME, EMPLOYEESTOTAL, 
+      CREATETIME, UPDATETIME, CONTENT, 
+      TLEVEL)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=VARCHAR}, 
+      #{item.username,jdbcType=VARCHAR}, #{item.itemstatus,jdbcType=DECIMAL}, #{item.itemtype,jdbcType=DECIMAL}, 
+      #{item.parentid,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.employeestotal,jdbcType=DECIMAL}, 
+      #{item.createtime,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=VARCHAR}, #{item.content,jdbcType=VARCHAR}, 
+      #{item.tlevel,jdbcType=DECIMAL} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update EMS_SECUER_NODE
+     set
+       ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
+       </foreach>
+       ,USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.username,jdbcType=VARCHAR}
+       </foreach>
+       ,ITEMSTATUS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.itemstatus,jdbcType=DECIMAL}
+       </foreach>
+       ,ITEMTYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.itemtype,jdbcType=DECIMAL}
+       </foreach>
+       ,PARENTID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.parentid,jdbcType=VARCHAR}
+       </foreach>
+       ,NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.name,jdbcType=VARCHAR}
+       </foreach>
+       ,EMPLOYEESTOTAL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.employeestotal,jdbcType=DECIMAL}
+       </foreach>
+       ,CREATETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.createtime,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.updatetime,jdbcType=VARCHAR}
+       </foreach>
+       ,CONTENT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.content,jdbcType=VARCHAR}
+       </foreach>
+       ,TLEVEL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.tlevel,jdbcType=DECIMAL}
+       </foreach>
+     where ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.id,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from EMS_SECUER_NODE
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="findAll" resultMap="BaseResultMap">
+        select * from EMS_SECUER_NODE t left join  UPLOAD_FILE t1 on t.id = t1.id
+  </select>
+  <select id="findnodeId" resultMap="BaseResultMap" parameterType="string">
+    select * from EMS_SECUER_NODE t left join  UPLOAD_FILE t1 on t.id = t1.id where t.id = #{id,jdbcType=VARCHAR}
+  </select>
+</mapper>

+ 211 - 0
src/main/java/com/steerinfo/ems/emssecuernode/model/EmsSecuerNode.java

@@ -0,0 +1,211 @@
+package com.steerinfo.ems.emssecuernode.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+@ApiModel(value="安全文件节点表")
+public class EmsSecuerNode implements IBasePO<String> {
+    /**
+     * ID(ID,VARCHAR,100)
+     */
+    @ApiModelProperty(value="ID",required=true)
+    private String id;
+
+    /**
+     * 创建人(USERNAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="创建人",required=true)
+    private String username;
+
+    @ApiModelProperty(value="",required=true)
+    private Short itemstatus;
+
+    @ApiModelProperty(value="",required=true)
+    private Short itemtype;
+
+    /**
+     * 父ID(PARENTID,VARCHAR,100)
+     */
+    @ApiModelProperty(value="父ID",required=true)
+    private String parentid;
+
+    /**
+     * 节点名称(NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="节点名称",required=true)
+    private String name;
+
+    @ApiModelProperty(value="",required=true)
+    private Short employeestotal;
+
+    /**
+     * 创建日期(CREATETIME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="创建日期",required=true)
+    private String createtime;
+
+    /**
+     * 修改日期(UPDATETIME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="修改日期",required=true)
+    private String updatetime;
+
+    /**
+     * 显示的注释(CONTENT,VARCHAR,100)
+     */
+    @ApiModelProperty(value="显示的注释",required=true)
+    private String content;
+
+    /**
+     * 层级(TLEVEL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="层级",required=true)
+    private Short tlevel;
+    @ApiModelProperty(value="子数据",required=true)
+    private List<EmsSecuerNode> children;
+
+    @ApiModelProperty(value="文件路径",required=false)
+    private String file_url;
+
+    @ApiModelProperty(value="文件名",required=false)
+    private String file_name;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username == null ? null : username.trim();
+    }
+
+    public Short getItemstatus() {
+        return itemstatus;
+    }
+
+    public void setItemstatus(Short itemstatus) {
+        this.itemstatus = itemstatus;
+    }
+
+    public Short getItemtype() {
+        return itemtype;
+    }
+
+    public void setItemtype(Short itemtype) {
+        this.itemtype = itemtype;
+    }
+
+    public String getParentid() {
+        return parentid;
+    }
+
+    public void setParentid(String parentid) {
+        this.parentid = parentid == null ? null : parentid.trim();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    public Short getEmployeestotal() {
+        return employeestotal;
+    }
+
+    public void setEmployeestotal(Short employeestotal) {
+        this.employeestotal = employeestotal;
+    }
+
+    public String getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(String createtime) {
+        this.createtime = createtime == null ? null : createtime.trim();
+    }
+
+    public String getUpdatetime() {
+        return updatetime;
+    }
+
+    public void setUpdatetime(String updatetime) {
+        this.updatetime = updatetime == null ? null : updatetime.trim();
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content == null ? null : content.trim();
+    }
+
+    public Short getTlevel() {
+        return tlevel;
+    }
+
+    public void setTlevel(Short tlevel) {
+        this.tlevel = tlevel;
+    }
+
+
+    public String getFile_url() {
+        return file_url;
+    }
+
+    public void setFile_url(String file_url) {
+        this.file_url = file_url;
+    }
+
+    public String getFile_name() {
+        return file_name;
+    }
+    public void setFile_name(String file_name) {
+        this.file_name = file_name;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", username=").append(username);
+        sb.append(", itemstatus=").append(itemstatus);
+        sb.append(", itemtype=").append(itemtype);
+        sb.append(", parentid=").append(parentid);
+        sb.append(", name=").append(name);
+        sb.append(", employeestotal=").append(employeestotal);
+        sb.append(", createtime=").append(createtime);
+        sb.append(", updatetime=").append(updatetime);
+        sb.append(", content=").append(content);
+        sb.append(", tlevel=").append(tlevel);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+
+    public List<EmsSecuerNode> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<EmsSecuerNode> children) {
+        this.children = children;
+    }
+}

+ 28 - 0
src/main/java/com/steerinfo/ems/emssecuernode/service/IEmsSecuerNodeService.java

@@ -0,0 +1,28 @@
+package com.steerinfo.ems.emssecuernode.service;
+
+import com.steerinfo.ems.emssecuernode.model.EmsSecuerNode;
+import com.steerinfo.framework.service.IBaseService;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * EmsSecuerNode服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-04-20 03:07
+ * 类描述
+ * 修订历史:
+ * 日期:2023-04-20
+ * 作者:generator
+ * 参考:
+ * 描述:EmsSecuerNode服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IEmsSecuerNodeService extends IBaseService<EmsSecuerNode, String>{
+    //获取节点层级结构
+    List<EmsSecuerNode> getNode();
+
+    List<EmsSecuerNode> getIDNode(String id, Short level);
+
+}

+ 84 - 0
src/main/java/com/steerinfo/ems/emssecuernode/service/impl/EmsSecuerNodeServiceImpl.java

@@ -0,0 +1,84 @@
+package com.steerinfo.ems.emssecuernode.service.impl;
+
+import com.steerinfo.ems.emssecuernode.mapper.EmsSecuerNodeMapper;
+import com.steerinfo.ems.emssecuernode.model.EmsSecuerNode;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.emssecuernode.service.IEmsSecuerNodeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Comparator;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * EmsSecuerNode服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-04-20 03:07
+ * 类描述
+ * 修订历史:
+ * 日期:2023-04-20
+ * 作者:generator
+ * 参考:
+ * 描述:EmsSecuerNode服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "emsSecuerNodeService")
+public class EmsSecuerNodeServiceImpl extends BaseServiceImpl<EmsSecuerNode, String> implements IEmsSecuerNodeService {
+
+    @Autowired
+    private EmsSecuerNodeMapper emsSecuerNodeMapper;
+
+    @Override
+    protected IBaseMapper<EmsSecuerNode, String> getMapper() {
+        return emsSecuerNodeMapper;
+    }
+
+    @Override
+    public List<EmsSecuerNode> getNode() {
+        List<EmsSecuerNode> list = emsSecuerNodeMapper.findAll();
+        List<EmsSecuerNode> gg = list.stream().filter((EmsSecuerNode t) -> t.getTlevel() == 1).sorted(Comparator.comparingLong(EmsSecuerNode::getTlevel))
+                .map((m) -> {
+                    m.setChildren(roleChildrenList(m, list));
+                    return m;
+                }).collect(Collectors.toList());
+        return gg;
+    }
+
+    @Override
+    public List<EmsSecuerNode> getIDNode(String id, Short level) {
+        List<EmsSecuerNode> list = emsSecuerNodeMapper.findnodeId(id);
+        List<EmsSecuerNode> gg = list.stream().filter((EmsSecuerNode t) -> t.getTlevel() == level).sorted(Comparator.comparingLong(EmsSecuerNode::getTlevel))
+                .map((m) -> {
+                    m.setChildren(roleidChildrenList(m, list));
+                    return m;
+                }).collect(Collectors.toList());
+        return gg;
+    }
+    //查询子数据
+    private List<EmsSecuerNode> roleidChildrenList(EmsSecuerNode tRole, List<EmsSecuerNode> childrenList) {
+        List<EmsSecuerNode> torleList = childrenList.stream().filter((EmsSecuerNode t) -> t.getParentid().equals(tRole.getId())).sorted(Comparator.comparingLong(EmsSecuerNode::getTlevel)).
+                map((m) -> {
+                    m.setChildren(roleidChildrenList(m, childrenList));
+                    return m;
+                }).
+                collect(Collectors.toList());
+        return torleList;
+    }
+
+    //查询子数据
+    private List<EmsSecuerNode> roleChildrenList(EmsSecuerNode tRole, List<EmsSecuerNode> childrenList) {
+        List<EmsSecuerNode> torleList = childrenList.stream().filter((EmsSecuerNode t) -> t.getParentid().equals(tRole.getId())).sorted(Comparator.comparingLong(EmsSecuerNode::getTlevel)).
+                map((m) -> {
+                    m.setChildren(roleChildrenList(m, childrenList));
+                    return m;
+                }).
+                collect(Collectors.toList());
+        return torleList;
+    }
+
+}

+ 1 - 1
src/main/java/com/steerinfo/ems/trmcalpoint/service/impl/TRmCalpointServiceImpl.java

@@ -1187,7 +1187,7 @@ public class TRmCalpointServiceImpl extends BaseServiceImpl<TRmCalpoint, String>
         try {
             // clock,  2021-04-22 09
             date = new SimpleDateFormat(format).parse(startClock);
-            date = new SimpleDateFormat(format).parse(startClock);
+            date = new SimpleDateFormat(format).parse(endClock);
         } catch (ParseException e) {
             throw new Exception( "日期格式错误");
         }

+ 36 - 1
src/main/java/com/steerinfo/ftp/uploadfile/controller/UploadFileController.java

@@ -1,7 +1,10 @@
 package com.steerinfo.ftp.uploadfile.controller;
 
 import com.steerinfo.auth.utils.JwtUtil;
+import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.Utils.TreeUtils;
+import com.steerinfo.ems.emssecuernode.model.EmsSecuerNode;
+import com.steerinfo.ems.emssecuernode.service.IEmsSecuerNodeService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
@@ -16,6 +19,7 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -40,12 +44,12 @@ import java.util.*;
  */
 @RestController
 @RequestMapping("/${api.version}/uploadfiles")
+@Primary
 public class UploadFileController extends BaseRESTfulController {
     @Autowired
     IUploadFileService uploadFileService;
     @Autowired
     private FtpFileUtil ftpFileUtil;
-
     @Autowired
     private SecurityTypeMapper securityTypeMapper;
     @ApiOperation(value="获取列表", notes="分页查询")
@@ -178,6 +182,37 @@ public class UploadFileController extends BaseRESTfulController {
         }
         return  failed(null,"上传文件失败");
     }
+    @PostMapping("/file2")
+    public RESTfulResult fileUpload2( @ModelAttribute MultipartFile file, String id,String name){
+        try {
+            String userId = JwtUtil.getUseridByToken();
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("/yyyy/MM/dd");
+            String oldName = file.getOriginalFilename();
+            String newName = IDutils.getImageName();
+            newName = newName + oldName.substring(oldName.lastIndexOf("."));
+            String filePath = simpleDateFormat.format(new Date());
+            InputStream inputStream = file.getInputStream();
+
+            boolean result = ftpFileUtil.uploadToFtp(inputStream,"/"+name+filePath,newName,false);
+            inputStream.close();
+            if(result){
+                UploadFile uploadFile = new UploadFile();
+                uploadFile.setId(id);
+                uploadFile.setFileName(oldName);
+                uploadFile.setFileUrl("/"+name+filePath+"/"+newName);
+                uploadFile.setFileType(null);
+                uploadFile.setUploadTime(new Date());
+                uploadFile.setCreateMan(userId);
+                uploadFile.setType(null);
+                uploadFile.setCreateTime(new Date());
+                uploadFileService.add(uploadFile);
+                return success();
+            }
+        }catch (Exception e){
+            e.getMessage();
+        }
+        return  failed(null,"上传文件失败");
+    }
 
     /**
      * 预览文件

+ 1 - 1
src/main/java/com/steerinfo/ftp/uploadfile/utils/POIExcelToHtml.java

@@ -173,7 +173,7 @@ public class POIExcelToHtml {
 					// 处理自定义日期格式:m月d日(通过判断单元格的格式id解决,id的值是58)
 					SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 					double value = cell.getNumericCellValue();
-					Date date = org.apache.poi.ss.usermodel.DateUtil.getJavaDate(value);
+					Date date = DateUtil.getJavaDate(value);
 					result = sdf.format(date);
 				} else {
 					double value = cell.getNumericCellValue();

+ 2 - 2
src/main/java/com/steerinfo/ftp/uploadfile/utils/POIPptToHtml.java

@@ -69,7 +69,7 @@ public class POIPptToHtml {
 				// render
 				ppt.getSlides().get(i).draw(graphics);
 				ByteArrayOutputStream stream = new ByteArrayOutputStream();
-				javax.imageio.ImageIO.write(img, "png", stream);
+				ImageIO.write(img, "png", stream);
 				String imgStr = Base64.getEncoder().encodeToString(stream.toByteArray());
 				// save the output
 				sb.append("<br>");
@@ -114,7 +114,7 @@ public class POIPptToHtml {
 				//String imageDir = targetDir + "/" + pptFileName + "/";
 				//FileUtils.createDir(imageDir);// create image dir
 				//String imagePath = imageDir + pptFileName + "-" + (i + 1) + ".png";
-				javax.imageio.ImageIO.write(img, "png", stream);
+				ImageIO.write(img, "png", stream);
 				String imgStr = Base64.getEncoder().encodeToString(stream.toByteArray());
 				sb.append("<br>");
 				sb.append("<img src=" + "\"data:image/png;base64," + imgStr + "\"" + "/>");