Browse Source

1.停复役审批

javababay 2 years ago
parent
commit
3ad25f4a2f
24 changed files with 4053 additions and 0 deletions
  1. 359 0
      src/main/java/com/steerinfo/ems/tmaintenance/controller/TMaintenanceController.java
  2. 25 0
      src/main/java/com/steerinfo/ems/tmaintenance/mapper/TMaintenanceMapper.java
  3. 899 0
      src/main/java/com/steerinfo/ems/tmaintenance/mapper/TMaintenanceMapper.xml
  4. 346 0
      src/main/java/com/steerinfo/ems/tmaintenance/model/TMaintenance.java
  5. 38 0
      src/main/java/com/steerinfo/ems/tmaintenance/service/ITMaintenanceService.java
  6. 128 0
      src/main/java/com/steerinfo/ems/tmaintenance/service/impl/TMaintenanceServiceImpl.java
  7. 188 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/controller/TMaintenanceFileController.java
  8. 15 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/mapper/TMaintenanceFileMapper.java
  9. 171 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/mapper/TMaintenanceFileMapper.xml
  10. 66 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/model/TMaintenanceFile.java
  11. 26 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/service/ITMaintenanceFileService.java
  12. 55 0
      src/main/java/com/steerinfo/ems/tmaintenancefile/service/impl/TMaintenanceFileServiceImpl.java
  13. 187 0
      src/main/java/com/steerinfo/ems/tprocessinfor/controller/TProcessinforController.java
  14. 21 0
      src/main/java/com/steerinfo/ems/tprocessinfor/mapper/TProcessinforMapper.java
  15. 266 0
      src/main/java/com/steerinfo/ems/tprocessinfor/mapper/TProcessinforMapper.xml
  16. 147 0
      src/main/java/com/steerinfo/ems/tprocessinfor/model/TProcessinfor.java
  17. 33 0
      src/main/java/com/steerinfo/ems/tprocessinfor/service/ITProcessinforService.java
  18. 65 0
      src/main/java/com/steerinfo/ems/tprocessinfor/service/impl/TProcessinforServiceImpl.java
  19. 221 0
      src/main/java/com/steerinfo/ems/tsubmitted/controller/TSubmittedController.java
  20. 12 0
      src/main/java/com/steerinfo/ems/tsubmitted/mapper/TSubmittedMapper.java
  21. 455 0
      src/main/java/com/steerinfo/ems/tsubmitted/mapper/TSubmittedMapper.xml
  22. 253 0
      src/main/java/com/steerinfo/ems/tsubmitted/model/TSubmitted.java
  23. 24 0
      src/main/java/com/steerinfo/ems/tsubmitted/service/ITSubmittedService.java
  24. 53 0
      src/main/java/com/steerinfo/ems/tsubmitted/service/impl/TSubmittedServiceImpl.java

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

@@ -0,0 +1,359 @@
+package com.steerinfo.ems.tmaintenance.controller;
+
+import com.steerinfo.auth.utils.JwtUtil;
+import com.steerinfo.ems.Utils.DateUtils;
+import com.steerinfo.ems.tmaintenancefile.model.TMaintenanceFile;
+import com.steerinfo.ems.tmaintenancefile.service.ITMaintenanceFileService;
+import com.steerinfo.ems.tsubmitted.model.TSubmitted;
+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 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 javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.InputStream;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.math.BigDecimal;
+import java.util.stream.Collectors;
+
+/**
+ * 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;
+    @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("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")
+    })
+    @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 = "/updatecheck/{ids}")
+    public RESTfulResult updatecheck(@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.updatecheck(ids[i]);
+        }
+        return success(count, "本次共删除" + count + "条数据");
+    }
+
+    //修改
+    @PutMapping(value = "/pus/")
+    public RESTfulResult putMes(@ModelAttribute MultipartFile[] file, TMaintenance model, String del) {
+        String datetime = DateUtils.getCurrentTime("yyyy-MM-dd HH:mm:ss");
+        if (model == null) {
+            return failed(null, "参数错误!");
+        }
+        TMaintenance tMaintenance = new TMaintenance();
+        String bid = model.getDeclareid();
+        model.setChargetime(datetime);
+        tMaintenanceService.modify(model);
+        String filesid = "";
+        if (file!=null){
+            for (int i = 0; i <file.length ; i++) {
+                try {
+                    String userId = JwtUtil.getUseridByToken();
+                    //获取系统时间
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("/yyyy/MM/dd");
+                    //获取文件名
+                    String oldName = file[i].getOriginalFilename();
+                    //取当前时间的长整形值包含毫秒
+                    String newName = IDutils.getImageName();
+                    //重新命名文件
+                    newName = newName + oldName.substring(oldName.lastIndexOf("."));
+                    String filePath = simpleDateFormat.format(new Date());
+                    //获取输入流
+                    InputStream inputStream = file[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);
+                        uploadFile.setId(model.getDeclareid());
+                        TMaintenanceFile modela = tMaintenanceFileService.add(uploadFile);
+                        if (modela != null) {
+                            filesid += "," + modela.getId();
+                        }
+                    } else {
+                        return failed(null, "上传文件失败");
+                    }
+                } catch (Exception e) {
+                    e.getMessage();
+                }
+            }
+            return success(filesid);
+        }
+        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 updatetime = DateUtils.getCurrentTime("yyyy-MM-dd HH:mm:ss");
+        model.setChargetime(updatetime);
+        String bid = model.getDeclareid();
+        model.setDeclareid(model.getDeclareid()+DateUtils.getCurrentTime("yyyyMMdd") + "_"+ String.format("%04d", maxid));
+        tMaintenance = tMaintenanceService.add(model);
+        String filesid = "";
+        if (file!=null){
+            for (int i = 0; i <file.length ; i++) {
+                try {
+                    String userId = JwtUtil.getUseridByToken();
+                    //获取系统时间
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("/yyyy/MM/dd");
+                    //获取文件名
+                    String oldName = file[i].getOriginalFilename();
+                    //取当前时间的长整形值包含毫秒
+                    String newName = IDutils.getImageName();
+                    //重新命名文件
+                    newName = newName + oldName.substring(oldName.lastIndexOf("."));
+                    String filePath = simpleDateFormat.format(new Date());
+                    //获取输入流
+                    InputStream inputStream = file[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);
+                        uploadFile.setId(model.getDeclareid());
+                        TMaintenanceFile modela = tMaintenanceFileService.add(uploadFile);
+                        if (modela != null) {
+                            filesid += "," + modela.getId();
+                        }
+                    } else {
+                        return failed(null, "上传文件失败");
+                    }
+                } catch (Exception e) {
+                    e.getMessage();
+                }
+            }
+            return success(filesid);
+            }
+        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);
+    }
+    //审批分类查询
+    @GetMapping(value = "/likeapprovals/")
+    public RESTfulResult listLikeapprovals(@RequestParam HashMap parmas, Integer pageNum, Integer pageSize) {
+        PageList<TMaintenance> list = tMaintenanceService.listLikeapprovals(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();
+    }
+    //报工审批分类查询
+    @GetMapping(value = "/approval/")
+    public RESTfulResult listLikapproval(@RequestParam HashMap parmas, Integer pageNum, Integer pageSize) {
+        PageList<TMaintenance> list = tMaintenanceService.approval(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    //根据报工状态改变审核单状态
+    @PostMapping("/upstate/")
+    public RESTfulResult upstate(@RequestParam HashMap<String,String> tSubmitted){
+        TMaintenance tMaintenance = new TMaintenance();
+       String declareid= tSubmitted.get("declareid");
+       String state = tSubmitted.get("state");
+        tMaintenance.setDeclareid(declareid);
+        tMaintenance.setBillstatus(state);
+        Integer count = tMaintenanceService.upstate(tMaintenance);
+        return success(count);
+    }
+    //下载附件
+    @RequestMapping(value = "/downloadFile")
+    public void downloadFile(@RequestParam("fileUrl") String path, @RequestParam("fileName") String fileName, HttpServletResponse response) {
+        try {
+            boolean result = ftpFileUtil.download(response, fileName, path);
+            if (!result) {
+                //logger.error("下载文件<" + fileName + ">失败,文件不存在");
+                response.sendError(HttpServletResponse.SC_NOT_FOUND, "下载文件失败,文件目录不存在或文件不存在。");
+            }
+        } catch (Exception e) {
+            //logg.error("下载文件<" + fileName + ">失败", e);
+        }
+    }
+}

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

@@ -0,0 +1,25 @@
+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);
+    List<TMaintenance> selectLikes(Map<String, Object> parameters);
+    List<TMaintenance> approval(Map<String, Object> parameters);
+    Integer updatecheck(@Param(value = "declareid")String ids);
+}

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

@@ -0,0 +1,899 @@
+<?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"/>
+    <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 >= #{declaretime}
+      </if>
+      <if test="declaretime1 != null and declaretime1 != ''">
+        and DECLARETIME &lt;= #{declaretime1}
+      </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>
+  </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>
+  <select id="selectLikes" 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>
+      <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 >= #{declaretime}
+      </if>
+      <if test="declaretime1 != null and declaretime1 != ''">
+        and DECLARETIME &lt;= #{declaretime1}
+      </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>
+  </select>
+  <select id="approval" 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>
+      <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 >= #{declaretime}
+      </if>
+      <if test="declaretime1 != null and declaretime1 != ''">
+        and DECLARETIME &lt;= #{declaretime1}
+      </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>
+  </select>
+  <update id="updatecheck" parameterType="string">
+    update T_MAINTENANCE set
+    BILLSTATUS = '编辑中'
+    <where>
+      declareid in
+      #{declareid,jdbcType=VARCHAR} and RECORD>0
+    </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();
+    }
+}

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

@@ -0,0 +1,38 @@
+package com.steerinfo.ems.tmaintenance.service;
+
+import com.steerinfo.ems.tsubmitted.model.TSubmitted;
+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 updatecheck(String ids);
+    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);
+    PageList<TMaintenance> listLikeapprovals(Map<String, Object> parameters, Integer pageNum, Integer pageSize);
+    PageList<TMaintenance> approval(Map<String, Object> parameters, Integer pageNum, Integer pageSize);
+    Integer upstate (TMaintenance t);
+}

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

@@ -0,0 +1,128 @@
+package com.steerinfo.ems.tmaintenance.service.impl;
+
+import com.steerinfo.ems.tsubmitted.model.TSubmitted;
+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.ArrayList;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 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;
+    }
+    @Override
+    public PageList<TMaintenance> listLikeapprovals(Map<String, Object> parameters, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<TMaintenance> rows = tMaintenanceMapper.selectLikes(parameters);
+        List<TMaintenance> list = rows.stream().filter(tMaintenance -> !"编辑中".equals(tMaintenance.getBillstatus())).collect(Collectors.toList());
+        PageList pageInfo = new PageList(list);
+        return pageInfo;
+    }
+    @Override
+    public PageList<TMaintenance> approval(Map<String, Object> parameters, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<TMaintenance> rows = tMaintenanceMapper.approval(parameters);
+        List<TMaintenance> list = rows.stream().filter(tMaintenance -> "已通过".equals(tMaintenance.getBillstatus())||"已完成".equals(tMaintenance.getBillstatus())||"进行中".equals(tMaintenance.getBillstatus())).collect(Collectors.toList());
+        PageList pageInfo = new PageList(list);
+        return pageInfo;
+    }
+    @Override
+    public Integer upstate(TMaintenance t) {
+        int count = tMaintenanceMapper.updateByPrimaryKeySelective(t);
+        return count;
+    }
+    @Override
+    public Integer updatecheck(String ids) {
+        if ("".equals(ids) || ids == null) {
+            return 0;
+        } else {
+            int count = tMaintenanceMapper.updatecheck(ids);
+            return count;
+        }
+    }
+}

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

@@ -0,0 +1,188 @@
+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 javax.servlet.http.HttpServletResponse;
+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 id){
+        String filesid = "";
+        if (files!=null){
+                try {
+                    String userId = JwtUtil.getUseridByToken();
+                    //获取系统时间
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("/yyyy/MM/dd");
+                    //获取文件名
+                    String oldName = files.getOriginalFilename();
+                    //取当前时间的长整形值包含毫秒
+                    String newName = IDutils.getImageName();
+                    //重新命名文件
+                    newName = newName + oldName.substring(oldName.lastIndexOf("."));
+                    String filePath = simpleDateFormat.format(new Date());
+                    //获取输入流
+                    InputStream inputStream = files.getInputStream();
+                    boolean result = ftpFileUtil.uploadToFtp(inputStream, filePath, newName, false);
+                    inputStream.close();
+                    if (result) {
+                        TMaintenanceFile uploadFile = new TMaintenanceFile();
+                        uploadFile.setFilename(oldName);
+                        uploadFile.setFilepath(filePath + "/" + newName);
+                        uploadFile.setId(id);
+                        TMaintenanceFile model = tMaintenanceFileService.add(uploadFile);
+                        if (model != null) {
+                            filesid += "," + model.getId();
+                        }
+                    } else {
+                        return failed(null, "上传文件失败");
+                    }
+                } catch (Exception e) {
+                    e.getMessage();
+                }
+        }else {
+            return failed("请上传文件");
+        }
+            return success(filesid);
+    }
+    @GetMapping("/getlist/")
+    public RESTfulResult getlist(@RequestParam String id){
+        List<TMaintenanceFile> list = tMaintenanceFileService.list(id);
+        return success(list);
+    }
+    @GetMapping("/getlists/")
+    public RESTfulResult getlists(@RequestParam String construid){
+        List<TMaintenanceFile> list = tMaintenanceFileService.lists(construid);
+        return success(list);
+    }
+    @RequestMapping(value = "/downloadFile")
+    public void downloadFile(@RequestParam("filePath") String filepath, @RequestParam("fileName") String fileName, HttpServletResponse response) {
+        try {
+            boolean result = ftpFileUtil.download(response, fileName, filepath);
+            if (!result) {
+                //logger.error("下载文件<" + fileName + ">失败,文件不存在");
+                response.sendError(HttpServletResponse.SC_NOT_FOUND, "下载文件失败,文件目录不存在或文件不存在。");
+            }
+        } catch (Exception e) {
+            //logg.error("下载文件<" + fileName + ">失败", e);
+        }
+    }
+    @DeleteMapping(value = "/delfile/")
+    public RESTfulResult delFile(@RequestParam("fileName") String name,@RequestParam("filePath") String path){
+            int count=  tMaintenanceFileService.delFile(path);
+            if (count>0){
+                return success("删除成功");
+            }else {
+                return failed("删除文件失败,文件或不存在");
+            }
+    }
+}

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

@@ -0,0 +1,15 @@
+package com.steerinfo.ems.tmaintenancefile.mapper;
+
+import com.steerinfo.ems.tmaintenancefile.model.TMaintenanceFile;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface TMaintenanceFileMapper extends IBaseMapper<TMaintenanceFile, String> {
+    List<TMaintenanceFile> getlist(String id);
+    List<TMaintenanceFile> getlists(String construid);
+    Integer delFile(String path);
+}

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

@@ -0,0 +1,171 @@
+<?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>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getlist" parameterType="string" resultType="com.steerinfo.ems.tmaintenancefile.model.TMaintenanceFile">
+     select * from T_MAINTENANCE_FILE where ID = #{id}
+  </select>
+  <select id="getlists" parameterType="string" resultType="com.steerinfo.ems.tmaintenancefile.model.TMaintenanceFile">
+    select * from T_MAINTENANCE_FILE where ID = #{id}
+  </select>
+  <delete id="delFile" parameterType="string">
+    delete from T_MAINTENANCE_FILE
+    where FILEPATH = #{filepath,jdbcType=VARCHAR}
+  </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();
+    }
+}

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

@@ -0,0 +1,26 @@
+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;
+import java.util.List;
+
+/**
+ * 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>{
+   List<TMaintenanceFile>list(String id);
+   List<TMaintenanceFile>lists(String construid);
+   Integer delFile(String path);
+}

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

@@ -0,0 +1,55 @@
+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;
+import java.util.List;
+
+/**
+ * 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;
+    }
+
+    @Override
+    public List<TMaintenanceFile> list(String id) {
+        List<TMaintenanceFile> t = tMaintenanceFileMapper.getlist(id);
+        return t;
+    }
+    @Override
+    public List<TMaintenanceFile> lists(String construid) {
+        List<TMaintenanceFile> t = tMaintenanceFileMapper.getlist(construid);
+        return t;
+    }
+
+    @Override
+    public Integer delFile(String path) {
+       int count= tMaintenanceFileMapper.delFile(path);
+
+        return count;
+    }
+}

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

@@ -0,0 +1,187 @@
+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.controller.TRmWorkprocController;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+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.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 org.slf4j.LoggerFactory;
+import org.slf4j.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 {
+    private static final Logger LOGGER = LoggerFactory.getLogger(TProcessinforController.class);
+    @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);
+    }
+
+    //@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);
+
+    }
+
+    //@RequiresPermissions("tprocessinfor:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        TProcessinfor tProcessinfor = tProcessinforService.getById(id);
+        return success(tProcessinfor);
+    }
+
+    @GetMapping(value = "/gettree/")
+    public RESTfulResult getTree(@RequestParam HashMap parameters){
+        TreeUtils treeUtils = new TreeUtils();
+        List<TProcessinfor> list = tProcessinforService.getTree(parameters);
+        return success(treeUtils.getTreeData(list));
+    }
+    @GetMapping(value = "/getparent/", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult getParent(){
+        List<TProcessinfor> tProcessinfors = tProcessinforService.getParent();
+        return success(tProcessinfors);
+    }
+    @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);
+    }
+
+
+    @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();
+    }
+
+    //@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();
+    }
+
+
+    //@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 tProcessinfor = tProcessinforService.modify(model);
+        LOGGER.info("工序维护表修改后数据是" + tProcessinfor.toString());
+        return success(tProcessinfor);
+    }
+}

+ 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);
+    }
+
+
+}

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

@@ -0,0 +1,221 @@
+package com.steerinfo.ems.tsubmitted.controller;
+
+import com.steerinfo.auth.utils.JwtUtil;
+import com.steerinfo.ems.Utils.DateUtils;
+import com.steerinfo.ems.tmaintenance.model.TMaintenance;
+import com.steerinfo.ems.tmaintenance.service.ITMaintenanceService;
+import com.steerinfo.ems.tmaintenancefile.model.TMaintenanceFile;
+import com.steerinfo.ems.tmaintenancefile.service.ITMaintenanceFileService;
+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.poi.ss.formula.functions.T;
+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;
+    @Autowired
+    ITMaintenanceFileService tMaintenanceFileService;
+    @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);
+        String filesid = "";
+        if (file!=null){
+            for (int i = 0; i <file.length ; i++) {
+                try {
+                    String userId = JwtUtil.getUseridByToken();
+                    //获取系统时间
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("/yyyy/MM/dd");
+                    //获取文件名
+                    String oldName = file[i].getOriginalFilename();
+                    //取当前时间的长整形值包含毫秒
+                    String newName = IDutils.getImageName();
+                    //重新命名文件
+                    newName = newName + oldName.substring(oldName.lastIndexOf("."));
+                    String filePath = simpleDateFormat.format(new Date());
+                    //获取输入流
+                    InputStream inputStream = file[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);
+                        uploadFile.setId(model.getConstruid());
+                        TMaintenanceFile modela = tMaintenanceFileService.add(uploadFile);
+                        if (modela != null) {
+                            filesid += "," + modela.getId();
+                        }
+                    } else {
+                        return failed(null, "上传文件失败");
+                    }
+                } catch (Exception e) {
+                    e.getMessage();
+                }
+            }
+            return success(filesid);
+        }
+        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);
+}

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

@@ -0,0 +1,455 @@
+<?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" />
+    <result column="STATE" jdbcType="VARCHAR" property="state" />
+  </resultMap>
+  <sql id="columns">
+    CONSTRUID, DEVICENAME, EQUIPMENT, CONSTRUCTIONUNITS, CONSTRUPEOPLE, CONSTRUDATE, 
+    CONSTRUCONTENT, CONSTRUFILE, SIGNTIME, BZ, IMAGEURL, IMAGENAME, MAXID, DECLAREID,STATE
+  </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,t.state
+  </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>
+      <if test="state != null and state != ''">
+        and STATE = #{state}
+      </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,STATE)
+    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},#{state,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>
+      <if test="state != null">
+        STATE,
+      </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>
+      <if test="state != null">
+        #{state,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>

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

@@ -0,0 +1,253 @@
+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;
+
+    /**
+     * 报工状态(state,VARCHAR,255)
+     */
+    @ApiModelProperty(value="审批单ID",required=false)
+    private String state;
+    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 getState() {
+        return construid;
+    }
+    public void setState(String state) {
+        this.state = state == null ? null : state.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(", state=").append(state);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,24 @@
+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);
+    Integer upstate (TSubmitted t);
+}

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

@@ -0,0 +1,53 @@
+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;
+    }
+
+    @Override
+    public Integer upstate(TSubmitted t) {
+        int count = tSubmittedMapper.updateByPrimaryKey(t);
+        return count;
+    }
+}