فهرست منبع

1.停复役检修功能

javababay 2 سال پیش
والد
کامیت
0310cb9071
26فایلهای تغییر یافته به همراه3820 افزوده شده و 60 حذف شده
  1. 62 60
      pom.xml
  2. 294 0
      src/main/java/com/steerinfo/ems/tmaintenance/controller/TMaintenanceController.java
  3. 22 0
      src/main/java/com/steerinfo/ems/tmaintenance/mapper/TMaintenanceMapper.java
  4. 679 0
      src/main/java/com/steerinfo/ems/tmaintenance/mapper/TMaintenanceMapper.xml
  5. 346 0
      src/main/java/com/steerinfo/ems/tmaintenance/model/TMaintenance.java
  6. 34 0
      src/main/java/com/steerinfo/ems/tmaintenance/service/ITMaintenanceService.java
  7. 94 0
      src/main/java/com/steerinfo/ems/tmaintenance/service/impl/TMaintenanceServiceImpl.java
  8. 149 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/controller/TMaintenanceFileController.java
  9. 10 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/mapper/TMaintenanceFileMapper.java
  10. 162 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/mapper/TMaintenanceFileMapper.xml
  11. 66 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/model/TMaintenanceFile.java
  12. 23 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/service/ITMaintenanceFileService.java
  13. 36 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/service/impl/TMaintenanceFileServiceImpl.java
  14. 207 0
      src/main/java/com/steerinfo/ems/tprocessinfor/controller/TProcessinforController.java
  15. 21 0
      src/main/java/com/steerinfo/ems/tprocessinfor/mapper/TProcessinforMapper.java
  16. 266 0
      src/main/java/com/steerinfo/ems/tprocessinfor/mapper/TProcessinforMapper.xml
  17. 147 0
      src/main/java/com/steerinfo/ems/tprocessinfor/model/TProcessinfor.java
  18. 33 0
      src/main/java/com/steerinfo/ems/tprocessinfor/service/ITProcessinforService.java
  19. 65 0
      src/main/java/com/steerinfo/ems/tprocessinfor/service/impl/TProcessinforServiceImpl.java
  20. 210 0
      src/main/java/com/steerinfo/ems/tsubmitted/controller/TSubmittedController.java
  21. 12 0
      src/main/java/com/steerinfo/ems/tsubmitted/mapper/TSubmittedMapper.java
  22. 445 0
      src/main/java/com/steerinfo/ems/tsubmitted/mapper/TSubmittedMapper.xml
  23. 242 0
      src/main/java/com/steerinfo/ems/tsubmitted/model/TSubmitted.java
  24. 23 0
      src/main/java/com/steerinfo/ems/tsubmitted/service/ITSubmittedService.java
  25. 47 0
      src/main/java/com/steerinfo/ems/tsubmitted/service/impl/TSubmittedServiceImpl.java
  26. 125 0
      src/main/resources/application.properties

+ 62 - 60
pom.xml

@@ -141,6 +141,11 @@
 			<artifactId>websocketclient</artifactId>
 			<version>1.0</version>
 		</dependency>
+		<dependency>
+			<groupId>org.mybatis</groupId>
+			<artifactId>mybatis-spring</artifactId>
+			<version>2.0.3</version>
+		</dependency>
 	</dependencies>
 
 	<build>
@@ -206,64 +211,61 @@
 					<encoding>${project.build.sourceEncoding}</encoding>
 				</configuration>
 			</plugin>
-<!--
-			 自动生成代码文件
--->
-<!--			  <plugin>-->
-<!--				<groupId>com.steerinfo</groupId>-->
-<!--				<artifactId>generator-maven-plugin</artifactId>-->
-<!--				<version>3.0</version>-->
-<!--				<configuration>-->
-<!--				  <connUrl>jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL =-->
-<!--						TCP)(HOST = 172.16.90.237)(PORT = 1521)) (CONNECT_DATA = (SERVER =-->
-<!--						DEDICATED) (SERVICE_NAME = zngk) ))</connUrl>-->
-<!--				  <user>ems</user>-->
-<!--				  <password>123456</password>-->
-<!--				  <targetPackage>com.steerinfo.job</targetPackage>-->
-<!--				  <tables>-->
-<!--					<param>ems_job</param>-->
-<!--				  </tables>-->
-<!--				</configuration>-->
-<!--				<executions>-->
-<!--					<execution>-->
-<!--						<phase>compile</phase>-->
-<!--						<goals>-->
-<!--							<goal>steerinfo</goal>-->
-<!--						</goals>-->
-<!--					</execution>-->
-<!--				</executions>-->
-<!--			  </plugin>-->
-		</plugins>
+			<!--                        // 自动生成代码文件-->
+			<!--	<plugin>
+                                   <groupId>com.steerinfo</groupId>
+                                   <artifactId>generator-maven-plugin</artifactId>
+                                   <version>3.0</version>
+                                   <configuration>
+                                     <connUrl>jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL =
+                                           TCP)(HOST = 172.16.90.237)(PORT = 1521)) (CONNECT_DATA = (SERVER =
+                                           DEDICATED) (SERVICE_NAME = zngk) ))</connUrl>
+                                     <user>ems</user>
+                                     <password>123456</password>
+                                     <targetPackage>com.steerinfo.ems</targetPackage>
+                                     <tables>
+                                       <param>T_SUBMITTED</param>
+                                     </tables>
+                                   </configuration>
+                                   <executions>
+                                       <execution>
+                                           <phase>compile</phase>
+                                           <goals>
+                                               <goal>steerinfo</goal>
+                                           </goals>
+                                       </execution>
+                                   </executions>
+                                 </plugin>-->
+
+               </plugins>
 
-		<pluginManagement>
-			<plugins>
-				<!-- This plugin's configuration is used to store Eclipse m2e settings 
-					only. It has no influence on the Maven build itself. -->
-				<plugin>
-					<groupId>org.eclipse.m2e</groupId>
-					<artifactId>lifecycle-mapping</artifactId>
-					<version>1.0.0</version>
-					<configuration>
-						<lifecycleMappingMetadata>
-							<pluginExecutions>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>com.steerinfo</groupId>
-										<artifactId> generator-maven-plugin </artifactId>
-										<versionRange> [0.0.1,)</versionRange>
-										<goals>
-											<goal>steerinfo</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<ignore></ignore>
-									</action>
-								</pluginExecution>
-							</pluginExecutions>
-						</lifecycleMappingMetadata>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>		
-	</build>
-</project>
+               <pluginManagement>
+                   <plugins>
+                       <plugin>
+                           <groupId>org.eclipse.m2e</groupId>
+                           <artifactId>lifecycle-mapping</artifactId>
+                           <version>1.0.0</version>
+                           <configuration>
+                               <lifecycleMappingMetadata>
+                                   <pluginExecutions>
+                                       <pluginExecution>
+                                           <pluginExecutionFilter>
+                                               <groupId>com.steerinfo</groupId>
+                                               <artifactId> generator-maven-plugin </artifactId>
+                                               <versionRange> [0.0.1,)</versionRange>
+                                               <goals>
+                                                   <goal>steerinfo</goal>
+                                               </goals>
+                                           </pluginExecutionFilter>
+                                           <action>
+                                               <ignore></ignore>
+                                           </action>
+                                       </pluginExecution>
+                                   </pluginExecutions>
+                               </lifecycleMappingMetadata>
+                           </configuration>
+                       </plugin>
+                   </plugins>
+               </pluginManagement>
+           </build>
+       </project>

+ 294 - 0
src/main/java/com/steerinfo/ems/tmaintenance/controller/TMaintenanceController.java

@@ -0,0 +1,294 @@
+package com.steerinfo.ems.tmaintenance.controller;
+
+import com.steerinfo.ems.Utils.DateUtils;
+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.tmaintenance.model.TMaintenance;
+import com.steerinfo.ems.tmaintenance.service.ITMaintenanceService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * TMaintenance RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-06-09 09:13
+ * 类描述
+ * 修订历史:
+ * 日期:2022-06-09
+ * 作者:generator
+ * 参考:
+ * 描述:TMaintenance RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmaintenances")
+public class TMaintenanceController extends BaseRESTfulController {
+    /** 文件保存路径  */
+    public static final String FILE_DIR = "/static/";
+    @Autowired
+    ITMaintenanceService tMaintenanceService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("tmaintenance:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<TMaintenance> list = tMaintenanceService.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("tmaintenance:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<TMaintenance> list = tMaintenanceService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据TMaintenance对象创建")
+    @ApiImplicitParam(name = "tMaintenance", value = "详细实体tMaintenance", required = true, dataType = "TMaintenance")
+    //@RequiresPermissions("tmaintenance:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute TMaintenance model){
+        TMaintenance tMaintenance = tMaintenanceService.add(model);
+        return success(tMaintenance);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("tmaintenance:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        TMaintenance tMaintenance = tMaintenanceService.getById(id);
+        return success(tMaintenance);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的tMaintenance信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "tMaintenance", value = "详细实体tMaintenance", required = true, dataType = "TMaintenance")
+    })
+    //@RequiresPermissions("tmaintenance:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody TMaintenance model){
+        model.setId(id);
+        TMaintenance tMaintenance = tMaintenanceService.modify(model);
+        return success(tMaintenance);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("tmaintenance: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);
+			  tMaintenanceService.delete(ids);
+    	}
+      return success();
+    }
+    @ApiOperation(value = "创建", notes = "根据TMaintenance对象创建")
+    @ApiImplicitParam(name = "tMaintenance", value = "详细实体tMaintenance", required = true, dataType = "TMaintenance")
+    //@RequiresPermissions("tmaintenance:create")
+    @PostMapping(value = "/addone")
+    public RESTfulResult addone(@ModelAttribute TMaintenance model) {
+        //丛前端获取申报日期,利用SimpleDateFormat类转换为字符串
+        String declaretime = model.getDeclaretime();
+        //将转换为字符串的日期进行截取,截取出月和日
+        String mouth = declaretime.substring(5, 7);
+        String day = declaretime.substring(8, 10);
+        Integer maxid = tMaintenanceService.MaxID(mouth);
+        String id = model.getDeclareid() + mouth + "_" + day + "_" + maxid;
+        model.setRecord(maxid);
+        model.setDeclareid(id);
+        TMaintenance tMaintenance = tMaintenanceService.add(model);
+        return success(tMaintenance);
+    }
+
+    //查出所有数据
+    @GetMapping("/getAll")
+    public RESTfulResult getall() {
+        List<TMaintenance> tMaintenance = tMaintenanceService.selectAll();
+        return success(tMaintenance);
+    }
+
+    //逻辑删除
+    @PutMapping(value = "/del/{ids}")
+    public RESTfulResult delectMes(@PathVariable String[] ids) {
+        String dateid = DateUtils.getCurrentTime("yyyy-MM-dd HH:mm:ss");
+        int count = 0;
+        for (int i = 0; i < ids.length; i++) {
+            count = tMaintenanceService.deleMes(ids[i], dateid);
+
+        }
+        return success(count, "本次共删除" + count + "条数据");
+    }
+
+    //修改
+    @PutMapping(value = "/pus/")
+    public RESTfulResult putMes(@ModelAttribute MultipartFile[] file, TMaintenance model, String del) {
+        String datetime = DateUtils.getCurrentTime("yyyy-MM-dd");
+        if (model == null) {
+            return failed(null, "参数错误!");
+        }
+        TMaintenance tMaintenance = new TMaintenance();
+        String bid = model.getDeclareid();
+        model.setChargetime(datetime);
+        tMaintenanceService.modify(model);
+        try {
+            // 上传文件
+            if (file!=null && file.length>0) {
+                // 文件目录,如果目录不存在,自动创建
+                String uploadDir = FILE_DIR + tMaintenance.getDeclareid() + "/";
+                File dir = new File(uploadDir);
+                if (!dir.exists()) {
+                    dir.mkdirs();
+                }
+                for (int i = 0;i < file.length;i++){
+                    // 上传文件名
+                    String fileName = file[i].getOriginalFilename();
+                    // 服务器端保存的文件对象
+                    File serverFile = new File(uploadDir, fileName);
+                    file[i].transferTo(serverFile.getAbsoluteFile());
+                }
+            }
+            // 删除文件
+            if(del!=null && !del.isEmpty() && !bid.isEmpty()) {
+                for (String df : del.split(";")){
+                    if (!df.isEmpty() && df.trim().length()>1) {
+                        String path = FILE_DIR + bid + "/" + df;
+                        File f = new File(path).getAbsoluteFile();
+                        if(f.exists()){
+                            f.delete();
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return failed(null,"上传失败!失败原因:"+e.toString());
+        }
+        return success(tMaintenance);
+    }
+
+    //多项匹配模糊查询
+    @GetMapping("/getmsg")
+    public RESTfulResult getMsg(HashMap parameters) {
+        List<TMaintenance> tMaintenance = tMaintenanceService.queryLike(parameters);
+
+        return success(tMaintenance);
+    }
+
+    //批量
+//    @PutMapping(value = "/pusAll")
+//    public RESTfulResult pusAll( String[] declareid,String billstatus) {
+//        for (int i = 0; i <declareid.length ; i++) {
+//            tMaintenanceService.pusMesAll(declareid[i],billstatus);
+//        }
+//        return success();
+//    }
+
+    @PutMapping(value = "/pusAll")
+    public RESTfulResult pusAll(@RequestBody TMaintenance[]params) {
+        for (int i = 0; i <params.length ; i++) {
+            String Declareid= params[i].getDeclareid();
+            String Billstatus= params[i].getBillstatus();
+            tMaintenanceService.pusMesAll(Declareid,Billstatus);
+        }
+        return success();
+    }
+
+    @ApiOperation(value="暂存", notes="根据url的id来指定更新对象,并根据传过来的tCm035信息来更新详细信息")
+    @ApiImplicitParam(name = "tCm035", value = "详细实体tCm035", required = true, dataType = "TCm035")
+    //@RequiresPermissions("tcm035:update")
+    @PutMapping(value = "/submit/")
+    public RESTfulResult update(@ModelAttribute MultipartFile[] file, TMaintenance model, String del){
+        if (model == null) {
+            return failed(null, "参数错误!");
+        }
+        TMaintenance tMaintenance = new TMaintenance();
+        //丛前端获取申报日期,利用SimpleDateFormat类转换为字符串
+        String declaretime = model.getDeclaretime();
+        //将转换为字符串的日期进行截取,截取出月和日
+        String mouth = declaretime.substring(5, 7);
+        Integer maxid = tMaintenanceService.MaxID(mouth);
+        model.setRecord(maxid);
+        String bid = model.getDeclareid();
+        model.setDeclareid(model.getDeclareid()+DateUtils.getCurrentTime("yyyyMMdd") + "_"+ String.format("%04d", maxid));
+        tMaintenance = tMaintenanceService.add(model);
+        try {
+            // 上传文件
+            if (file!=null && file.length>0) {
+                // 文件目录,如果目录不存在,自动创建
+                String uploadDir = FILE_DIR + tMaintenance.getDeclareid() + "/";
+                File dir = new File(uploadDir);
+                if (!dir.exists()) {
+                    dir.mkdirs();
+                }
+                for (int i = 0;i < file.length;i++){
+                    // 上传文件名
+                    String fileName = file[i].getOriginalFilename();
+                    // 服务器端保存的文件对象
+                    File serverFile = new File(uploadDir, fileName);
+                    file[i].transferTo(serverFile.getAbsoluteFile());
+                }
+            }
+            // 删除文件
+            if(del!=null && !del.isEmpty() && !bid.isEmpty()) {
+                for (String df : del.split(";")){
+                    if (!df.isEmpty() && df.trim().length()>1) {
+                        String path = FILE_DIR + bid + "/" + df;
+                        File f = new File(path).getAbsoluteFile();
+                        if(f.exists()){
+                            f.delete();
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return failed(null,"上传失败!失败原因:"+e.toString());
+        }
+        return success(tMaintenance);
+    }
+    @GetMapping(value = "/likeapproval/")
+    public RESTfulResult listLikeapproval(@RequestParam HashMap parmas, Integer pageNum, Integer pageSize) {
+        PageList<TMaintenance> list = tMaintenanceService.listLikeapproval(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    @PutMapping(value = "/pusAlla")
+    public RESTfulResult pusAlla(@RequestBody TMaintenance[]params) {
+        String datetime = DateUtils.getCurrentTime("yyyy-MM-dd");
+        for (int i = 0; i <params.length ; i++) {
+            String Declareid= params[i].getDeclareid();
+            String Billstatus= params[i].getBillstatus();
+            String approver = params[i].getApprover();
+            tMaintenanceService.pusMesAlla(Declareid,Billstatus,approver,datetime);
+        }
+        return success();
+    }
+}

+ 22 - 0
src/main/java/com/steerinfo/ems/tmaintenance/mapper/TMaintenanceMapper.java

@@ -0,0 +1,22 @@
+package com.steerinfo.ems.tmaintenance.mapper;
+
+import com.steerinfo.ems.tmaintenance.model.TMaintenance;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.List;
+import java.util.Map;
+
+import com.steerinfo.framework.service.pagehelper.PageList;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface TMaintenanceMapper extends IBaseMapper<TMaintenance, String> {
+    Integer selectMaxId(@Param(value = "declaretime") String mouth);
+    List<TMaintenance> selectAll();
+    Integer deleMes(@Param(value = "declareid")String ids,String timeid);
+    Integer pusMes(TMaintenance param);
+    Integer pusMesAll(@Param(value = "declareid")String declareid,@Param(value = "billstatus")String billstatus);
+    Integer pusMesAlla(@Param(value = "declareid")String declareid,@Param(value = "billstatus")String billstatus,@Param(value = "approver")String approver,@Param(value = "signtime")String datetime);
+    List<TMaintenance> selectLike(Map<String, Object> parameters);
+}

+ 679 - 0
src/main/java/com/steerinfo/ems/tmaintenance/mapper/TMaintenanceMapper.xml

@@ -0,0 +1,679 @@
+<?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.tmaintenance.mapper.TMaintenanceMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.tmaintenance.model.TMaintenance">
+    <id column="DECLAREID" jdbcType="VARCHAR" property="declareid" />
+    <result column="BILLSTATUS" jdbcType="VARCHAR" property="billstatus" />
+    <result column="EQUIPMENTNAME" jdbcType="VARCHAR" property="equipmentname" />
+    <result column="CHARGEMAN" jdbcType="VARCHAR" property="chargeman" />
+    <result column="APPLAYER" jdbcType="VARCHAR" property="applayer" />
+    <result column="REASONCONTENT" jdbcType="VARCHAR" property="reasoncontent" />
+    <result column="BZ" jdbcType="VARCHAR" property="bz" />
+    <result column="SIGNTIME" jdbcType="VARCHAR" property="signtime" />
+    <result column="APPROVER" jdbcType="VARCHAR" property="approver" />
+    <result column="CHARGETIME" jdbcType="VARCHAR" property="chargetime" />
+    <result column="DECLARETIME" jdbcType="VARCHAR" property="declaretime" />
+    <result column="RECORD" jdbcType="DECIMAL" property="record" />
+    <result column="FILENAME" jdbcType="VARCHAR" property="filename" />
+    <result column="DEVICENAME" jdbcType="VARCHAR" property="devicename" />
+    <result column="EQUIPMENT" jdbcType="VARCHAR" property="equipment" />
+    <result column="CONSTRUCTIONUNITS" jdbcType="VARCHAR" property="constructionunits" />
+    <result column="CONSTRUPEOPLE" jdbcType="VARCHAR" property="construpeople" />
+    <result column="CONSTRUDATE" jdbcType="VARCHAR" property="construdate" />
+    <result column="CONSTRUCONTENT" jdbcType="VARCHAR" property="construcontent" />
+    <result column="CONSTRUFILE" jdbcType="VARCHAR" property="construfile" />
+    <result column="RECORDER" jdbcType="VARCHAR" property="recorder" />
+  </resultMap>
+  <sql id="columns">
+    DECLAREID, BILLSTATUS, EQUIPMENTNAME, CHARGEMAN, APPLAYER, REASONCONTENT, BZ, SIGNTIME, 
+    APPROVER, CHARGETIME, DECLARETIME, RECORD, FILENAME, DEVICENAME, EQUIPMENT, CONSTRUCTIONUNITS, 
+    CONSTRUPEOPLE, CONSTRUDATE, CONSTRUCONTENT, CONSTRUFILE, RECORDER
+  </sql>
+  <sql id="columns_alias">
+    t.DECLAREID, t.BILLSTATUS, t.EQUIPMENTNAME, t.CHARGEMAN, t.APPLAYER, t.REASONCONTENT, 
+    t.BZ, t.SIGNTIME, t.APPROVER, t.CHARGETIME, t.DECLARETIME, t.RECORD, t.FILENAME, 
+    t.DEVICENAME, t.EQUIPMENT, t.CONSTRUCTIONUNITS, t.CONSTRUPEOPLE, t.CONSTRUDATE,
+    t.CONSTRUCONTENT, t.CONSTRUFILE, t.RECORDER
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM T_MAINTENANCE
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM T_MAINTENANCE t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="declareid != null and declareid != ''">
+        and DECLAREID = #{declareid}
+      </if>
+      <if test="billstatus != null and billstatus != ''">
+        and BILLSTATUS = #{billstatus}
+      </if>
+      <if test="equipmentname != null and equipmentname != ''">
+        and EQUIPMENTNAME = #{equipmentname}
+      </if>
+      <if test="chargeman != null and chargeman != ''">
+        and CHARGEMAN = #{chargeman}
+      </if>
+      <if test="applayer != null and applayer != ''">
+        and APPLAYER = #{applayer}
+      </if>
+      <if test="reasoncontent != null and reasoncontent != ''">
+        and REASONCONTENT = #{reasoncontent}
+      </if>
+      <if test="bz != null and bz != ''">
+        and BZ = #{bz}
+      </if>
+      <if test="signtime != null and signtime != ''">
+        and SIGNTIME = #{signtime}
+      </if>
+      <if test="approver != null and approver != ''">
+        and APPROVER = #{approver}
+      </if>
+      <if test="chargetime != null and chargetime != ''">
+        and CHARGETIME = #{chargetime}
+      </if>
+      <if test="declaretime != null and declaretime != ''">
+        and DECLARETIME = #{declaretime}
+      </if>
+      <if test="record != null">
+        and RECORD = #{record}
+      </if>
+      <if test="filename != null and filename != ''">
+        and FILENAME = #{filename}
+      </if>
+      <if test="devicename != null and devicename != ''">
+        and DEVICENAME = #{devicename}
+      </if>
+      <if test="equipment != null and equipment != ''">
+        and EQUIPMENT = #{equipment}
+      </if>
+      <if test="constructionunits != null and constructionunits != ''">
+        and CONSTRUCTIONUNITS = #{constructionunits}
+      </if>
+      <if test="construpeople != null and construpeople != ''">
+        and CONSTRUPEOPLE = #{construpeople}
+      </if>
+      <if test="construdate != null and construdate != ''">
+        and CONSTRUDATE = #{construdate}
+      </if>
+      <if test="construcontent != null and construcontent != ''">
+        and CONSTRUCONTENT = #{construcontent}
+      </if>
+      <if test="construfile != null and construfile != ''">
+        and CONSTRUFILE = #{construfile}
+      </if>
+      <if test="recorder != null and recorder != ''">
+        and RECORDER = #{recorder}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="declareid != null and declareid != ''">
+        and DECLAREID LIKE '%${declareid}%'
+      </if>
+      <if test="billstatus != null and billstatus != ''">
+        and BILLSTATUS LIKE '%${billstatus}%'
+      </if>
+      <if test="equipmentname != null and equipmentname != ''">
+        and EQUIPMENTNAME LIKE '%${equipmentname}%'
+      </if>
+      <if test="chargeman != null and chargeman != ''">
+        and CHARGEMAN LIKE '%${chargeman}%'
+      </if>
+      <if test="applayer != null and applayer != ''">
+        and APPLAYER LIKE '%${applayer}%'
+      </if>
+      <if test="reasoncontent != null and reasoncontent != ''">
+        and REASONCONTENT LIKE '%${reasoncontent}%'
+      </if>
+      <if test="bz != null and bz != ''">
+        and BZ LIKE '%${bz}%'
+      </if>
+      <if test="signtime != null and signtime != ''">
+        and SIGNTIME LIKE '%${signtime}%'
+      </if>
+      <if test="approver != null and approver != ''">
+        and APPROVER LIKE '%${approver}%'
+      </if>
+      <if test="chargetime != null and chargetime != ''">
+        and CHARGETIME LIKE '%${chargetime}%'
+      </if>
+      <if test="declaretime != null and declaretime != ''">
+        and DECLARETIME LIKE '%${declaretime}%'
+      </if>
+      <if test="record != null">
+        and RECORD != 0
+      </if>
+      <if test="filename != null and filename != ''">
+        and FILENAME LIKE '%${filename}%'
+      </if>
+      <if test="devicename != null and devicename != ''">
+        and DEVICENAME LIKE '%${devicename}%'
+      </if>
+      <if test="equipment != null and equipment != ''">
+        and EQUIPMENT LIKE '%${equipment}%'
+      </if>
+      <if test="constructionunits != null and constructionunits != ''">
+        and CONSTRUCTIONUNITS LIKE '%${constructionunits}%'
+      </if>
+      <if test="construpeople != null and construpeople != ''">
+        and CONSTRUPEOPLE LIKE '%${construpeople}%'
+      </if>
+      <if test="construdate != null and construdate != ''">
+        and CONSTRUDATE LIKE '%${construdate}%'
+      </if>
+      <if test="construcontent != null and construcontent != ''">
+        and CONSTRUCONTENT LIKE '%${construcontent}%'
+      </if>
+      <if test="construfile != null and construfile != ''">
+        and CONSTRUFILE LIKE '%${construfile}%'
+      </if>
+      <if test="recorder != null and recorder != ''">
+        and recorder LIKE '%${recorder}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from T_MAINTENANCE
+    where DECLAREID = #{declareid,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from T_MAINTENANCE
+    where 1!=1 
+      <if test="billstatus != null and billstatus != ''">
+        or BILLSTATUS = #{billstatus}
+      </if>
+      <if test="equipmentname != null and equipmentname != ''">
+        or EQUIPMENTNAME = #{equipmentname}
+      </if>
+      <if test="chargeman != null and chargeman != ''">
+        or CHARGEMAN = #{chargeman}
+      </if>
+      <if test="applayer != null and applayer != ''">
+        or APPLAYER = #{applayer}
+      </if>
+      <if test="reasoncontent != null and reasoncontent != ''">
+        or REASONCONTENT = #{reasoncontent}
+      </if>
+      <if test="bz != null and bz != ''">
+        or BZ = #{bz}
+      </if>
+      <if test="signtime != null and signtime != ''">
+        or SIGNTIME = #{signtime}
+      </if>
+      <if test="approver != null and approver != ''">
+        or APPROVER = #{approver}
+      </if>
+      <if test="chargetime != null and chargetime != ''">
+        or CHARGETIME = #{chargetime}
+      </if>
+      <if test="declaretime != null and declaretime != ''">
+        or DECLARETIME = #{declaretime}
+      </if>
+      <if test="record != null">
+        or RECORD = #{record}
+      </if>
+      <if test="filename != null and filename != ''">
+        or FILENAME = #{filename}
+      </if>
+      <if test="devicename != null and devicename != ''">
+        or DEVICENAME = #{devicename}
+      </if>
+      <if test="equipment != null and equipment != ''">
+        or EQUIPMENT = #{equipment}
+      </if>
+      <if test="constructionunits != null and constructionunits != ''">
+        or CONSTRUCTIONUNITS = #{constructionunits}
+      </if>
+      <if test="construpeople != null and construpeople != ''">
+        or CONSTRUPEOPLE = #{construpeople}
+      </if>
+      <if test="construdate != null and construdate != ''">
+        or CONSTRUDATE = #{construdate}
+      </if>
+      <if test="construcontent != null and construcontent != ''">
+        or CONSTRUCONTENT = #{construcontent}
+      </if>
+      <if test="construfile != null and construfile != ''">
+        or CONSTRUFILE = #{construfile}
+      </if>
+      <if test="recorder != null and recorder != ''">
+        or RECORDER = #{recorder}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.tmaintenance.model.TMaintenance">
+    insert into T_MAINTENANCE (DECLAREID, BILLSTATUS, EQUIPMENTNAME, 
+      CHARGEMAN, APPLAYER, REASONCONTENT, 
+      BZ, SIGNTIME, APPROVER, 
+      CHARGETIME, DECLARETIME, RECORD, 
+      FILENAME, DEVICENAME, EQUIPMENT, 
+      CONSTRUCTIONUNITS, CONSTRUPEOPLE, CONSTRUDATE,
+      CONSTRUCONTENT, CONSTRUFILE, RECORDER
+      )
+    values (#{declareid,jdbcType=VARCHAR}, #{billstatus,jdbcType=VARCHAR}, #{equipmentname,jdbcType=VARCHAR}, 
+      #{chargeman,jdbcType=VARCHAR}, #{applayer,jdbcType=VARCHAR}, #{reasoncontent,jdbcType=VARCHAR}, 
+      #{bz,jdbcType=VARCHAR}, #{signtime,jdbcType=VARCHAR}, #{approver,jdbcType=VARCHAR}, 
+      #{chargetime,jdbcType=VARCHAR}, #{declaretime,jdbcType=VARCHAR}, #{record,jdbcType=DECIMAL}, 
+      #{filename,jdbcType=VARCHAR}, #{devicename,jdbcType=VARCHAR}, #{equipment,jdbcType=VARCHAR}, 
+      #{constructionunits,jdbcType=VARCHAR}, #{construpeople,jdbcType=VARCHAR}, #{construdate,jdbcType=VARCHAR}, 
+      #{construcontent,jdbcType=VARCHAR}, #{construfile,jdbcType=VARCHAR}, #{recorder,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.tmaintenance.model.TMaintenance">
+    insert into T_MAINTENANCE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="declareid != null">
+        DECLAREID,
+      </if>
+      <if test="billstatus != null">
+        BILLSTATUS,
+      </if>
+      <if test="equipmentname != null">
+        EQUIPMENTNAME,
+      </if>
+      <if test="chargeman != null">
+        CHARGEMAN,
+      </if>
+      <if test="applayer != null">
+        APPLAYER,
+      </if>
+      <if test="reasoncontent != null">
+        REASONCONTENT,
+      </if>
+      <if test="bz != null">
+        BZ,
+      </if>
+      <if test="signtime != null">
+        SIGNTIME,
+      </if>
+      <if test="approver != null">
+        APPROVER,
+      </if>
+      <if test="chargetime != null">
+        CHARGETIME,
+      </if>
+      <if test="declaretime != null">
+        DECLARETIME,
+      </if>
+      <if test="record != null">
+        RECORD,
+      </if>
+      <if test="filename != null">
+        FILENAME,
+      </if>
+      <if test="devicename != null">
+        DEVICENAME,
+      </if>
+      <if test="equipment != null">
+        EQUIPMENT,
+      </if>
+      <if test="constructionunits != null">
+        CONSTRUCTIONUNITS,
+      </if>
+      <if test="construpeople != null">
+        CONSTRUPEOPLE,
+      </if>
+      <if test="construdate != null">
+        CONSTRUDATE,
+      </if>
+      <if test="construcontent != null">
+        CONSTRUCONTENT,
+      </if>
+      <if test="construfile != null">
+        CONSTRUFILE,
+      </if>
+      <if test="recorder != null">
+        RECORDER,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="declareid != null">
+        #{declareid,jdbcType=VARCHAR},
+      </if>
+      <if test="billstatus != null">
+        #{billstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="equipmentname != null">
+        #{equipmentname,jdbcType=VARCHAR},
+      </if>
+      <if test="chargeman != null">
+        #{chargeman,jdbcType=VARCHAR},
+      </if>
+      <if test="applayer != null">
+        #{applayer,jdbcType=VARCHAR},
+      </if>
+      <if test="reasoncontent != null">
+        #{reasoncontent,jdbcType=VARCHAR},
+      </if>
+      <if test="bz != null">
+        #{bz,jdbcType=VARCHAR},
+      </if>
+      <if test="signtime != null">
+        #{signtime,jdbcType=VARCHAR},
+      </if>
+      <if test="approver != null">
+        #{approver,jdbcType=VARCHAR},
+      </if>
+      <if test="chargetime != null">
+        #{chargetime,jdbcType=VARCHAR},
+      </if>
+      <if test="declaretime != null">
+        #{declaretime,jdbcType=VARCHAR},
+      </if>
+      <if test="record != null">
+        #{record,jdbcType=DECIMAL},
+      </if>
+      <if test="filename != null">
+        #{filename,jdbcType=VARCHAR},
+      </if>
+      <if test="devicename != null">
+        #{devicename,jdbcType=VARCHAR},
+      </if>
+      <if test="equipment != null">
+        #{equipment,jdbcType=VARCHAR},
+      </if>
+      <if test="constructionunits != null">
+        #{constructionunits,jdbcType=VARCHAR},
+      </if>
+      <if test="construpeople != null">
+        #{construpeople,jdbcType=VARCHAR},
+      </if>
+      <if test="construdate != null">
+        #{construdate,jdbcType=VARCHAR},
+      </if>
+      <if test="construcontent != null">
+        #{construcontent,jdbcType=VARCHAR},
+      </if>
+      <if test="construfile != null">
+        #{construfile,jdbcType=VARCHAR},
+      </if>
+      <if test="recorder != null">
+        #{recorder,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.tmaintenance.model.TMaintenance">
+    update T_MAINTENANCE
+    set BILLSTATUS = #{billstatus,jdbcType=VARCHAR},
+      EQUIPMENTNAME = #{equipmentname,jdbcType=VARCHAR},
+      CHARGEMAN = #{chargeman,jdbcType=VARCHAR},
+      APPLAYER = #{applayer,jdbcType=VARCHAR},
+      REASONCONTENT = #{reasoncontent,jdbcType=VARCHAR},
+      BZ = #{bz,jdbcType=VARCHAR},
+      SIGNTIME = #{signtime,jdbcType=VARCHAR},
+      APPROVER = #{approver,jdbcType=VARCHAR},
+      CHARGETIME = #{chargetime,jdbcType=VARCHAR},
+      DECLARETIME = #{declaretime,jdbcType=VARCHAR},
+      RECORD = #{record,jdbcType=DECIMAL},
+      FILENAME = #{filename,jdbcType=VARCHAR},
+      DEVICENAME = #{devicename,jdbcType=VARCHAR},
+      EQUIPMENT = #{equipment,jdbcType=VARCHAR},
+      CONSTRUCTIONUNITS = #{constructionunits,jdbcType=VARCHAR},
+      CONSTRUPEOPLE = #{construpeople,jdbcType=VARCHAR},
+      CONSTRUDATE = #{construdate,jdbcType=VARCHAR},
+      CONSTRUCONTENT = #{construcontent,jdbcType=VARCHAR},
+      CONSTRUFILE = #{construfile,jdbcType=VARCHAR},
+      RECORDER = #{recorder,jdbcType=VARCHAR}
+    where DECLAREID = #{declareid,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.tmaintenance.model.TMaintenance">
+    update T_MAINTENANCE
+    <set>
+      <if test="billstatus != null">
+        BILLSTATUS = #{billstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="equipmentname != null">
+        EQUIPMENTNAME = #{equipmentname,jdbcType=VARCHAR},
+      </if>
+      <if test="chargeman != null">
+        CHARGEMAN = #{chargeman,jdbcType=VARCHAR},
+      </if>
+      <if test="applayer != null">
+        APPLAYER = #{applayer,jdbcType=VARCHAR},
+      </if>
+      <if test="reasoncontent != null">
+        REASONCONTENT = #{reasoncontent,jdbcType=VARCHAR},
+      </if>
+      <if test="bz != null">
+        BZ = #{bz,jdbcType=VARCHAR},
+      </if>
+      <if test="signtime != null">
+        SIGNTIME = #{signtime,jdbcType=VARCHAR},
+      </if>
+      <if test="approver != null">
+        APPROVER = #{approver,jdbcType=VARCHAR},
+      </if>
+      <if test="chargetime != null">
+        CHARGETIME = #{chargetime,jdbcType=VARCHAR},
+      </if>
+      <if test="declaretime != null">
+        DECLARETIME = #{declaretime,jdbcType=VARCHAR},
+      </if>
+      <if test="record != null">
+        RECORD = #{record,jdbcType=DECIMAL},
+      </if>
+      <if test="filename != null">
+        FILENAME = #{filename,jdbcType=VARCHAR},
+      </if>
+      <if test="devicename != null">
+        DEVICENAME = #{devicename,jdbcType=VARCHAR},
+      </if>
+      <if test="equipment != null">
+        EQUIPMENT = #{equipment,jdbcType=VARCHAR},
+      </if>
+      <if test="constructionunits != null">
+        CONSTRUCTIONUNITS = #{constructionunits,jdbcType=VARCHAR},
+      </if>
+      <if test="construpeople != null">
+        CONSTRUPEOPLE = #{construpeople,jdbcType=VARCHAR},
+      </if>
+      <if test="construdate != null">
+        CONSTRUDATE = #{construdate,jdbcType=VARCHAR},
+      </if>
+      <if test="construcontent != null">
+        CONSTRUCONTENT = #{construcontent,jdbcType=VARCHAR},
+      </if>
+      <if test="construfile != null">
+        CONSTRUFILE = #{construfile,jdbcType=VARCHAR},
+      </if>
+      <if test="recorder != null">
+        RECORDER = #{recorder,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where DECLAREID = #{declareid,jdbcType=VARCHAR} and RECORD >0
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where DECLAREID = #{declareid,jdbcType=VARCHAR} and RECORD >0
+  </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 T_MAINTENANCE 
+      (DECLAREID, 
+      BILLSTATUS, EQUIPMENTNAME, CHARGEMAN, 
+      APPLAYER, REASONCONTENT, BZ, 
+      SIGNTIME, APPROVER, CHARGETIME, 
+      DECLARETIME, RECORD, FILENAME, 
+      DEVICENAME, EQUIPMENT, CONSTRUCTIONUNITS, 
+      CONSTRUPEOPLE, CONSTRUDATE, CONSTRUCONTENT,
+      CONSTRUFILE, RECORDER)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.declareid,jdbcType=VARCHAR}, 
+      #{item.billstatus,jdbcType=VARCHAR}, #{item.equipmentname,jdbcType=VARCHAR}, #{item.chargeman,jdbcType=VARCHAR}, 
+      #{item.applayer,jdbcType=VARCHAR}, #{item.reasoncontent,jdbcType=VARCHAR}, #{item.bz,jdbcType=VARCHAR}, 
+      #{item.signtime,jdbcType=VARCHAR}, #{item.approver,jdbcType=VARCHAR}, #{item.chargetime,jdbcType=VARCHAR}, 
+      #{item.declaretime,jdbcType=VARCHAR}, #{item.record,jdbcType=DECIMAL}, #{item.filename,jdbcType=VARCHAR}, 
+      #{item.devicename,jdbcType=VARCHAR}, #{item.equipment,jdbcType=VARCHAR}, #{item.constructionunits,jdbcType=VARCHAR}, 
+      #{item.construpeople,jdbcType=VARCHAR}, #{item.construdate,jdbcType=VARCHAR}, #{item.construcontent,jdbcType=VARCHAR}, 
+      #{item.construfile,jdbcType=VARCHAR}, #{item.recorder,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update T_MAINTENANCE
+     set
+       DECLAREID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.declareid,jdbcType=VARCHAR}
+       </foreach>
+       ,BILLSTATUS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.billstatus,jdbcType=VARCHAR}
+       </foreach>
+       ,EQUIPMENTNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.equipmentname,jdbcType=VARCHAR}
+       </foreach>
+       ,CHARGEMAN=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.chargeman,jdbcType=VARCHAR}
+       </foreach>
+       ,APPLAYER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.applayer,jdbcType=VARCHAR}
+       </foreach>
+       ,REASONCONTENT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.reasoncontent,jdbcType=VARCHAR}
+       </foreach>
+       ,BZ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.bz,jdbcType=VARCHAR}
+       </foreach>
+       ,SIGNTIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.signtime,jdbcType=VARCHAR}
+       </foreach>
+       ,APPROVER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.approver,jdbcType=VARCHAR}
+       </foreach>
+       ,CHARGETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.chargetime,jdbcType=VARCHAR}
+       </foreach>
+       ,DECLARETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.declaretime,jdbcType=VARCHAR}
+       </foreach>
+       ,RECORD=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.record,jdbcType=DECIMAL}
+       </foreach>
+       ,FILENAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.filename,jdbcType=VARCHAR}
+       </foreach>
+       ,DEVICENAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.devicename,jdbcType=VARCHAR}
+       </foreach>
+       ,EQUIPMENT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.equipment,jdbcType=VARCHAR}
+       </foreach>
+       ,CONSTRUCTIONUNITS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.constructionunits,jdbcType=VARCHAR}
+       </foreach>
+       ,CONSTRUPEOPLE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.construpeople,jdbcType=VARCHAR}
+       </foreach>
+       ,CONSTRUDATE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.construdate,jdbcType=VARCHAR}
+       </foreach>
+       ,CONSTRUCONTENT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.construcontent,jdbcType=VARCHAR}
+       </foreach>
+       ,CONSTRUFILE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.construfile,jdbcType=VARCHAR}
+       </foreach>
+       ,RECORDER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DECLAREID" close="end">
+          when #{item.declareid,jdbcType=VARCHAR} then #{item.recorder,jdbcType=VARCHAR}
+       </foreach>
+     where DECLAREID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.declareid,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from T_MAINTENANCE
+    where DECLAREID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="selectMaxId" resultType="java.lang.Integer" >
+    SELECT MAX(RECORD) FROM T_MAINTENANCE where DECLARETIME LIKE '%${declaretime}%'
+  </select>
+
+  <select id="selectAll" resultMap="BaseResultMap" parameterType="string">
+    SELECT * FROM T_MAINTENANCE where record > 0
+  </select>
+
+  <update id="deleMes" parameterType="string">
+    update T_MAINTENANCE set
+    RECORD = 0
+    <where>
+      declareid in
+      #{declareid,jdbcType=VARCHAR}
+    </where>
+  </update>
+  <update id="pusMes" parameterType ="com.steerinfo.ems.tmaintenance.model.TMaintenance">
+    update T_MAINTENANCE set
+    EQUIPMENTNAME = #{equipmentname,jdbcType=VARCHAR}, CHARGEMAN =#{chargeman,jdbcType=VARCHAR},
+    REASONCONTENT=#{reasoncontent,jdbcType=VARCHAR}, BZ=#{bz,jdbcType=VARCHAR},
+    DECLARETIME = #{declaretime,jdbcType=VARCHAR},BILLSTATUS = #{billstatus,jdbcType=VARCHAR}
+    <where>
+      declareid in #{declareid,jdbcType=VARCHAR}
+    </where>
+  </update>
+
+  <select id="select" resultMap="BaseResultMap" parameterType="string">
+    SELECT * FROM T_MAINTENANCE
+  </select>
+
+  <update id="pusMesAll" parameterType ="String">
+    update T_MAINTENANCE set
+    BILLSTATUS = #{billstatus,jdbcType=VARCHAR}
+    <where>
+      declareid in #{declareid,jdbcType=VARCHAR}
+    </where>
+  </update>
+
+  <select id="selectLike" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    select DECLAREID, BILLSTATUS, EQUIPMENTNAME, CHARGEMAN, APPLAYER, REASONCONTENT, BZ, SIGNTIME,
+    APPROVER, CHARGETIME, DECLARETIME,FILENAME, RECORD,DEVICENAME, EQUIPMENT, CONSTRUCTIONUNITS,
+    CONSTRUPEOPLE from T_MAINTENANCE
+    <where>
+      BILLSTATUS in ('已通过','已驳回','审核中') and RECORD != 0
+    </where>
+  </select>
+
+  <update id="pusMesAlla" parameterType ="String">
+    update T_MAINTENANCE set
+    BILLSTATUS = #{billstatus,jdbcType=VARCHAR},
+    APPROVER = #{approver,jdbcType=VARCHAR},
+    SIGNTIME = #{signtime,jdbcType=VARCHAR}
+    <where>
+      declareid in #{declareid,jdbcType=VARCHAR}
+    </where>
+  </update>
+
+</mapper>

+ 346 - 0
src/main/java/com/steerinfo/ems/tmaintenance/model/TMaintenance.java

@@ -0,0 +1,346 @@
+package com.steerinfo.ems.tmaintenance.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(value="null")
+public class TMaintenance implements IBasePO<String> {
+    /**
+     * 申报序号(DECLAREID,VARCHAR,255)
+     */
+    @ApiModelProperty(value="申报序号",required=true)
+    private String declareid;
+
+    /**
+     * 审核状态(BILLSTATUS,VARCHAR,255)
+     */
+    @ApiModelProperty(value="审核状态",required=true)
+    private String billstatus;
+
+    /**
+     * 检修类型(EQUIPMENTNAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="检修类型",required=true)
+    private String equipmentname;
+
+    /**
+     * 申请人(CHARGEMAN,VARCHAR,255)
+     */
+    @ApiModelProperty(value="申请人",required=true)
+    private String chargeman;
+
+    /**
+     * 申请单位(APPLAYER,VARCHAR,255)
+     */
+    @ApiModelProperty(value="申请单位",required=true)
+    private String applayer;
+
+    /**
+     * 申请内容(REASONCONTENT,VARCHAR,255)
+     */
+    @ApiModelProperty(value="申请内容",required=true)
+    private String reasoncontent;
+
+    /**
+     * 备注(BZ,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String bz;
+
+    /**
+     * 审批时间(SIGNTIME,VARCHAR,11)
+     */
+    @ApiModelProperty(value="审批时间",required=false)
+    private String signtime;
+
+    /**
+     * 审批人(APPROVER,VARCHAR,255)
+     */
+    @ApiModelProperty(value="审批人",required=false)
+    private String approver;
+
+    /**
+     * 申请时间(CHARGETIME,VARCHAR,11)
+     */
+    @ApiModelProperty(value="申请时间",required=true)
+    private String chargetime;
+
+    /**
+     * 申报日期(DECLARETIME,VARCHAR,11)
+     */
+    @ApiModelProperty(value="申报日期",required=true)
+    private String declaretime;
+
+    /**
+     * 记录序号(RECORD,DECIMAL,9)
+     */
+    @ApiModelProperty(value="记录序号",required=false)
+    private Integer record;
+
+    /**
+     * 文件名称(FILENAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="文件名称",required=false)
+    private String filename;
+
+    /**
+     * 设备名称(DEVICENAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="设备名称",required=false)
+    private String devicename;
+
+    /**
+     * 设备分类(EQUIPMENT,VARCHAR,255)
+     */
+    @ApiModelProperty(value="设备分类",required=false)
+    private String equipment;
+
+    /**
+     * 施工单位(CONSTRUCTIONUNITS,VARCHAR,255)
+     */
+    @ApiModelProperty(value="施工单位",required=false)
+    private String constructionunits;
+
+    /**
+     * 施工人数(CONSTRUPEOPLE ,VARCHAR,255)
+     */
+    @ApiModelProperty(value="施工人数",required=false)
+    private String construpeople;
+
+    /**
+     * 施工日期(CONSTRUDATE,VARCHAR,11)
+     */
+    @ApiModelProperty(value="施工日期",required=false)
+    private String construdate;
+
+    /**
+     * 施工内容(CONSTRUCONTENT,VARCHAR,255)
+     */
+    @ApiModelProperty(value="施工内容",required=false)
+    private String construcontent;
+
+    /**
+     * 施工文件名称(CONSTRUFILE,VARCHAR,255)
+     */
+    @ApiModelProperty(value="施工文件名称",required=false)
+    private String construfile;
+
+    /**
+     * 记录人员(RECORDER,VARCHAR,255)
+     */
+    @ApiModelProperty(value="记录人员",required=false)
+    private String recorder;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.declareid;
+    }
+
+    @Override
+    public void setId(String declareid) {
+        this.declareid = declareid == null ? null : declareid.trim();
+    }
+
+    public String getDeclareid() {
+        return declareid;
+    }
+
+    public void setDeclareid(String declareid) {
+        this.declareid = declareid == null ? null : declareid.trim();
+    }
+
+    public String getBillstatus() {
+        return billstatus;
+    }
+
+    public void setBillstatus(String billstatus) {
+        this.billstatus = billstatus == null ? null : billstatus.trim();
+    }
+
+    public String getEquipmentname() {
+        return equipmentname;
+    }
+
+    public void setEquipmentname(String equipmentname) {
+        this.equipmentname = equipmentname == null ? null : equipmentname.trim();
+    }
+
+    public String getChargeman() {
+        return chargeman;
+    }
+
+    public void setChargeman(String chargeman) {
+        this.chargeman = chargeman == null ? null : chargeman.trim();
+    }
+
+    public String getApplayer() {
+        return applayer;
+    }
+
+    public void setApplayer(String applayer) {
+        this.applayer = applayer == null ? null : applayer.trim();
+    }
+
+    public String getReasoncontent() {
+        return reasoncontent;
+    }
+
+    public void setReasoncontent(String reasoncontent) {
+        this.reasoncontent = reasoncontent == null ? null : reasoncontent.trim();
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz == null ? null : bz.trim();
+    }
+
+    public String getSigntime() {
+        return signtime;
+    }
+
+    public void setSigntime(String signtime) {
+        this.signtime = signtime == null ? null : signtime.trim();
+    }
+
+    public String getApprover() {
+        return approver;
+    }
+
+    public void setApprover(String approver) {
+        this.approver = approver == null ? null : approver.trim();
+    }
+
+    public String getChargetime() {
+        return chargetime;
+    }
+
+    public void setChargetime(String chargetime) {
+        this.chargetime = chargetime == null ? null : chargetime.trim();
+    }
+
+    public String getDeclaretime() {
+        return declaretime;
+    }
+
+    public void setDeclaretime(String declaretime) {
+        this.declaretime = declaretime == null ? null : declaretime.trim();
+    }
+
+    public Integer getRecord() {
+        return record;
+    }
+
+    public void setRecord(Integer record) {
+        this.record = record;
+    }
+
+    public String getFilename() {
+        return filename;
+    }
+
+    public void setFilename(String filename) {
+        this.filename = filename == null ? null : filename.trim();
+    }
+
+    public String getDevicename() {
+        return devicename;
+    }
+
+    public void setDevicename(String devicename) {
+        this.devicename = devicename == null ? null : devicename.trim();
+    }
+
+    public String getEquipment() {
+        return equipment;
+    }
+
+    public void setEquipment(String equipment) {
+        this.equipment = equipment == null ? null : equipment.trim();
+    }
+
+    public String getConstructionunits() {
+        return constructionunits;
+    }
+
+    public void setConstructionunits(String constructionunits) {
+        this.constructionunits = constructionunits == null ? null : constructionunits.trim();
+    }
+
+    public String getConstrupeople() {
+        return construpeople;
+    }
+
+    public void setConstrupeople(String construpeople) {
+        this.construpeople = construpeople == null ? null : construpeople.trim();
+    }
+
+    public String getConstrudate() {
+        return construdate;
+    }
+
+    public void setConstrudate(String construdate) {
+        this.construdate = construdate == null ? null : construdate.trim();
+    }
+
+    public String getConstrucontent() {
+        return construcontent;
+    }
+
+    public void setConstrucontent(String construcontent) {
+        this.construcontent = construcontent == null ? null : construcontent.trim();
+    }
+
+    public String getConstrufile() {
+        return construfile;
+    }
+
+    public void setConstrufile(String construfile) {
+        this.construfile = construfile == null ? null : construfile.trim();
+    }
+
+    public String getRecorder() {
+        return recorder;
+    }
+
+    public void setRecorder(String recorder) {
+        this.recorder = recorder == null ? null : recorder.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", declareid=").append(declareid);
+        sb.append(", billstatus=").append(billstatus);
+        sb.append(", equipmentname=").append(equipmentname);
+        sb.append(", chargeman=").append(chargeman);
+        sb.append(", applayer=").append(applayer);
+        sb.append(", reasoncontent=").append(reasoncontent);
+        sb.append(", bz=").append(bz);
+        sb.append(", signtime=").append(signtime);
+        sb.append(", approver=").append(approver);
+        sb.append(", chargetime=").append(chargetime);
+        sb.append(", declaretime=").append(declaretime);
+        sb.append(", record=").append(record);
+        sb.append(", filename=").append(filename);
+        sb.append(", devicename=").append(devicename);
+        sb.append(", equipment=").append(equipment);
+        sb.append(", constructionunits=").append(constructionunits);
+        sb.append(", construpeople=").append(construpeople);
+        sb.append(", construdate=").append(construdate);
+        sb.append(", construcontent=").append(construcontent);
+        sb.append(", construfile=").append(construfile);
+        sb.append(", recorder=").append(recorder);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 34 - 0
src/main/java/com/steerinfo/ems/tmaintenance/service/ITMaintenanceService.java

@@ -0,0 +1,34 @@
+package com.steerinfo.ems.tmaintenance.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ems.tmaintenance.model.TMaintenance;
+import com.steerinfo.framework.service.pagehelper.PageList;
+
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TMaintenance服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-06-09 09:13
+ * 类描述
+ * 修订历史:
+ * 日期:2022-06-09
+ * 作者:generator
+ * 参考:
+ * 描述:TMaintenance服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITMaintenanceService extends IBaseService<TMaintenance, String>{
+    Integer MaxID(String mount);
+    List<TMaintenance> selectAll();
+    Integer deleMes(String ids,String id);
+    Integer pusMes(TMaintenance param);
+    Integer pusMesAll(String declareid,String billstatus);
+    Integer pusMesAlla(String declareid,String billstatus,String approver,String datetime);
+    PageList<TMaintenance> listLikeapproval(Map<String, Object> parameters, Integer pageNum, Integer pageSize);
+
+}

+ 94 - 0
src/main/java/com/steerinfo/ems/tmaintenance/service/impl/TMaintenanceServiceImpl.java

@@ -0,0 +1,94 @@
+package com.steerinfo.ems.tmaintenance.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.tmaintenance.model.TMaintenance;
+import com.steerinfo.ems.tmaintenance.mapper.TMaintenanceMapper;
+import com.steerinfo.ems.tmaintenance.service.ITMaintenanceService;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TMaintenance服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-06-09 09:13
+ * 类描述
+ * 修订历史:
+ * 日期:2022-06-09
+ * 作者:generator
+ * 参考:
+ * 描述:TMaintenance服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tMaintenanceService")
+public class TMaintenanceServiceImpl extends BaseServiceImpl<TMaintenance, String> implements ITMaintenanceService {
+
+    @Autowired
+    private TMaintenanceMapper tMaintenanceMapper;
+
+    @Override
+    protected IBaseMapper<TMaintenance, String> getMapper() {
+        return tMaintenanceMapper;
+    }
+    @Override
+    public Integer MaxID(String mouth) {
+        Integer maxId = tMaintenanceMapper.selectMaxId(mouth);
+        if (maxId == null || maxId == 0) {
+            maxId = 1;
+        } else {
+            maxId = maxId + 1;
+        }
+        return maxId;
+    }
+
+    @Override
+    public List<TMaintenance> selectAll() {
+        return tMaintenanceMapper.selectAll();
+    }
+
+    @Override
+    public Integer deleMes(String ids, String id) {
+        if ("".equals(ids) || ids == null) {
+            return 0;
+        } else {
+            int count = tMaintenanceMapper.deleMes(ids, id);
+            return count;
+        }
+    }
+
+    @Override
+    public Integer pusMes(TMaintenance params) {
+        int count = 0;
+
+        count = tMaintenanceMapper.pusMes(params);
+
+        return count;
+    }
+
+    @Override
+    public Integer pusMesAll(String declareid,String billstatus) {
+        int count= tMaintenanceMapper.pusMesAll(declareid,billstatus);
+        return count;
+    }
+
+    @Override
+    public PageList<TMaintenance> listLikeapproval(Map<String, Object> parameters, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<TMaintenance> rows = tMaintenanceMapper.selectLike(parameters);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
+
+    @Override
+    public Integer pusMesAlla(String declareid,String billstatus,String approver,String datetime) {
+        int count= tMaintenanceMapper.pusMesAlla(declareid,billstatus,approver,datetime);
+        return count;
+    }
+}

+ 149 - 0
src/main/java/com/steerinfo/ems/tmaintenancefile/controller/TMaintenanceFileController.java

@@ -0,0 +1,149 @@
+package com.steerinfo.ems.tmaintenancefile.controller;
+
+import com.steerinfo.auth.utils.JwtUtil;
+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.tmaintenancefile.model.TMaintenanceFile;
+import com.steerinfo.ems.tmaintenancefile.service.ITMaintenanceFileService;
+import com.steerinfo.ftp.securitytype.model.SecurityType;
+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.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+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;
+
+/**
+ * TMaintenanceFile RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-06-06 02:51
+ * 类描述
+ * 修订历史:
+ * 日期:2022-06-06
+ * 作者:generator
+ * 参考:
+ * 描述:TMaintenanceFile RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+    @RequestMapping("/${api.version}/tmaintenancefiles")
+public class TMaintenanceFileController extends BaseRESTfulController {
+    @Autowired
+    private FtpFileUtil ftpFileUtil;
+    @Autowired
+    ITMaintenanceFileService tMaintenanceFileService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("tmaintenancefile:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<TMaintenanceFile> list = tMaintenanceFileService.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("tmaintenancefile:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<TMaintenanceFile> list = tMaintenanceFileService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据TMaintenanceFile对象创建")
+    @ApiImplicitParam(name = "tMaintenanceFile", value = "详细实体tMaintenanceFile", required = true, dataType = "TMaintenanceFile")
+    //@RequiresPermissions("tmaintenancefile:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute TMaintenanceFile model){
+        TMaintenanceFile tMaintenanceFile = tMaintenanceFileService.add(model);
+        return success(tMaintenanceFile);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("tmaintenancefile:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        TMaintenanceFile tMaintenanceFile = tMaintenanceFileService.getById(id);
+        return success(tMaintenanceFile);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的tMaintenanceFile信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "tMaintenanceFile", value = "详细实体tMaintenanceFile", required = true, dataType = "TMaintenanceFile")
+    })
+    //@RequiresPermissions("tmaintenancefile:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody TMaintenanceFile model){
+        model.setId(id);
+        TMaintenanceFile tMaintenanceFile = tMaintenanceFileService.modify(model);
+        return success(tMaintenanceFile);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("tmaintenancefile: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);
+			  tMaintenanceFileService.delete(ids);
+    	}
+      return success();
+    }
+
+    @PostMapping("/file")
+    public RESTfulResult fileUpload(@ModelAttribute MultipartFile[] files){
+        String filesid = "";
+        for (int i = 0; i < files.length; i++) {
+            try {
+                String userId = JwtUtil.getUseridByToken();
+                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("/yyyy/MM/dd");
+                String oldName = files[i].getOriginalFilename();
+                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) {
+                    TMaintenanceFile uploadFile = new TMaintenanceFile();
+                    uploadFile.setFilename(oldName);
+                    uploadFile.setFilepath(filePath + "/" + newName);
+                    TMaintenanceFile model = tMaintenanceFileService.add(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/tmaintenancefile/mapper/TMaintenanceFileMapper.java

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

+ 162 - 0
src/main/java/com/steerinfo/ems/tmaintenancefile/mapper/TMaintenanceFileMapper.xml

@@ -0,0 +1,162 @@
+<?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.tmaintenancefile.mapper.TMaintenanceFileMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.tmaintenancefile.model.TMaintenanceFile">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="FILENAME" jdbcType="VARCHAR" property="filename" />
+    <result column="FILEPATH" jdbcType="VARCHAR" property="filepath" />
+  </resultMap>
+  <sql id="columns">
+    ID, FILENAME, FILEPATH
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.FILENAME, t.FILEPATH
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM T_MAINTENANCE_FILE
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM T_MAINTENANCE_FILE t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID = #{id}
+      </if>
+      <if test="filename != null and filename != ''">
+        and FILENAME = #{filename}
+      </if>
+      <if test="filepath != null and filepath != ''">
+        and FILEPATH = #{filepath}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID LIKE '%${id}%'
+      </if>
+      <if test="filename != null and filename != ''">
+        and FILENAME LIKE '%${filename}%'
+      </if>
+      <if test="filepath != null and filepath != ''">
+        and FILEPATH LIKE '%${filepath}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from T_MAINTENANCE_FILE
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from T_MAINTENANCE_FILE
+    where 1!=1 
+      <if test="filename != null and filename != ''">
+        or FILENAME = #{filename}
+      </if>
+      <if test="filepath != null and filepath != ''">
+        or FILEPATH = #{filepath}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.tmaintenancefile.model.TMaintenanceFile">
+    insert into T_MAINTENANCE_FILE (ID, FILENAME, FILEPATH
+      )
+    values (#{id,jdbcType=VARCHAR}, #{filename,jdbcType=VARCHAR}, #{filepath,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.tmaintenancefile.model.TMaintenanceFile">
+    insert into T_MAINTENANCE_FILE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="filename != null">
+        FILENAME,
+      </if>
+      <if test="filepath != null">
+        FILEPATH,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="filename != null">
+        #{filename,jdbcType=VARCHAR},
+      </if>
+      <if test="filepath != null">
+        #{filepath,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.tmaintenancefile.model.TMaintenanceFile">
+    update T_MAINTENANCE_FILE
+    set FILENAME = #{filename,jdbcType=VARCHAR},
+      FILEPATH = #{filepath,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.tmaintenancefile.model.TMaintenanceFile">
+    update T_MAINTENANCE_FILE
+    <set>
+      <if test="filename != null">
+        FILENAME = #{filename,jdbcType=VARCHAR},
+      </if>
+      <if test="filepath != null">
+        FILEPATH = #{filepath,jdbcType=VARCHAR},
+      </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 T_MAINTENANCE_FILE 
+      (ID, 
+      FILENAME, FILEPATH)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=VARCHAR}, 
+      #{item.filename,jdbcType=VARCHAR}, #{item.filepath,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update T_MAINTENANCE_FILE
+     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>
+       ,FILENAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.filename,jdbcType=VARCHAR}
+       </foreach>
+       ,FILEPATH=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.filepath,jdbcType=VARCHAR}
+       </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 T_MAINTENANCE_FILE
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 66 - 0
src/main/java/com/steerinfo/ems/tmaintenancefile/model/TMaintenanceFile.java

@@ -0,0 +1,66 @@
+package com.steerinfo.ems.tmaintenancefile.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(value="null")
+public class TMaintenanceFile implements IBasePO<String> {
+    /**
+     * 文件ID(ID,VARCHAR,255)
+     */
+    @ApiModelProperty(value="文件ID",required=true)
+    private String id;
+
+    /**
+     * 文件名(FILENAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="文件名",required=false)
+    private String filename;
+
+    /**
+     * 文件路径(FILEPATH,VARCHAR,255)
+     */
+    @ApiModelProperty(value="文件路径",required=false)
+    private String filepath;
+
+    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 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();
+    }
+
+    @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(", filename=").append(filename);
+        sb.append(", filepath=").append(filepath);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 23 - 0
src/main/java/com/steerinfo/ems/tmaintenancefile/service/ITMaintenanceFileService.java

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

+ 36 - 0
src/main/java/com/steerinfo/ems/tmaintenancefile/service/impl/TMaintenanceFileServiceImpl.java

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

+ 207 - 0
src/main/java/com/steerinfo/ems/tprocessinfor/controller/TProcessinforController.java

@@ -0,0 +1,207 @@
+package com.steerinfo.ems.tprocessinfor.controller;
+
+import com.steerinfo.auth.utils.JwtUtil;
+import com.steerinfo.ems.Utils.TreeUtils;
+import com.steerinfo.ems.tprocessinfor.mapper.TProcessinforMapper;
+import com.steerinfo.ems.trmworkproc.mapper.TRmWorkprocMapper;
+import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
+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.tprocessinfor.model.TProcessinfor;
+import com.steerinfo.ems.tprocessinfor.service.ITProcessinforService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+import static com.sun.xml.internal.ws.spi.db.BindingContextFactory.LOGGER;
+
+/**
+ * TProcessinfor RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-06-09 10:34
+ * 类描述
+ * 修订历史:
+ * 日期:2022-06-09
+ * 作者:generator
+ * 参考:
+ * 描述:TProcessinfor RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tprocessinfors")
+public class TProcessinforController extends BaseRESTfulController {
+
+    @Autowired
+    ITProcessinforService tProcessinforService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("tprocessinfor:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<TProcessinfor> list = tProcessinforService.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("tprocessinfor:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<TProcessinfor> list = tProcessinforService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据TProcessinfor对象创建")
+    @ApiImplicitParam(name = "tProcessinfor", value = "详细实体tProcessinfor", required = true, dataType = "TProcessinfor")
+    //@RequiresPermissions("tprocessinfor:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute TProcessinfor model){
+        model.setStatus(model.getStatus() == null ? "1" : model.getStatus());
+        if(model.getParentid() == null || "".equals(model.getParentid())){
+            return failed(null, "请先选择树节点");
+        }
+        else if(model.getName() == null || "".equals(model.getName())){
+            return failed(null, "name不能为空");
+        }
+        else if(tProcessinforService.getById(model.getId()) != null){
+            return failed(null, "id已存在,不能新增");
+        }
+        else if(model.getId().length() != 6){
+            return failed(null, "id长度应该为6位");
+        }else if (model.getSeqno()==0||model.getSeqno()==null){
+            Long seqno = new Long(tProcessinforService.getMaxSeqNo()+1);
+            model.setSeqno(seqno);
+        }
+        TProcessinfor tProcessinfor = tProcessinforService.add(model);
+        return success(tProcessinfor);
+
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("tprocessinfor:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        TProcessinfor tProcessinfor = tProcessinforService.getById(id);
+        return success(tProcessinfor);
+    }
+
+
+    @ApiOperation(value="获取树状数据", notes="获取TRmWorkproc的树形数据")
+    @GetMapping(value = "/gettree/")
+    public RESTfulResult getTree(@RequestParam HashMap parameters){
+        TreeUtils treeUtils = new TreeUtils();
+        List<TProcessinfor> list = tProcessinforService.getTree(parameters);
+        return success(treeUtils.getTreeData(list));
+    }
+    @ApiOperation(value="获取上层节点", notes="查询上层节点名字和id")
+    @GetMapping(value = "/getparent/", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult getParent(){
+        List<TProcessinfor> tProcessinfors = tProcessinforService.getParent();
+        return success(tProcessinfors);
+    }
+    @ApiOperation(value = "查询下拉框的值",notes = "根据 namd 和 id 来显示")
+    @GetMapping("/getIdAndName")
+    public RESTfulResult getIdAndName(@RequestParam HashMap<String, Object> parmas){
+        if(parmas.get("id") != null && !parmas.get("id").toString().isEmpty()){
+            String id = parmas.get("id").toString();
+            if(!id.startsWith("'")){
+                id = "'" + id.replaceAll(",", "','").replaceAll(",", "','") + "'";
+            }
+            parmas.put("id", id);
+        }
+        List<TProcessinforMapper> idAndName = tProcessinforService.getIdAndName(parmas);
+        return  success(idAndName);
+    }
+    //获取下拉框
+    @GetMapping("/getmeuns")
+    public RESTfulResult getMeuns(@RequestParam String node){
+        List<TProcessinfor> menus = tProcessinforService.getMenus(node);
+        return success(menus);
+    }
+
+    @ApiOperation(value="批量更新详细信息", notes="根据传过来的tRmWorkproc数组信息来更新详细信息")
+    @ApiImplicitParam(name = "tRmWorkproc", value = "详细实体tRmWorkproc", required = true, dataType = "TRmWorkproc")
+    //@RequiresPermissions("trmworkproc:update")
+    @PutMapping(value = "/", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult batchupdate(@RequestBody TProcessinfor[] model){
+        int failnum = 0;
+        String failmsg = "";
+        List<String> errorid = new ArrayList<>();
+        for(int i = 0;i < model.length;i++){
+            try {
+                LOGGER.info("工序信息维护修改的第" + (i + 1) + "条数据:");
+                LOGGER.info("工序信息维护修改前数据是" + tProcessinforService.getById(model[i].getId()).toString());
+                TProcessinfor tProcessinfor = tProcessinforService.modify(model[i]);
+                LOGGER.info("工序信息维护修改后数据是" + tProcessinfor.toString());
+            }
+            catch(Exception e){
+                failnum++;
+                errorid.add(model[i].getId());
+                failmsg += "工序信息维护修改在第" + (i + 1) + "条数据出现错误,错误原因是" + e + ",id是" + model[i].getId();
+            }
+        }
+        if(failnum > 0){
+            LOGGER.info("本次共修改" + model.length + "条数据,其中成功" + (model.length - failnum) + "条,失败" + failnum + "条,失败原因:" + failmsg);
+            return success(errorid,"51","本次共修改" + model.length + "条数据,其中成功" + (model.length - failnum) + "条,失败" + failnum + "条");
+        }
+        return success();
+    }
+    @ApiOperation(value="删除", notes="根据用户ID来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("trmworkproc:delete")
+    @DeleteMapping(value = "/{id}")
+    public RESTfulResult delete(@PathVariable String id){
+        int failnum = 0;
+        List<String> failid = new ArrayList<>();
+        List<String> Ids = Arrays.asList(id.split(","));
+        String failmsg = "";
+        for(int i = 0;i < Ids.size();i++) {
+            LOGGER.info("工序维护表要删除的第" + (i + 1) + "条数据是" + tProcessinforService.getById(Ids.get(i)).toString());
+            tProcessinforService.delete(Ids.get(i));
+        }
+        if(failnum > 0){
+            LOGGER.info(JwtUtil.getUseridByToken() + "本次共删除" + Ids.size() + "条数据,其中成功" + (Ids.size() - failnum) + "条,失败" + failnum + "条,失败的数据id:" + failid.toString());
+            return success(failid,"51" ,"本次共删除" + Ids.size() + "条数据,其中成功" + (Ids.size() - failnum) + "条,失败" + failnum + "条,失败原因:" + failmsg);
+        }
+        return success();
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的tRmWorkproc信息来更新详细信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "tRmWorkproc", value = "详细实体tRmWorkproc", required = true, dataType = "TRmWorkproc")
+    })
+    //@RequiresPermissions("trmworkproc:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody TProcessinfor model){
+        if(model.getParentid() == null){
+            return failed(null,"上层节点不能为空!");
+        }
+        LOGGER.info("工序维护表修改前数据是" + tProcessinforService.getById(id).toString());
+        model.setId(id);
+        TProcessinfor tRmWorkproc = tProcessinforService.modify(model);
+        LOGGER.info("工序维护表修改后数据是" + tRmWorkproc.toString());
+        return success(tRmWorkproc);
+    }
+}

+ 21 - 0
src/main/java/com/steerinfo/ems/tprocessinfor/mapper/TProcessinforMapper.java

@@ -0,0 +1,21 @@
+package com.steerinfo.ems.tprocessinfor.mapper;
+
+import com.steerinfo.ems.tprocessinfor.model.TProcessinfor;
+import com.steerinfo.ems.trmworkproc.mapper.TRmWorkprocMapper;
+import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface TProcessinforMapper extends IBaseMapper<TProcessinfor, String> {
+    List<TProcessinfor> getTree(Map<String, Object> parameters);
+    List<TProcessinfor> getParent();
+    Integer getMaxSeqNo();
+    List<TProcessinforMapper> getIdAndName(Map<String, Object> parameters);
+    List<TProcessinfor> getMenus(String node);
+}

+ 266 - 0
src/main/java/com/steerinfo/ems/tprocessinfor/mapper/TProcessinforMapper.xml

@@ -0,0 +1,266 @@
+<?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.tprocessinfor.mapper.TProcessinforMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.tprocessinfor.model.TProcessinfor">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="NAME" jdbcType="VARCHAR" property="name" />
+    <result column="STATUS" jdbcType="VARCHAR" property="status" />
+    <result column="PARENTID" jdbcType="VARCHAR" property="parentid" />
+    <result column="NODE" jdbcType="VARCHAR" property="node" />
+    <result column="SEQNO" jdbcType="DECIMAL" property="seqno" />
+  </resultMap>
+  <sql id="columns">
+    ID, NAME, STATUS, PARENTID, NODE, SEQNO
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.NAME, t.STATUS, t.PARENTID, t.NODE, t.SEQNO
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM T_PROCESSINFOR
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM T_PROCESSINFOR t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID = #{id}
+      </if>
+      <if test="name != null and name != ''">
+        and NAME = #{name}
+      </if>
+      <if test="status != null and status != ''">
+        and STATUS = #{status}
+      </if>
+      <if test="parentid != null and parentid != ''">
+        and PARENTID = #{parentid}
+      </if>
+      <if test="node != null and node != ''">
+        and NODE = #{node}
+      </if>
+      <if test="seqno != null">
+        and SEQNO = #{seqno}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID LIKE '%${id}%'
+      </if>
+      <if test="name != null and name != ''">
+        and NAME LIKE '%${name}%'
+      </if>
+      <if test="status != null and status != ''">
+        and STATUS LIKE '%${status}%'
+      </if>
+      <if test="parentid != null and parentid != ''">
+        and PARENTID LIKE '%${parentid}%'
+      </if>
+      <if test="node != null and node != ''">
+        and NODE LIKE '%${node}%'
+      </if>
+      <if test="seqno != null">
+        and SEQNO = #{seqno}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from T_PROCESSINFOR
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from T_PROCESSINFOR
+    where 1!=1 
+      <if test="name != null and name != ''">
+        or NAME = #{name}
+      </if>
+      <if test="status != null and status != ''">
+        or STATUS = #{status}
+      </if>
+      <if test="parentid != null and parentid != ''">
+        or PARENTID = #{parentid}
+      </if>
+      <if test="node != null and node != ''">
+        or NODE = #{node}
+      </if>
+      <if test="seqno != null">
+        or SEQNO = #{seqno}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.tprocessinfor.model.TProcessinfor">
+    insert into T_PROCESSINFOR (ID, NAME, STATUS, 
+      PARENTID, NODE, SEQNO
+      )
+    values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, 
+      #{parentid,jdbcType=VARCHAR}, #{node,jdbcType=VARCHAR}, #{seqno,jdbcType=DECIMAL}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.tprocessinfor.model.TProcessinfor">
+    insert into T_PROCESSINFOR
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="name != null">
+        NAME,
+      </if>
+      <if test="status != null">
+        STATUS,
+      </if>
+      <if test="parentid != null">
+        PARENTID,
+      </if>
+      <if test="node != null">
+        NODE,
+      </if>
+      <if test="seqno != null">
+        SEQNO,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=VARCHAR},
+      </if>
+      <if test="parentid != null">
+        #{parentid,jdbcType=VARCHAR},
+      </if>
+      <if test="node != null">
+        #{node,jdbcType=VARCHAR},
+      </if>
+      <if test="seqno != null">
+        #{seqno,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.tprocessinfor.model.TProcessinfor">
+    update T_PROCESSINFOR
+    set NAME = #{name,jdbcType=VARCHAR},
+      STATUS = #{status,jdbcType=VARCHAR},
+      PARENTID = #{parentid,jdbcType=VARCHAR},
+      NODE = #{node,jdbcType=VARCHAR},
+      SEQNO = #{seqno,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.tprocessinfor.model.TProcessinfor">
+    update T_PROCESSINFOR
+    <set>
+      <if test="name != null">
+        NAME = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        STATUS = #{status,jdbcType=VARCHAR},
+      </if>
+      <if test="parentid != null">
+        PARENTID = #{parentid,jdbcType=VARCHAR},
+      </if>
+      <if test="node != null">
+        NODE = #{node,jdbcType=VARCHAR},
+      </if>
+      <if test="seqno != null">
+        SEQNO = #{seqno,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 T_PROCESSINFOR 
+      (ID, 
+      NAME, STATUS, PARENTID, 
+      NODE, SEQNO)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=VARCHAR}, 
+      #{item.name,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.parentid,jdbcType=VARCHAR}, 
+      #{item.node,jdbcType=VARCHAR}, #{item.seqno,jdbcType=DECIMAL} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update T_PROCESSINFOR
+     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>
+       ,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>
+       ,STATUS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.status,jdbcType=VARCHAR}
+       </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>
+       ,NODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.node,jdbcType=VARCHAR}
+       </foreach>
+       ,SEQNO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.seqno,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 T_PROCESSINFOR
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getTree" resultMap="BaseResultMap">
+    select ID, NAME, PARENTID, NODE from T_PROCESSINFOR
+    WHERE 1=1
+    order by SEQNO
+  </select>
+
+  <select id="getParent" resultMap="BaseResultMap">
+    select ID, NAME, NODE from T_PROCESSINFOR
+    where ID in (select distinct PARENTID from T_PROCESSINFOR)
+    order by SEQNO
+  </select>
+  <select id="getMaxSeqNo" resultType="java.lang.Integer">
+    SELECT MAX(SEQNO) FROM T_PROCESSINFOR
+  </select>
+  <!--查询下拉框的值-->
+  <select id="getIdAndName" parameterType="java.util.HashMap" resultType="com.steerinfo.ems.tprocessinfor.model.TProcessinfor">
+    SELECT ID,NAME,NODE FROM T_PROCESSINFOR
+    where 1=1
+    <if test="id != null and id != ''">
+      and id in (${id})
+    </if>
+    ORDER BY NAME
+  </select>
+
+  <select id="getMenus" resultMap="BaseResultMap">
+    select ID, NAME, NODE from T_PROCESSINFOR
+    where NODE = #{node,jdbcType=VARCHAR}
+    order by SEQNO
+  </select>
+</mapper>

+ 147 - 0
src/main/java/com/steerinfo/ems/tprocessinfor/model/TProcessinfor.java

@@ -0,0 +1,147 @@
+package com.steerinfo.ems.tprocessinfor.model;
+
+import com.steerinfo.ems.Utils.TreePO;
+import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+@ApiModel(value="null")
+public class TProcessinfor implements IBasePO<String> , TreePO<String, String, TProcessinfor> {
+    /**
+     * 工序代码(ID,VARCHAR,255)
+     */
+    @ApiModelProperty(value="工序代码",required=true)
+    private String id;
+
+    /**
+     * 名称(NAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="名称",required=false)
+    private String name;
+
+    /**
+     * 状态(STATUS,VARCHAR,255)
+     */
+    @ApiModelProperty(value="状态",required=false)
+    private String status;
+
+    /**
+     * 上层节点(PARENTID,VARCHAR,40)
+     */
+    @ApiModelProperty(value="上层节点",required=false)
+    private String parentid;
+
+    /**
+     * 级别(NODE,VARCHAR,255)
+     */
+    @ApiModelProperty(value="级别",required=false)
+    private String node;
+
+    /**
+     * 顺序(SEQNO,DECIMAL,10)
+     */
+    @ApiModelProperty(value="顺序",required=false)
+    private Long seqno;
+
+    private static final long serialVersionUID = 1L;
+
+    private List<TProcessinfor> Children;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status == null ? null : status.trim();
+    }
+
+    public String getParentid() {
+        return parentid;
+    }
+
+    public void setParentid(String parentid) {
+        this.parentid = parentid == null ? null : parentid.trim();
+    }
+
+    public String getNode() {
+        return node;
+    }
+
+    public void setNode(String node) {
+        this.node = node == null ? null : node.trim();
+    }
+
+    public Long getSeqno() {
+        return seqno;
+    }
+
+    public void setSeqno(Long seqno) {
+        this.seqno = seqno;
+    }
+
+    @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(", name=").append(name);
+        sb.append(", status=").append(status);
+        sb.append(", parentid=").append(parentid);
+        sb.append(", node=").append(node);
+        sb.append(", seqno=").append(seqno);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+
+    @Override
+    public String getCode() {
+        return id;
+    }
+
+    @Override
+    public void setCode(String s) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    @Override
+    public String getParentId() {
+        return parentid;
+    }
+
+    @Override
+    public void setParentId(String s) {
+        this.parentid = parentid == null ? null : parentid.trim();
+    }
+
+    @Override
+    public List<TProcessinfor> getChildren() {
+        return Children;
+    }
+
+    @Override
+    public void setChildren(List<TProcessinfor> children) {
+        this.Children = children;
+    }
+}

+ 33 - 0
src/main/java/com/steerinfo/ems/tprocessinfor/service/ITProcessinforService.java

@@ -0,0 +1,33 @@
+package com.steerinfo.ems.tprocessinfor.service;
+
+import com.steerinfo.ems.tprocessinfor.mapper.TProcessinforMapper;
+import com.steerinfo.ems.trmworkproc.mapper.TRmWorkprocMapper;
+import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ems.tprocessinfor.model.TProcessinfor;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TProcessinfor服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-06-09 10:34
+ * 类描述
+ * 修订历史:
+ * 日期:2022-06-09
+ * 作者:generator
+ * 参考:
+ * 描述:TProcessinfor服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITProcessinforService extends IBaseService<TProcessinfor, String>{
+    List<TProcessinfor> getTree(Map<String, Object> parameters);
+    List<TProcessinfor> getParent();
+    Integer getMaxSeqNo();
+    List<TProcessinforMapper> getIdAndName(Map<String, Object> parameters);
+
+    List<TProcessinfor> getMenus(String node);
+}

+ 65 - 0
src/main/java/com/steerinfo/ems/tprocessinfor/service/impl/TProcessinforServiceImpl.java

@@ -0,0 +1,65 @@
+package com.steerinfo.ems.tprocessinfor.service.impl;
+
+import com.steerinfo.ems.trmworkproc.mapper.TRmWorkprocMapper;
+import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.tprocessinfor.model.TProcessinfor;
+import com.steerinfo.ems.tprocessinfor.mapper.TProcessinforMapper;
+import com.steerinfo.ems.tprocessinfor.service.ITProcessinforService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TProcessinfor服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-06-09 10:34
+ * 类描述
+ * 修订历史:
+ * 日期:2022-06-09
+ * 作者:generator
+ * 参考:
+ * 描述:TProcessinfor服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tProcessinforService")
+public class TProcessinforServiceImpl extends BaseServiceImpl<TProcessinfor, String> implements ITProcessinforService {
+
+    @Autowired
+    private TProcessinforMapper tProcessinforMapper;
+
+    @Override
+    protected IBaseMapper<TProcessinfor, String> getMapper() {
+        return tProcessinforMapper;
+    }
+
+    public List<TProcessinfor> getTree(Map<String, Object> parameters){
+        List<TProcessinfor> rows = tProcessinforMapper.getTree(parameters);
+        return rows;
+    }
+    public List<TProcessinfor> getParent(){
+        List<TProcessinfor> rows = tProcessinforMapper.getParent();
+        return rows;
+    }
+    @Override
+    public Integer getMaxSeqNo() {
+        return tProcessinforMapper.getMaxSeqNo();
+    }
+    @Override
+    public List<TProcessinforMapper> getIdAndName(Map<String, Object> parameters) {
+        return tProcessinforMapper.getIdAndName(parameters);
+    }
+
+    @Override
+    public List<TProcessinfor> getMenus(String node) {
+
+        return tProcessinforMapper.getMenus(node);
+    }
+
+
+}

+ 210 - 0
src/main/java/com/steerinfo/ems/tsubmitted/controller/TSubmittedController.java

@@ -0,0 +1,210 @@
+package com.steerinfo.ems.tsubmitted.controller;
+
+import com.steerinfo.auth.utils.JwtUtil;
+import com.steerinfo.ems.Utils.DateUtils;
+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.tsubmitted.model.TSubmitted;
+import com.steerinfo.ems.tsubmitted.service.ITSubmittedService;
+import com.steerinfo.ftp.securitytype.model.SecurityType;
+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.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.math.BigDecimal;
+
+/**
+ * TSubmitted RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-06-10 04:08
+ * 类描述
+ * 修订历史:
+ * 日期:2022-06-10
+ * 作者:generator
+ * 参考:
+ * 描述:TSubmitted RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tsubmitteds")
+public class TSubmittedController extends BaseRESTfulController {
+    /** 文件保存路径  */
+    public static final String FILE_DIR = "/static/";
+    @Autowired
+    ITSubmittedService tSubmittedService;
+    @Autowired
+    private FtpFileUtil ftpFileUtil;
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("tsubmitted:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<TSubmitted> list = tSubmittedService.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("tsubmitted:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<TSubmitted> list = tSubmittedService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据TSubmitted对象创建")
+    @ApiImplicitParam(name = "tSubmitted", value = "详细实体tSubmitted", required = true, dataType = "TSubmitted")
+    //@RequiresPermissions("tsubmitted:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute TSubmitted model){
+        TSubmitted tSubmitted = tSubmittedService.add(model);
+        return success(tSubmitted);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("tsubmitted:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        TSubmitted tSubmitted = tSubmittedService.getById(id);
+        return success(tSubmitted);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的tSubmitted信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "tSubmitted", value = "详细实体tSubmitted", required = true, dataType = "TSubmitted")
+    })
+    //@RequiresPermissions("tsubmitted:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody TSubmitted model){
+        model.setId(id);
+        TSubmitted tSubmitted = tSubmittedService.modify(model);
+        return success(tSubmitted);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("tsubmitted: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);
+			  tSubmittedService.delete(ids);
+    	}
+      return success();
+    }
+
+    @PutMapping("/getimage/")
+    public RESTfulResult getimage(@ModelAttribute MultipartFile[] file, TSubmitted model) throws IOException {
+        if (file!=null && file.length>0){
+            //将文件名赋值给model
+            TSubmitted tSubmitted = new TSubmitted();
+
+            tSubmitted.setConstruid( model.getConstruid());
+            String uploadDir = FILE_DIR +model.getConstruid()+"/";
+            File dir = new File(uploadDir);
+            if (!dir.exists()) {
+                dir.mkdirs();
+            }
+            dir.setReadOnly();
+            for (int i = 0; i < file.length; i++) {
+                //获取文件原始名
+                String imagename= file[i].getOriginalFilename();
+                model.setImagename(imagename);
+                // 服务器端保存的文件对象
+                File serverFile = new File(uploadDir, imagename);
+                file[i].transferTo(serverFile.getAbsoluteFile());
+                tSubmitted.setImagename(imagename);
+            }
+            return success(tSubmitted);
+        }
+        return failed("传入文件类型不符合");
+    }
+
+    @PostMapping(value = "/pus/")
+    public RESTfulResult putMes(@ModelAttribute MultipartFile[] file, TSubmitted model, String del) {
+        HashMap hashMap = new HashMap();
+        hashMap.put("declareid",model.getDeclareid());
+        //丛前端获取申报日期,利用SimpleDateFormat类转换为字符串
+        String Signtime = model.getSigntime();
+
+        //将转换为字符串的日期进行截取,截取出月和日
+        String mouth = Signtime.substring(5, 7);
+        Integer maxid = tSubmittedService.MaxID(mouth);
+        model.setMaxid(new BigDecimal(maxid));
+        String id = model.getDeclareid() + maxid;
+        model.setConstruid(id);
+        String datetime = DateUtils.getCurrentTime("yyyy-MM-dd");
+        if (model == null) {
+            return failed(null, "参数错误!");
+        }
+        TSubmitted tSubmitted = new TSubmitted();
+        String bid = model.getConstruid();
+        model.setDeclareid(model.getDeclareid()+ "_"+ String.format("%04d", maxid));
+        tSubmitted= tSubmittedService.add(model);
+        try {
+            // 上传文件
+            if (file!=null && file.length>0) {
+                // 文件目录,如果目录不存在,自动创建
+                String uploadDir = FILE_DIR + tSubmitted.getConstruid()+ "/";
+                File dir = new File(uploadDir);
+                if (!dir.exists()) {
+                    dir.mkdirs();
+                }
+                for (int i = 0;i < file.length;i++){
+                    // 上传文件名
+                    String fileName = file[i].getOriginalFilename();
+                    // 服务器端保存的文件对象
+                    File serverFile = new File(uploadDir, fileName);
+                    file[i].transferTo(serverFile.getAbsoluteFile());
+                }
+            }
+            // 删除文件
+            if(del!=null && !del.isEmpty() && !bid.isEmpty()) {
+                for (String df : del.split(";")){
+                    if (!df.isEmpty() && df.trim().length()>1) {
+                        String path = FILE_DIR + bid + "/" + df;
+                        File f = new File(path).getAbsoluteFile();
+                        if(f.exists()){
+                            f.delete();
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return failed(null,"上传失败!失败原因:"+e.toString());
+        }
+        return success(tSubmitted);
+    }
+    @DeleteMapping("/del/{construid}")
+    public RESTfulResult del(@PathVariable String construid){
+               tSubmittedService.delete(construid);
+               return success("撤销成功");
+    }
+
+}

+ 12 - 0
src/main/java/com/steerinfo/ems/tsubmitted/mapper/TSubmittedMapper.java

@@ -0,0 +1,12 @@
+package com.steerinfo.ems.tsubmitted.mapper;
+
+import com.steerinfo.ems.tsubmitted.model.TSubmitted;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface TSubmittedMapper extends IBaseMapper<TSubmitted, String> {
+    Integer selectMaxId(@Param(value = "signtime") String mouth);
+}

+ 445 - 0
src/main/java/com/steerinfo/ems/tsubmitted/mapper/TSubmittedMapper.xml

@@ -0,0 +1,445 @@
+<?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.tsubmitted.mapper.TSubmittedMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.tsubmitted.model.TSubmitted">
+    <id column="CONSTRUID" jdbcType="VARCHAR" property="construid" />
+    <result column="DEVICENAME" jdbcType="VARCHAR" property="devicename" />
+    <result column="EQUIPMENT" jdbcType="VARCHAR" property="equipment" />
+    <result column="CONSTRUCTIONUNITS" jdbcType="VARCHAR" property="constructionunits" />
+    <result column="CONSTRUPEOPLE" jdbcType="VARCHAR" property="construpeople" />
+    <result column="CONSTRUDATE" jdbcType="VARCHAR" property="construdate" />
+    <result column="CONSTRUCONTENT" jdbcType="VARCHAR" property="construcontent" />
+    <result column="CONSTRUFILE" jdbcType="VARCHAR" property="construfile" />
+    <result column="SIGNTIME" jdbcType="VARCHAR" property="signtime" />
+    <result column="BZ" jdbcType="VARCHAR" property="bz" />
+    <result column="IMAGEURL" jdbcType="VARCHAR" property="imageurl" />
+    <result column="IMAGENAME" jdbcType="VARCHAR" property="imagename" />
+    <result column="MAXID" jdbcType="DECIMAL" property="maxid" />
+    <result column="DECLAREID" jdbcType="VARCHAR" property="declareid" />
+  </resultMap>
+  <sql id="columns">
+    CONSTRUID, DEVICENAME, EQUIPMENT, CONSTRUCTIONUNITS, CONSTRUPEOPLE, CONSTRUDATE, 
+    CONSTRUCONTENT, CONSTRUFILE, SIGNTIME, BZ, IMAGEURL, IMAGENAME, MAXID, DECLAREID
+  </sql>
+  <sql id="columns_alias">
+    t.CONSTRUID, t.DEVICENAME, t.EQUIPMENT, t.CONSTRUCTIONUNITS, t.CONSTRUPEOPLE, t.CONSTRUDATE, 
+    t.CONSTRUCONTENT, t.CONSTRUFILE, t.SIGNTIME, t.BZ, t.IMAGEURL, t.IMAGENAME, t.MAXID, 
+    t.DECLAREID
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM T_SUBMITTED
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM T_SUBMITTED t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="construid != null and construid != ''">
+        and CONSTRUID = #{construid}
+      </if>
+      <if test="devicename != null and devicename != ''">
+        and DEVICENAME = #{devicename}
+      </if>
+      <if test="equipment != null and equipment != ''">
+        and EQUIPMENT = #{equipment}
+      </if>
+      <if test="constructionunits != null and constructionunits != ''">
+        and CONSTRUCTIONUNITS = #{constructionunits}
+      </if>
+      <if test="construpeople != null and construpeople != ''">
+        and CONSTRUPEOPLE = #{construpeople}
+      </if>
+      <if test="construdate != null and construdate != ''">
+        and CONSTRUDATE = #{construdate}
+      </if>
+      <if test="construcontent != null and construcontent != ''">
+        and CONSTRUCONTENT = #{construcontent}
+      </if>
+      <if test="construfile != null and construfile != ''">
+        and CONSTRUFILE = #{construfile}
+      </if>
+      <if test="signtime != null and signtime != ''">
+        and SIGNTIME = #{signtime}
+      </if>
+      <if test="bz != null and bz != ''">
+        and BZ = #{bz}
+      </if>
+      <if test="imageurl != null and imageurl != ''">
+        and IMAGEURL = #{imageurl}
+      </if>
+      <if test="imagename != null and imagename != ''">
+        and IMAGENAME = #{imagename}
+      </if>
+      <if test="maxid != null">
+        and MAXID = #{maxid}
+      </if>
+      <if test="declareid != null and declareid != ''">
+        and DECLAREID = #{declareid}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="construid != null and construid != ''">
+        and CONSTRUID LIKE '%${construid}%'
+      </if>
+      <if test="devicename != null and devicename != ''">
+        and DEVICENAME LIKE '%${devicename}%'
+      </if>
+      <if test="equipment != null and equipment != ''">
+        and EQUIPMENT LIKE '%${equipment}%'
+      </if>
+      <if test="constructionunits != null and constructionunits != ''">
+        and CONSTRUCTIONUNITS LIKE '%${constructionunits}%'
+      </if>
+      <if test="construpeople != null and construpeople != ''">
+        and CONSTRUPEOPLE LIKE '%${construpeople}%'
+      </if>
+      <if test="construdate != null and construdate != ''">
+        and CONSTRUDATE LIKE '%${construdate}%'
+      </if>
+      <if test="construcontent != null and construcontent != ''">
+        and CONSTRUCONTENT LIKE '%${construcontent}%'
+      </if>
+      <if test="construfile != null and construfile != ''">
+        and CONSTRUFILE LIKE '%${construfile}%'
+      </if>
+      <if test="signtime != null and signtime != ''">
+        and SIGNTIME LIKE '%${signtime}%'
+      </if>
+      <if test="bz != null and bz != ''">
+        and BZ LIKE '%${bz}%'
+      </if>
+      <if test="imageurl != null and imageurl != ''">
+        and IMAGEURL LIKE '%${imageurl}%'
+      </if>
+      <if test="imagename != null and imagename != ''">
+        and IMAGENAME LIKE '%${imagename}%'
+      </if>
+      <if test="maxid != null">
+        and MAXID = #{maxid}
+      </if>
+      <if test="declareid != null and declareid != ''">
+        and DECLAREID LIKE '%${declareid}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from T_SUBMITTED
+    where CONSTRUID = #{construid,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from T_SUBMITTED
+    where 1!=1 
+      <if test="devicename != null and devicename != ''">
+        or DEVICENAME = #{devicename}
+      </if>
+      <if test="equipment != null and equipment != ''">
+        or EQUIPMENT = #{equipment}
+      </if>
+      <if test="constructionunits != null and constructionunits != ''">
+        or CONSTRUCTIONUNITS = #{constructionunits}
+      </if>
+      <if test="construpeople != null and construpeople != ''">
+        or CONSTRUPEOPLE = #{construpeople}
+      </if>
+      <if test="construdate != null and construdate != ''">
+        or CONSTRUDATE = #{construdate}
+      </if>
+      <if test="construcontent != null and construcontent != ''">
+        or CONSTRUCONTENT = #{construcontent}
+      </if>
+      <if test="construfile != null and construfile != ''">
+        or CONSTRUFILE = #{construfile}
+      </if>
+      <if test="signtime != null and signtime != ''">
+        or SIGNTIME = #{signtime}
+      </if>
+      <if test="bz != null and bz != ''">
+        or BZ = #{bz}
+      </if>
+      <if test="imageurl != null and imageurl != ''">
+        or IMAGEURL = #{imageurl}
+      </if>
+      <if test="imagename != null and imagename != ''">
+        or IMAGENAME = #{imagename}
+      </if>
+      <if test="maxid != null">
+        or MAXID = #{maxid}
+      </if>
+      <if test="declareid != null and declareid != ''">
+        or DECLAREID = #{declareid}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.tsubmitted.model.TSubmitted">
+    insert into T_SUBMITTED (CONSTRUID, DEVICENAME, EQUIPMENT, 
+      CONSTRUCTIONUNITS, CONSTRUPEOPLE, CONSTRUDATE, 
+      CONSTRUCONTENT, CONSTRUFILE, SIGNTIME, 
+      BZ, IMAGEURL, IMAGENAME, 
+      MAXID, DECLAREID)
+    values (#{construid,jdbcType=VARCHAR}, #{devicename,jdbcType=VARCHAR}, #{equipment,jdbcType=VARCHAR}, 
+      #{constructionunits,jdbcType=VARCHAR}, #{construpeople,jdbcType=VARCHAR}, #{construdate,jdbcType=VARCHAR}, 
+      #{construcontent,jdbcType=VARCHAR}, #{construfile,jdbcType=VARCHAR}, #{signtime,jdbcType=VARCHAR}, 
+      #{bz,jdbcType=VARCHAR}, #{imageurl,jdbcType=VARCHAR}, #{imagename,jdbcType=VARCHAR}, 
+      #{maxid,jdbcType=DECIMAL}, #{declareid,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.tsubmitted.model.TSubmitted">
+    insert into T_SUBMITTED
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="construid != null">
+        CONSTRUID,
+      </if>
+      <if test="devicename != null">
+        DEVICENAME,
+      </if>
+      <if test="equipment != null">
+        EQUIPMENT,
+      </if>
+      <if test="constructionunits != null">
+        CONSTRUCTIONUNITS,
+      </if>
+      <if test="construpeople != null">
+        CONSTRUPEOPLE,
+      </if>
+      <if test="construdate != null">
+        CONSTRUDATE,
+      </if>
+      <if test="construcontent != null">
+        CONSTRUCONTENT,
+      </if>
+      <if test="construfile != null">
+        CONSTRUFILE,
+      </if>
+      <if test="signtime != null">
+        SIGNTIME,
+      </if>
+      <if test="bz != null">
+        BZ,
+      </if>
+      <if test="imageurl != null">
+        IMAGEURL,
+      </if>
+      <if test="imagename != null">
+        IMAGENAME,
+      </if>
+      <if test="maxid != null">
+        MAXID,
+      </if>
+      <if test="declareid != null">
+        DECLAREID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="construid != null">
+        #{construid,jdbcType=VARCHAR},
+      </if>
+      <if test="devicename != null">
+        #{devicename,jdbcType=VARCHAR},
+      </if>
+      <if test="equipment != null">
+        #{equipment,jdbcType=VARCHAR},
+      </if>
+      <if test="constructionunits != null">
+        #{constructionunits,jdbcType=VARCHAR},
+      </if>
+      <if test="construpeople != null">
+        #{construpeople,jdbcType=VARCHAR},
+      </if>
+      <if test="construdate != null">
+        #{construdate,jdbcType=VARCHAR},
+      </if>
+      <if test="construcontent != null">
+        #{construcontent,jdbcType=VARCHAR},
+      </if>
+      <if test="construfile != null">
+        #{construfile,jdbcType=VARCHAR},
+      </if>
+      <if test="signtime != null">
+        #{signtime,jdbcType=VARCHAR},
+      </if>
+      <if test="bz != null">
+        #{bz,jdbcType=VARCHAR},
+      </if>
+      <if test="imageurl != null">
+        #{imageurl,jdbcType=VARCHAR},
+      </if>
+      <if test="imagename != null">
+        #{imagename,jdbcType=VARCHAR},
+      </if>
+      <if test="maxid != null">
+        #{maxid,jdbcType=DECIMAL},
+      </if>
+      <if test="declareid != null">
+        #{declareid,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.tsubmitted.model.TSubmitted">
+    update T_SUBMITTED
+    set DEVICENAME = #{devicename,jdbcType=VARCHAR},
+      EQUIPMENT = #{equipment,jdbcType=VARCHAR},
+      CONSTRUCTIONUNITS = #{constructionunits,jdbcType=VARCHAR},
+      CONSTRUPEOPLE = #{construpeople,jdbcType=VARCHAR},
+      CONSTRUDATE = #{construdate,jdbcType=VARCHAR},
+      CONSTRUCONTENT = #{construcontent,jdbcType=VARCHAR},
+      CONSTRUFILE = #{construfile,jdbcType=VARCHAR},
+      SIGNTIME = #{signtime,jdbcType=VARCHAR},
+      BZ = #{bz,jdbcType=VARCHAR},
+      IMAGEURL = #{imageurl,jdbcType=VARCHAR},
+      IMAGENAME = #{imagename,jdbcType=VARCHAR},
+      MAXID = #{maxid,jdbcType=DECIMAL},
+      DECLAREID = #{declareid,jdbcType=VARCHAR}
+    where CONSTRUID = #{construid,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.tsubmitted.model.TSubmitted">
+    update T_SUBMITTED
+    <set>
+      <if test="devicename != null">
+        DEVICENAME = #{devicename,jdbcType=VARCHAR},
+      </if>
+      <if test="equipment != null">
+        EQUIPMENT = #{equipment,jdbcType=VARCHAR},
+      </if>
+      <if test="constructionunits != null">
+        CONSTRUCTIONUNITS = #{constructionunits,jdbcType=VARCHAR},
+      </if>
+      <if test="construpeople != null">
+        CONSTRUPEOPLE = #{construpeople,jdbcType=VARCHAR},
+      </if>
+      <if test="construdate != null">
+        CONSTRUDATE = #{construdate,jdbcType=VARCHAR},
+      </if>
+      <if test="construcontent != null">
+        CONSTRUCONTENT = #{construcontent,jdbcType=VARCHAR},
+      </if>
+      <if test="construfile != null">
+        CONSTRUFILE = #{construfile,jdbcType=VARCHAR},
+      </if>
+      <if test="signtime != null">
+        SIGNTIME = #{signtime,jdbcType=VARCHAR},
+      </if>
+      <if test="bz != null">
+        BZ = #{bz,jdbcType=VARCHAR},
+      </if>
+      <if test="imageurl != null">
+        IMAGEURL = #{imageurl,jdbcType=VARCHAR},
+      </if>
+      <if test="imagename != null">
+        IMAGENAME = #{imagename,jdbcType=VARCHAR},
+      </if>
+      <if test="maxid != null">
+        MAXID = #{maxid,jdbcType=DECIMAL},
+      </if>
+      <if test="declareid != null">
+        DECLAREID = #{declareid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where CONSTRUID = #{construid,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where CONSTRUID = #{construid,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 T_SUBMITTED 
+      (CONSTRUID, 
+      DEVICENAME, EQUIPMENT, CONSTRUCTIONUNITS, 
+      CONSTRUPEOPLE, CONSTRUDATE, CONSTRUCONTENT, 
+      CONSTRUFILE, SIGNTIME, BZ, 
+      IMAGEURL, IMAGENAME, MAXID, 
+      DECLAREID)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.construid,jdbcType=VARCHAR}, 
+      #{item.devicename,jdbcType=VARCHAR}, #{item.equipment,jdbcType=VARCHAR}, #{item.constructionunits,jdbcType=VARCHAR}, 
+      #{item.construpeople,jdbcType=VARCHAR}, #{item.construdate,jdbcType=VARCHAR}, #{item.construcontent,jdbcType=VARCHAR}, 
+      #{item.construfile,jdbcType=VARCHAR}, #{item.signtime,jdbcType=VARCHAR}, #{item.bz,jdbcType=VARCHAR}, 
+      #{item.imageurl,jdbcType=VARCHAR}, #{item.imagename,jdbcType=VARCHAR}, #{item.maxid,jdbcType=DECIMAL}, 
+      #{item.declareid,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update T_SUBMITTED
+     set
+       CONSTRUID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.construid,jdbcType=VARCHAR}
+       </foreach>
+       ,DEVICENAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.devicename,jdbcType=VARCHAR}
+       </foreach>
+       ,EQUIPMENT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.equipment,jdbcType=VARCHAR}
+       </foreach>
+       ,CONSTRUCTIONUNITS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.constructionunits,jdbcType=VARCHAR}
+       </foreach>
+       ,CONSTRUPEOPLE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.construpeople,jdbcType=VARCHAR}
+       </foreach>
+       ,CONSTRUDATE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.construdate,jdbcType=VARCHAR}
+       </foreach>
+       ,CONSTRUCONTENT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.construcontent,jdbcType=VARCHAR}
+       </foreach>
+       ,CONSTRUFILE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.construfile,jdbcType=VARCHAR}
+       </foreach>
+       ,SIGNTIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.signtime,jdbcType=VARCHAR}
+       </foreach>
+       ,BZ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.bz,jdbcType=VARCHAR}
+       </foreach>
+       ,IMAGEURL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.imageurl,jdbcType=VARCHAR}
+       </foreach>
+       ,IMAGENAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.imagename,jdbcType=VARCHAR}
+       </foreach>
+       ,MAXID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.maxid,jdbcType=DECIMAL}
+       </foreach>
+       ,DECLAREID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CONSTRUID" close="end">
+          when #{item.construid,jdbcType=VARCHAR} then #{item.declareid,jdbcType=VARCHAR}
+       </foreach>
+     where CONSTRUID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.construid,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from T_SUBMITTED
+    where CONSTRUID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="selectMaxId" resultType="java.lang.Integer" >
+    SELECT MAX(MAXID) FROM T_SUBMITTED where SIGNTIME LIKE '%${signtime}%'
+  </select>
+</mapper>

+ 242 - 0
src/main/java/com/steerinfo/ems/tsubmitted/model/TSubmitted.java

@@ -0,0 +1,242 @@
+package com.steerinfo.ems.tsubmitted.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+
+@ApiModel(value="null")
+public class TSubmitted implements IBasePO<String> {
+    /**
+     * 报工序号(CONSTRUID,VARCHAR,255)
+     */
+    @ApiModelProperty(value="报工序号",required=true)
+    private String construid;
+
+    /**
+     * 设备名称(DEVICENAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="设备名称",required=false)
+    private String devicename;
+
+    /**
+     * 设备分类(EQUIPMENT,VARCHAR,255)
+     */
+    @ApiModelProperty(value="设备分类",required=false)
+    private String equipment;
+
+    /**
+     * 施工单位(CONSTRUCTIONUNITS,VARCHAR,255)
+     */
+    @ApiModelProperty(value="施工单位",required=false)
+    private String constructionunits;
+
+    /**
+     * 施工人数(CONSTRUPEOPLE,VARCHAR,255)
+     */
+    @ApiModelProperty(value="施工人数",required=false)
+    private String construpeople;
+
+    /**
+     * 施工日期(CONSTRUDATE,VARCHAR,15)
+     */
+    @ApiModelProperty(value="施工日期",required=false)
+    private String construdate;
+
+    /**
+     * 施工内容(CONSTRUCONTENT,VARCHAR,255)
+     */
+    @ApiModelProperty(value="施工内容",required=false)
+    private String construcontent;
+
+    /**
+     * 施工文件名称(CONSTRUFILE,VARCHAR,255)
+     */
+    @ApiModelProperty(value="施工文件名称",required=false)
+    private String construfile;
+
+    /**
+     * 报工时间(SIGNTIME,VARCHAR,15)
+     */
+    @ApiModelProperty(value="报工时间",required=false)
+    private String signtime;
+
+    /**
+     * 备注(BZ,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String bz;
+
+    /**
+     * 图片路径(IMAGEURL,VARCHAR,255)
+     */
+    @ApiModelProperty(value="图片路径",required=false)
+    private String imageurl;
+
+    /**
+     * 图片名称(IMAGENAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="图片名称",required=false)
+    private String imagename;
+
+    /**
+     * 当前ID(MAXID,DECIMAL,20)
+     */
+    @ApiModelProperty(value="当前ID",required=false)
+    private BigDecimal maxid;
+
+    /**
+     * 审批单ID(DECLAREID,VARCHAR,255)
+     */
+    @ApiModelProperty(value="审批单ID",required=false)
+    private String declareid;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.construid;
+    }
+
+    @Override
+    public void setId(String construid) {
+        this.construid = construid == null ? null : construid.trim();
+    }
+
+    public String getConstruid() {
+        return construid;
+    }
+
+    public void setConstruid(String construid) {
+        this.construid = construid == null ? null : construid.trim();
+    }
+
+    public String getDevicename() {
+        return devicename;
+    }
+
+    public void setDevicename(String devicename) {
+        this.devicename = devicename == null ? null : devicename.trim();
+    }
+
+    public String getEquipment() {
+        return equipment;
+    }
+
+    public void setEquipment(String equipment) {
+        this.equipment = equipment == null ? null : equipment.trim();
+    }
+
+    public String getConstructionunits() {
+        return constructionunits;
+    }
+
+    public void setConstructionunits(String constructionunits) {
+        this.constructionunits = constructionunits == null ? null : constructionunits.trim();
+    }
+
+    public String getConstrupeople() {
+        return construpeople;
+    }
+
+    public void setConstrupeople(String construpeople) {
+        this.construpeople = construpeople == null ? null : construpeople.trim();
+    }
+
+    public String getConstrudate() {
+        return construdate;
+    }
+
+    public void setConstrudate(String construdate) {
+        this.construdate = construdate == null ? null : construdate.trim();
+    }
+
+    public String getConstrucontent() {
+        return construcontent;
+    }
+
+    public void setConstrucontent(String construcontent) {
+        this.construcontent = construcontent == null ? null : construcontent.trim();
+    }
+
+    public String getConstrufile() {
+        return construfile;
+    }
+
+    public void setConstrufile(String construfile) {
+        this.construfile = construfile == null ? null : construfile.trim();
+    }
+
+    public String getSigntime() {
+        return signtime;
+    }
+
+    public void setSigntime(String signtime) {
+        this.signtime = signtime == null ? null : signtime.trim();
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz == null ? null : bz.trim();
+    }
+
+    public String getImageurl() {
+        return imageurl;
+    }
+
+    public void setImageurl(String imageurl) {
+        this.imageurl = imageurl == null ? null : imageurl.trim();
+    }
+
+    public String getImagename() {
+        return imagename;
+    }
+
+    public void setImagename(String imagename) {
+        this.imagename = imagename == null ? null : imagename.trim();
+    }
+
+    public BigDecimal getMaxid() {
+        return maxid;
+    }
+
+    public void setMaxid(BigDecimal maxid) {
+        this.maxid = maxid;
+    }
+
+    public String getDeclareid() {
+        return declareid;
+    }
+
+    public void setDeclareid(String declareid) {
+        this.declareid = declareid == null ? null : declareid.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", construid=").append(construid);
+        sb.append(", devicename=").append(devicename);
+        sb.append(", equipment=").append(equipment);
+        sb.append(", constructionunits=").append(constructionunits);
+        sb.append(", construpeople=").append(construpeople);
+        sb.append(", construdate=").append(construdate);
+        sb.append(", construcontent=").append(construcontent);
+        sb.append(", construfile=").append(construfile);
+        sb.append(", signtime=").append(signtime);
+        sb.append(", bz=").append(bz);
+        sb.append(", imageurl=").append(imageurl);
+        sb.append(", imagename=").append(imagename);
+        sb.append(", maxid=").append(maxid);
+        sb.append(", declareid=").append(declareid);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 23 - 0
src/main/java/com/steerinfo/ems/tsubmitted/service/ITSubmittedService.java

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

+ 47 - 0
src/main/java/com/steerinfo/ems/tsubmitted/service/impl/TSubmittedServiceImpl.java

@@ -0,0 +1,47 @@
+package com.steerinfo.ems.tsubmitted.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.tsubmitted.model.TSubmitted;
+import com.steerinfo.ems.tsubmitted.mapper.TSubmittedMapper;
+import com.steerinfo.ems.tsubmitted.service.ITSubmittedService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * TSubmitted服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-06-10 04:08
+ * 类描述
+ * 修订历史:
+ * 日期:2022-06-10
+ * 作者:generator
+ * 参考:
+ * 描述:TSubmitted服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tSubmittedService")
+public class TSubmittedServiceImpl extends BaseServiceImpl<TSubmitted, String> implements ITSubmittedService {
+
+    @Autowired
+    private TSubmittedMapper tSubmittedMapper;
+
+    @Override
+    protected IBaseMapper<TSubmitted, String> getMapper() {
+        return tSubmittedMapper;
+    }
+
+    @Override
+    public Integer MaxID(String mouth) {
+        Integer maxId = tSubmittedMapper.selectMaxId(mouth);
+        if (maxId == null || maxId == 0) {
+            maxId = 1;
+        } else {
+            maxId = maxId + 1;
+        }
+        return maxId;
+    }
+}

+ 125 - 0
src/main/resources/application.properties

@@ -0,0 +1,125 @@
+server.port=8086
+#\u5FAE\u670D\u52A1\u7AEF\u53E3
+spring.jmx.default-domain=ems
+#\u6307\u5B9A\u7248\u672C
+api.version=v1
+#\u6307\u5B9Aencoding\u683C\u5F0F
+server.tomcat.uri-encoding=UTF-8
+
+# \u5B9A\u4E49swagger2\u5305\u8DEF\u5F84
+swagger2.enable=true
+swagger2.basepackage=com.steerinfo
+
+#\u542F\u7528shutdown
+# endpoints.shutdown.enabled=true
+#\u7981\u7528\u5BC6\u7801\u9A8C\u8BC1
+# endpoints.shutdown.sensitive=false
+
+#7*24*60*60*1000
+access.token.ttl=604800000
+#3*7*24*60*60*1000
+refresh.token.ttl=1814400000
+#;/${api.version}/sys/**/export;/${api.version}/sys/**/import;/**,auth
+# \u62E6\u622A\u5668\u9644\u52A0\u914D\u7F6E\uFF1A\u6BCF\u4E2Aurl\u8DEF\u5F84\u4EE5;\u5206\u9694\uFF1Burl\u7684\u9017\u53F7\u540Eauth\u8868\u793A\u9700\u8981\u8BA4\u8BC1\u540E\u624D\u80FD\u8BBF\u95EE\uFF0C\u6CA1\u6709\u6216\u8005anon\u8868\u793A\u4E0D\u6821\u9A8C
+shiro.chains=/auth/login/**;/ktr/;/${api.version}/sys/**/export;/${api.version}/syspromachineauths/verify**;/${api.version}/sys/**/import;/**,auth
+# \u62E6\u622A\u5668\u9644\u52A0\u914D\u7F6E\uFF1A\u6BCF\u4E2Aurl\u8DEF\u5F84\u4EE5;\u5206\u9694\uFF1Burl\u7684\u9017\u53F7\u540Eauth\u8868\u793A\u8BA4\u8BC1\u540E\u624D\u80FD\u8BBF\u95EE\uFF0C\u6CA1\u6709\u6216\u8005anon\u8868\u793A\u4E0D\u6821\u9A8C
+shiro.chains.append=/swagger**;/idmg/**;/ktr/;/${api.version}/sysposts/list/user**;/webjars/**;/v2/api**;/images/**;/configuration/**;/websocket/**;
+
+# Redis\u7F13\u5B58\u914D\u7F6E
+cache.level=2
+#Redis\u7F13\u5B58\u914D\u7F6E
+redis.host=172.16.90.238
+redis.port=6379
+redis.pwd=123456
+redis.project.prefix=slts
+redis.pool.maxTotal=8
+redis.pool.maxWaitMillis=1000
+redis.pool.maxIdle=4
+redis.cache.time=864000000
+redis.database=0
+
+#mq
+spring.rabbitmq.host=172.16.90.238
+spring.rabbitmq.port=8085
+spring.rabbitmq.username=admin
+spring.rabbitmq.password=123456
+spring.rabbitmq.wsExchangeName=ems_test_webSocket
+#spring.rabbitmq.host=127.0.0.1
+#spring.rabbitmq.port=5672
+#spring.rabbitmq.username=ems
+#spring.rabbitmq.password=123456
+
+
+#\u65E5\u5FD7 purchase
+#\u652F\u6301\u9AD8\u4EAE\u8F93\u51FA
+spring.output.ansi.enabled=ALWAYS
+spring.main.show-banner=false
+logging.level.com.steer=DEBUG
+
+#\u56FD\u9645\u5316
+spring.messages.basename=message
+spring.messages.encoding=UTF-8
+
+management.health.mail.enabled=false
+# MyBatis \u914D\u7F6E
+mybatis.mapper-locations=classpath*:com/hnshituo/mapper/*.xml
+###spring boot\u81EA\u52A8\u914D\u7F6E\u5355\u6570\u636E\u6E90###
+#spring.datasource.url=jdbc:oracle:thin:@192.168.1.160:1521:orcl
+#spring.datasource.username=sale
+#spring.datasource.password=oracle
+
+#\u591A\u6570\u636E\u6E90\u914D\u7F6E
+#master
+multiple.datasource.master.driver-class-name=oracle.jdbc.driver.OracleDriver
+multiple.datasource.master.url=jdbc:oracle:thin:@172.16.90.237:1521:zngksid
+multiple.datasource.master.username=ems
+multiple.datasource.master.password=123456
+multiple.datasource.master.initial-size=3
+multiple.datasource.master.min-idle=3
+multiple.datasource.master.maxActive=10
+multiple.datasource.master.maxWait=60000
+multiple.datasource.master.timeBetweenEvictionRunsMillis=60000
+multiple.datasource.master.minEvictableIdleTimeMillis=300000
+#\u6B63\u5F0F\u73AF\u5883
+#multiple.datasource.master.driver-class-name=oracle.jdbc.driver.OracleDriver
+#multiple.datasource.master.url=jdbc:oracle:thin:@172.16.90.227:1521:emsdb
+#multiple.datasource.master.username=ems
+#multiple.datasource.master.password=ems@2021
+#multiple.datasource.master.initial-size=3
+#multiple.datasource.master.min-idle=3
+#multiple.datasource.master.maxActive=10
+#multiple.datasource.master.maxWait=60000
+#multiple.datasource.master.timeBetweenEvictionRunsMillis=60000
+#multiple.datasource.master.minEvictableIdleTimeMillis=300000
+
+#slave1
+multiple.datasource.slave1.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
+multiple.datasource.slave1.url=jdbc:sqlserver://192.168.0.224:1433;database=bfgl_001_2018
+multiple.datasource.slave1.username=nengyuanjiankong
+multiple.datasource.slave1.password=nyjk_123
+#slave2
+multiple.datasource.slave2.driver-class-name=
+multiple.datasource.slave2.url=
+multiple.datasource.slave2.username=
+multiple.datasource.slave2.password=
+#other
+multiple.datasource.other.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
+multiple.datasource.other.url= jdbc:sqlserver://47.114.7.173:1433;database=Meter_Base
+multiple.datasource.other.username=mb
+multiple.datasource.other.password=mb@8888
+
+#ftp
+custom.config.file-server.ip= 172.16.90.238
+custom.config.file-server.port= 21
+custom.config.file-ftp-user= ftptest
+custom.config.file-ftp-password= at286315
+
+web.upload-path=/static/
+genxml.pth=/genxml/
+spring.http.encoding.force=true
+spring.mvc.static-path-pattern=/**
+spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,\
+  classpath:/static/,classpath:/genxml/,classpath:/public/,file:${web.upload-path},file:${genxml.pth}
+
+#\uFFFD\u013C\uFFFD\u00B7\uFFFD\uFFFD
+web.apk-path=data/lims/test/