zhangym преди 2 години
родител
ревизия
3c86c0adaf

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

@@ -6,6 +6,7 @@ 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.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.Comparator;
@@ -28,6 +29,7 @@ import java.util.stream.Collectors;
  * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  */
 @Service(value = "emsSecuerNodeService")
+@Primary
 public class EmsSecuerNodeServiceImpl extends BaseServiceImpl<EmsSecuerNode, String> implements IEmsSecuerNodeService {
 
     @Autowired

+ 241 - 0
src/main/java/com/steerinfo/ems/tfileoperate/controller/TFileOperateController.java

@@ -0,0 +1,241 @@
+package com.steerinfo.ems.tfileoperate.controller;
+
+import com.steerinfo.auth.utils.JwtUtil;
+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 com.steerinfo.ems.tfileoperate.model.TFileOperate;
+import com.steerinfo.ems.tfileoperate.service.ITFileOperateService;
+import com.steerinfo.ftp.uploadfile.model.UploadFile;
+import com.steerinfo.ftp.uploadfile.utils.FtpFileUtil;
+import com.steerinfo.ftp.uploadfile.utils.IDutils;
+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;
+
+import java.io.InputStream;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.math.BigDecimal;
+
+/**
+ * TFileOperate RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-05-10 02:31
+ * 类描述
+ * 修订历史:
+ * 日期:2023-05-10
+ * 作者:generator
+ * 参考:
+ * 描述:TFileOperate RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tfileoperates")
+public class TFileOperateController extends BaseRESTfulController {
+    @Autowired
+    IEmsSecuerNodeService NodeService;
+   @Autowired
+    FtpFileUtil ftpFileUtil;
+    @Autowired
+    ITFileOperateService tFileOperateService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("tfileoperate:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<TFileOperate> list = tFileOperateService.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("tfileoperate:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<TFileOperate> list = tFileOperateService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据TFileOperate对象创建")
+    @ApiImplicitParam(name = "tFileOperate", value = "详细实体tFileOperate", required = true, dataType = "TFileOperate")
+    //@RequiresPermissions("tfileoperate:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute TFileOperate model){
+        TFileOperate tFileOperate = tFileOperateService.add(model);
+        return success(tFileOperate);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("tfileoperate:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        TFileOperate tFileOperate = tFileOperateService.getById(id);
+        return success(tFileOperate);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的tFileOperate信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "tFileOperate", value = "详细实体tFileOperate", required = true, dataType = "TFileOperate")
+    })
+    //@RequiresPermissions("tfileoperate:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody TFileOperate model){
+        model.setId(id);
+        TFileOperate tFileOperate = tFileOperateService.modify(model);
+        return success(tFileOperate);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("tfileoperate:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+        String path = null;
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+            for (String item : ids) {
+                TFileOperate t = tFileOperateService.getById(item);
+                path = t.getFilePath();
+                try {
+                    if (ftpFileUtil.deleteFile(path)){
+                    }else{
+                        return failed(null,"部分文件删除失败");
+                    }
+                } catch (Exception e) {
+                    return failed(null,"删除失败");
+                }
+            }
+    	}
+      return success();
+    }
+    @PostMapping("/fileUpload")
+    public RESTfulResult fileUpload(@ModelAttribute MultipartFile[] files, String id){
+        String filesid = "";
+        if (files.length>0){
+            for (int i = 0; i <files.length ; i++) {
+                try {
+                    String userId = JwtUtil.getUseridByToken();
+                    //获取系统时间
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("/yyyy/MM/dd");
+                    String simpleDateFormat1 = DateUtils.getCurrentTime("yyyy-MM-dd HH:mm:ss");
+                    //获取文件名
+                    String oldName = files[i].getOriginalFilename();
+                    int begin = files[i].getOriginalFilename().indexOf(".");
+                    int last = files[i].getOriginalFilename().length();
+                    String type = files[i].getOriginalFilename().substring(begin, last);
+                    //取当前时间的长整形值包含毫秒
+                    String newName = IDutils.getImageName();
+                    //重新命名文件
+                    newName = newName + oldName.substring(oldName.lastIndexOf("."));
+                    String filePath = simpleDateFormat.format(new Date());
+                    //获取输入流
+                    InputStream inputStream = files[i].getInputStream();
+                    boolean result = ftpFileUtil.uploadToFtp(inputStream, filePath, newName, false);
+                    inputStream.close();
+                    if (result) {
+                        TFileOperate uploadFile = new TFileOperate();
+                        uploadFile.setFileName(oldName);
+                        uploadFile.setFilePath(filePath + "/" + newName);
+                        uploadFile.setNodeId(id);
+                        uploadFile.setCreateman(JwtUtil.getUseridByToken());
+                        uploadFile.setCreatetime(simpleDateFormat1);
+                        uploadFile.setFileType(type);
+                        uploadFile.setId("file"+UUID.randomUUID().toString().substring(1,18).trim().replace("-",""));
+                        uploadFile.setBz(" ");
+                        uploadFile.setUpdateman(" ");
+                        uploadFile.setUpdatetime(" ");
+                        TFileOperate model = tFileOperateService.add(uploadFile);
+                        if (model != null) {
+                            filesid += "," + model.getId();
+                        }
+                    } else {
+                        return failed(null, "上传文件失败");
+                    }
+                } catch (Exception e) {
+                    e.getMessage();
+                }
+            }
+        }
+        if (!filesid.isEmpty()){
+            EmsSecuerNode emsSecuerNode= new EmsSecuerNode();
+            emsSecuerNode.setId(id);
+            emsSecuerNode.setItemtype((short) 200);
+            emsSecuerNode.setItemstatus((short) 200);
+            NodeService.modify(emsSecuerNode);
+        }
+
+        return success(filesid);
+    }
+
+
+    @PostMapping("/fileUploa2")
+    public RESTfulResult fileUpload2(@ModelAttribute MultipartFile files, String id){
+        String filesid = "";
+        if (!files.isEmpty()){
+                try {
+                    String userId = JwtUtil.getUseridByToken();
+                    //获取系统时间
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("/yyyy/MM/dd");
+                    String simpleDateFormat1 = DateUtils.getCurrentTime("yyyy-MM-dd HH:mm:ss");
+                    //获取文件名
+                    String oldName = files.getOriginalFilename();
+                    int begin = files.getOriginalFilename().indexOf(".");
+                    int last = files.getOriginalFilename().length();
+                    String type = files.getOriginalFilename().substring(begin, last);
+                    //取当前时间的长整形值包含毫秒
+                    String newName = IDutils.getImageName();
+                    //重新命名文件
+                    newName = newName + oldName.substring(oldName.lastIndexOf("."));
+                    String filePath = simpleDateFormat.format(new Date());
+                    //获取输入流
+                    InputStream inputStream = files.getInputStream();
+                    boolean result = ftpFileUtil.uploadToFtp(inputStream, filePath, newName, false);
+                    inputStream.close();
+                    if (result) {
+                        TFileOperate uploadFile = new TFileOperate();
+                        uploadFile.setFileName(oldName);
+                        uploadFile.setFilePath(filePath + "/" + newName);
+                        uploadFile.setId(id);
+                        uploadFile.setFileType(type);
+                        uploadFile.setBz(" ");
+                        uploadFile.setUpdateman(JwtUtil.getUseridByToken());
+                        uploadFile.setUpdatetime(simpleDateFormat1);
+                        TFileOperate model = tFileOperateService.modify(uploadFile);
+                        if (model != null) {
+                            filesid += "," + model.getId();
+                        }
+                    } else {
+                        return failed(null, "上传文件失败");
+                    }
+                } catch (Exception e) {
+                    e.getMessage();
+                }
+
+        }
+
+        return success(filesid);
+    }
+
+
+
+}

+ 10 - 0
src/main/java/com/steerinfo/ems/tfileoperate/mapper/TFileOperateMapper.java

@@ -0,0 +1,10 @@
+package com.steerinfo.ems.tfileoperate.mapper;
+
+import com.steerinfo.ems.tfileoperate.model.TFileOperate;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface TFileOperateMapper extends IBaseMapper<TFileOperate, String> {
+}

+ 342 - 0
src/main/java/com/steerinfo/ems/tfileoperate/mapper/TFileOperateMapper.xml

@@ -0,0 +1,342 @@
+<?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.tfileoperate.mapper.TFileOperateMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.tfileoperate.model.TFileOperate">
+    <id column="FILE_ID" jdbcType="VARCHAR" property="fileId" />
+    <result column="NODE_ID" jdbcType="VARCHAR" property="nodeId" />
+    <result column="FILE_NAME" jdbcType="VARCHAR" property="fileName" />
+    <result column="FILE_PATH" jdbcType="VARCHAR" property="filePath" />
+    <result column="FILE_TYPE" jdbcType="VARCHAR" property="fileType" />
+    <result column="CREATETIME" jdbcType="VARCHAR" property="createtime" />
+    <result column="UPDATETIME" jdbcType="VARCHAR" property="updatetime" />
+    <result column="CREATEMAN" jdbcType="VARCHAR" property="createman" />
+    <result column="UPDATEMAN" jdbcType="VARCHAR" property="updateman" />
+    <result column="BZ" jdbcType="VARCHAR" property="bz" />
+  </resultMap>
+  <sql id="columns">
+    FILE_ID, NODE_ID, FILE_NAME, FILE_PATH, FILE_TYPE, CREATETIME, UPDATETIME, CREATEMAN, 
+    UPDATEMAN, BZ
+  </sql>
+  <sql id="columns_alias">
+    t.FILE_ID, t.NODE_ID, t.FILE_NAME, t.FILE_PATH, t.FILE_TYPE, t.CREATETIME, t.UPDATETIME, 
+    t.CREATEMAN, t.UPDATEMAN, t.BZ
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM T_FILE_OPERATE
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM T_FILE_OPERATE t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="fileId != null and fileId != ''">
+        and FILE_ID = #{fileId}
+      </if>
+      <if test="nodeId != null and nodeId != ''">
+        and NODE_ID = #{nodeId}
+      </if>
+      <if test="fileName != null and fileName != ''">
+        and FILE_NAME = #{fileName}
+      </if>
+      <if test="filePath != null and filePath != ''">
+        and FILE_PATH = #{filePath}
+      </if>
+      <if test="fileType != null and fileType != ''">
+        and FILE_TYPE = #{fileType}
+      </if>
+      <if test="createtime != null and createtime != ''">
+        and CREATETIME = #{createtime}
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        and UPDATETIME = #{updatetime}
+      </if>
+      <if test="createman != null and createman != ''">
+        and CREATEMAN = #{createman}
+      </if>
+      <if test="updateman != null and updateman != ''">
+        and UPDATEMAN = #{updateman}
+      </if>
+      <if test="bz != null and bz != ''">
+        and BZ = #{bz}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="fileId != null and fileId != ''">
+        and FILE_ID LIKE '%${fileId}%'
+      </if>
+      <if test="nodeId != null and nodeId != ''">
+        and NODE_ID LIKE '%${nodeId}%'
+      </if>
+      <if test="fileName != null and fileName != ''">
+        and FILE_NAME LIKE '%${fileName}%'
+      </if>
+      <if test="filePath != null and filePath != ''">
+        and FILE_PATH LIKE '%${filePath}%'
+      </if>
+      <if test="fileType != null and fileType != ''">
+        and FILE_TYPE LIKE '%${fileType}%'
+      </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="createman != null and createman != ''">
+        and CREATEMAN LIKE '%${createman}%'
+      </if>
+      <if test="updateman != null and updateman != ''">
+        and UPDATEMAN LIKE '%${updateman}%'
+      </if>
+      <if test="bz != null and bz != ''">
+        and BZ LIKE '%${bz}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from T_FILE_OPERATE
+    where FILE_ID = #{fileId,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from T_FILE_OPERATE
+    where 1!=1 
+      <if test="nodeId != null and nodeId != ''">
+        or NODE_ID = #{nodeId}
+      </if>
+      <if test="fileName != null and fileName != ''">
+        or FILE_NAME = #{fileName}
+      </if>
+      <if test="filePath != null and filePath != ''">
+        or FILE_PATH = #{filePath}
+      </if>
+      <if test="fileType != null and fileType != ''">
+        or FILE_TYPE = #{fileType}
+      </if>
+      <if test="createtime != null and createtime != ''">
+        or CREATETIME = #{createtime}
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        or UPDATETIME = #{updatetime}
+      </if>
+      <if test="createman != null and createman != ''">
+        or CREATEMAN = #{createman}
+      </if>
+      <if test="updateman != null and updateman != ''">
+        or UPDATEMAN = #{updateman}
+      </if>
+      <if test="bz != null and bz != ''">
+        or BZ = #{bz}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.tfileoperate.model.TFileOperate">
+    insert into T_FILE_OPERATE (FILE_ID, NODE_ID, FILE_NAME, 
+      FILE_PATH, FILE_TYPE, CREATETIME, 
+      UPDATETIME, CREATEMAN, UPDATEMAN, 
+      BZ)
+    values (#{fileId,jdbcType=VARCHAR}, #{nodeId,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, 
+      #{filePath,jdbcType=VARCHAR}, #{fileType,jdbcType=VARCHAR}, #{createtime,jdbcType=VARCHAR}, 
+      #{updatetime,jdbcType=VARCHAR}, #{createman,jdbcType=VARCHAR}, #{updateman,jdbcType=VARCHAR}, 
+      #{bz,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.tfileoperate.model.TFileOperate">
+    insert into T_FILE_OPERATE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="fileId != null">
+        FILE_ID,
+      </if>
+      <if test="nodeId != null">
+        NODE_ID,
+      </if>
+      <if test="fileName != null">
+        FILE_NAME,
+      </if>
+      <if test="filePath != null">
+        FILE_PATH,
+      </if>
+      <if test="fileType != null">
+        FILE_TYPE,
+      </if>
+      <if test="createtime != null">
+        CREATETIME,
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME,
+      </if>
+      <if test="createman != null">
+        CREATEMAN,
+      </if>
+      <if test="updateman != null">
+        UPDATEMAN,
+      </if>
+      <if test="bz != null">
+        BZ,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="fileId != null">
+        #{fileId,jdbcType=VARCHAR},
+      </if>
+      <if test="nodeId != null">
+        #{nodeId,jdbcType=VARCHAR},
+      </if>
+      <if test="fileName != null">
+        #{fileName,jdbcType=VARCHAR},
+      </if>
+      <if test="filePath != null">
+        #{filePath,jdbcType=VARCHAR},
+      </if>
+      <if test="fileType != null">
+        #{fileType,jdbcType=VARCHAR},
+      </if>
+      <if test="createtime != null">
+        #{createtime,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetime != null">
+        #{updatetime,jdbcType=VARCHAR},
+      </if>
+      <if test="createman != null">
+        #{createman,jdbcType=VARCHAR},
+      </if>
+      <if test="updateman != null">
+        #{updateman,jdbcType=VARCHAR},
+      </if>
+      <if test="bz != null">
+        #{bz,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.tfileoperate.model.TFileOperate">
+    update T_FILE_OPERATE
+    set NODE_ID = #{nodeId,jdbcType=VARCHAR},
+      FILE_NAME = #{fileName,jdbcType=VARCHAR},
+      FILE_PATH = #{filePath,jdbcType=VARCHAR},
+      FILE_TYPE = #{fileType,jdbcType=VARCHAR},
+      CREATETIME = #{createtime,jdbcType=VARCHAR},
+      UPDATETIME = #{updatetime,jdbcType=VARCHAR},
+      CREATEMAN = #{createman,jdbcType=VARCHAR},
+      UPDATEMAN = #{updateman,jdbcType=VARCHAR},
+      BZ = #{bz,jdbcType=VARCHAR}
+    where FILE_ID = #{fileId,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.tfileoperate.model.TFileOperate">
+    update T_FILE_OPERATE
+    <set>
+      <if test="nodeId != null">
+        NODE_ID = #{nodeId,jdbcType=VARCHAR},
+      </if>
+      <if test="fileName != null">
+        FILE_NAME = #{fileName,jdbcType=VARCHAR},
+      </if>
+      <if test="filePath != null">
+        FILE_PATH = #{filePath,jdbcType=VARCHAR},
+      </if>
+      <if test="fileType != null">
+        FILE_TYPE = #{fileType,jdbcType=VARCHAR},
+      </if>
+      <if test="createtime != null">
+        CREATETIME = #{createtime,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME = #{updatetime,jdbcType=VARCHAR},
+      </if>
+      <if test="createman != null">
+        CREATEMAN = #{createman,jdbcType=VARCHAR},
+      </if>
+      <if test="updateman != null">
+        UPDATEMAN = #{updateman,jdbcType=VARCHAR},
+      </if>
+      <if test="bz != null">
+        BZ = #{bz,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where FILE_ID = #{fileId,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select" />
+    where FILE_ID = #{fileId,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+      where NODE_ID = #{nodeId,jdbcType=VARCHAR}
+  </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 T_FILE_OPERATE 
+      (FILE_ID, 
+      NODE_ID, FILE_NAME, FILE_PATH, 
+      FILE_TYPE, CREATETIME, UPDATETIME, 
+      CREATEMAN, UPDATEMAN, BZ
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.fileId,jdbcType=VARCHAR}, 
+      #{item.nodeId,jdbcType=VARCHAR}, #{item.fileName,jdbcType=VARCHAR}, #{item.filePath,jdbcType=VARCHAR}, 
+      #{item.fileType,jdbcType=VARCHAR}, #{item.createtime,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=VARCHAR}, 
+      #{item.createman,jdbcType=VARCHAR}, #{item.updateman,jdbcType=VARCHAR}, #{item.bz,jdbcType=VARCHAR}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update T_FILE_OPERATE
+     set
+       FILE_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
+          when #{item.fileId,jdbcType=VARCHAR} then #{item.fileId,jdbcType=VARCHAR}
+       </foreach>
+       ,NODE_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
+          when #{item.fileId,jdbcType=VARCHAR} then #{item.nodeId,jdbcType=VARCHAR}
+       </foreach>
+       ,FILE_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
+          when #{item.fileId,jdbcType=VARCHAR} then #{item.fileName,jdbcType=VARCHAR}
+       </foreach>
+       ,FILE_PATH=
+       <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
+          when #{item.fileId,jdbcType=VARCHAR} then #{item.filePath,jdbcType=VARCHAR}
+       </foreach>
+       ,FILE_TYPE=
+       <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
+          when #{item.fileId,jdbcType=VARCHAR} then #{item.fileType,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATETIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
+          when #{item.fileId,jdbcType=VARCHAR} then #{item.createtime,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATETIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
+          when #{item.fileId,jdbcType=VARCHAR} then #{item.updatetime,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATEMAN=
+       <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
+          when #{item.fileId,jdbcType=VARCHAR} then #{item.createman,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATEMAN=
+       <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
+          when #{item.fileId,jdbcType=VARCHAR} then #{item.updateman,jdbcType=VARCHAR}
+       </foreach>
+       ,BZ=
+       <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
+          when #{item.fileId,jdbcType=VARCHAR} then #{item.bz,jdbcType=VARCHAR}
+       </foreach>
+     where FILE_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.fileId,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from T_FILE_OPERATE
+    where FILE_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 181 - 0
src/main/java/com/steerinfo/ems/tfileoperate/model/TFileOperate.java

@@ -0,0 +1,181 @@
+package com.steerinfo.ems.tfileoperate.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(value="null")
+public class TFileOperate implements IBasePO<String> {
+    /**
+     * 上传文件ID(FILE_ID,VARCHAR,20)
+     */
+    @ApiModelProperty(value="上传文件ID",required=true)
+    private String fileId;
+
+    /**
+     * 所属节点ID(NODE_ID,VARCHAR,20)
+     */
+    @ApiModelProperty(value="所属节点ID",required=false)
+    private String nodeId;
+
+    /**
+     * 文件名(FILE_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="文件名",required=false)
+    private String fileName;
+
+    /**
+     * 上传文件路径(FILE_PATH,VARCHAR,30)
+     */
+    @ApiModelProperty(value="上传文件路径",required=false)
+    private String filePath;
+
+    /**
+     * 上传文件类型(FILE_TYPE,VARCHAR,10)
+     */
+    @ApiModelProperty(value="上传文件类型",required=false)
+    private String fileType;
+
+    /**
+     * 上传时间(CREATETIME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="上传时间",required=false)
+    private String createtime;
+
+    /**
+     * 修改时间(UPDATETIME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改时间",required=false)
+    private String updatetime;
+
+    /**
+     * 上传人(CREATEMAN,VARCHAR,10)
+     */
+    @ApiModelProperty(value="上传人",required=false)
+    private String createman;
+
+    /**
+     * 修改人(UPDATEMAN,VARCHAR,10)
+     */
+    @ApiModelProperty(value="修改人",required=false)
+    private String updateman;
+
+    /**
+     * 备注(BZ,VARCHAR,30)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String bz;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.fileId;
+    }
+
+    @Override
+    public void setId(String fileId) {
+        this.fileId = fileId == null ? null : fileId.trim();
+    }
+
+    public String getFileId() {
+        return fileId;
+    }
+
+    public void setFileId(String fileId) {
+        this.fileId = fileId == null ? null : fileId.trim();
+    }
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId == null ? null : nodeId.trim();
+    }
+
+    public String getFileName() {
+        return fileName;
+    }
+
+    public void setFileName(String fileName) {
+        this.fileName = fileName == null ? null : fileName.trim();
+    }
+
+    public String getFilePath() {
+        return filePath;
+    }
+
+    public void setFilePath(String filePath) {
+        this.filePath = filePath == null ? null : filePath.trim();
+    }
+
+    public String getFileType() {
+        return fileType;
+    }
+
+    public void setFileType(String fileType) {
+        this.fileType = fileType == null ? null : fileType.trim();
+    }
+
+    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 getCreateman() {
+        return createman;
+    }
+
+    public void setCreateman(String createman) {
+        this.createman = createman == null ? null : createman.trim();
+    }
+
+    public String getUpdateman() {
+        return updateman;
+    }
+
+    public void setUpdateman(String updateman) {
+        this.updateman = updateman == null ? null : updateman.trim();
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz == null ? null : bz.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", fileId=").append(fileId);
+        sb.append(", nodeId=").append(nodeId);
+        sb.append(", fileName=").append(fileName);
+        sb.append(", filePath=").append(filePath);
+        sb.append(", fileType=").append(fileType);
+        sb.append(", createtime=").append(createtime);
+        sb.append(", updatetime=").append(updatetime);
+        sb.append(", createman=").append(createman);
+        sb.append(", updateman=").append(updateman);
+        sb.append(", bz=").append(bz);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 23 - 0
src/main/java/com/steerinfo/ems/tfileoperate/service/ITFileOperateService.java

@@ -0,0 +1,23 @@
+package com.steerinfo.ems.tfileoperate.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ems.tfileoperate.model.TFileOperate;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * TFileOperate服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-05-10 02:31
+ * 类描述
+ * 修订历史:
+ * 日期:2023-05-10
+ * 作者:generator
+ * 参考:
+ * 描述:TFileOperate服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITFileOperateService extends IBaseService<TFileOperate, String>{
+
+}

+ 36 - 0
src/main/java/com/steerinfo/ems/tfileoperate/service/impl/TFileOperateServiceImpl.java

@@ -0,0 +1,36 @@
+package com.steerinfo.ems.tfileoperate.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.tfileoperate.model.TFileOperate;
+import com.steerinfo.ems.tfileoperate.mapper.TFileOperateMapper;
+import com.steerinfo.ems.tfileoperate.service.ITFileOperateService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * TFileOperate服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-05-10 02:31
+ * 类描述
+ * 修订历史:
+ * 日期:2023-05-10
+ * 作者:generator
+ * 参考:
+ * 描述:TFileOperate服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tFileOperateService")
+public class TFileOperateServiceImpl extends BaseServiceImpl<TFileOperate, String> implements ITFileOperateService {
+
+    @Autowired
+    private TFileOperateMapper tFileOperateMapper;
+
+    @Override
+    protected IBaseMapper<TFileOperate, String> getMapper() {
+        return tFileOperateMapper;
+    }
+}