瀏覽代碼

新增考察相关

Administrator 1 年之前
父節點
當前提交
804a7334dc
共有 27 個文件被更改,包括 509 次插入88 次删除
  1. 3 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
  2. 14 5
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/investigate/InvestigateDispositionController.java
  3. 13 8
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/investigate/InvestigateDispositionTableController.java
  4. 2 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/investigate/InvestigateTableController.java
  5. 29 0
      ruoyi-common/pom.xml
  6. 8 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java
  7. 5 7
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InvestigateDisposition.java
  8. 二進制
      ruoyi-common/src/main/java/lib/commons-codec-1.9.jar
  9. 二進制
      ruoyi-common/src/main/java/lib/commons-fileupload-1.3.1.jar
  10. 二進制
      ruoyi-common/src/main/java/lib/commons-io-2.4.jar
  11. 二進制
      ruoyi-common/src/main/java/lib/json.jar
  12. 二進制
      ruoyi-common/src/main/java/lib/ueditor-1.1.2.jar
  13. 2 0
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
  14. 7 0
      ruoyi-system/pom.xml
  15. 56 1
      ruoyi-system/src/main/java/com/ruoyi/system/domain/InvestigateDispositionTable.java
  16. 17 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/InvestigateTable.java
  17. 1 2
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/InvestigateDispositionMapper.java
  18. 2 2
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/InvestigateDispositionTableMapper.java
  19. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/InvestigateUserMapper.java
  20. 27 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/IInvestigateDispositionService.java
  21. 2 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/IInvestigateDispositionTableService.java
  22. 107 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InvestigateDispositionServiceImpl.java
  23. 48 3
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InvestigateDispositionTableServiceImpl.java
  24. 60 32
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InvestigateTableServiceImpl.java
  25. 42 11
      ruoyi-system/src/main/resources/mapper/system/InvestigateDispositionTableMapper.xml
  26. 46 6
      ruoyi-system/src/main/resources/mapper/system/InvestigateTableMapper.xml
  27. 10 0
      ruoyi-system/src/main/resources/mapper/system/InvestigateUserMapper.xml

+ 3 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -1,5 +1,6 @@
 package com.ruoyi.web.controller.common;
 
+import java.io.InputStream;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
@@ -10,11 +11,9 @@ import com.ruoyi.web.controller.utils.HtmlGenerator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ClassPathResource;
 import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import com.ruoyi.common.config.RuoYiConfig;
 import com.ruoyi.common.constant.Constants;

+ 14 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/investigate/InvestigateDispositionController.java

@@ -2,12 +2,12 @@ package com.ruoyi.web.controller.investigate;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.core.domain.entity.SysDept;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -16,7 +16,7 @@ import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.system.domain.InvestigateDisposition;
+import com.ruoyi.common.core.domain.entity.InvestigateDisposition;
 import com.ruoyi.system.service.IInvestigateDispositionService;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.page.TableDataInfo;
@@ -37,11 +37,9 @@ public class InvestigateDispositionController extends BaseController
     /**
      * 查询考察配置列表
      */
-    @PreAuthorize("@ss.hasPermi('system:disposition:list')")
     @GetMapping("/list")
     public TableDataInfo list(InvestigateDisposition investigateDisposition)
     {
-        startPage();
         List<InvestigateDisposition> list = investigateDispositionService.selectInvestigateDispositionList(investigateDisposition);
         return getDataTable(list);
     }
@@ -77,6 +75,7 @@ public class InvestigateDispositionController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody InvestigateDisposition investigateDisposition)
     {
+        investigateDisposition.setCreateBy(getUsername());
         return toAjax(investigateDispositionService.insertInvestigateDisposition(investigateDisposition));
     }
 
@@ -101,4 +100,14 @@ public class InvestigateDispositionController extends BaseController
     {
         return toAjax(investigateDispositionService.deleteInvestigateDispositionByInvestigateDispositionIds(investigateDispositionIds));
     }
+
+    /**
+     * 获取考察配置树列表
+     */
+
+    @GetMapping("/investigateDispositionTree")
+    public AjaxResult investigateDispositionTree(InvestigateDisposition investigateDisposition)
+    {
+        return success(investigateDispositionService.selectInvestigateDispositionTreeList(investigateDisposition));
+    }
 }

+ 13 - 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/investigate/InvestigateDispositionTableController.java

@@ -2,6 +2,8 @@ package com.ruoyi.web.controller.investigate;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.framework.config.ServerConfig;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -34,14 +36,15 @@ public class InvestigateDispositionTableController extends BaseController
     @Autowired
     private IInvestigateDispositionTableService investigateDispositionTableService;
 
+    @Autowired
+    private ServerConfig serverConfig;
+
     /**
      * 查询考察配置与考察主关联列表
      */
-    @PreAuthorize("@ss.hasPermi('system:table:list')")
     @GetMapping("/list")
     public TableDataInfo list(InvestigateDispositionTable investigateDispositionTable)
     {
-        startPage();
         List<InvestigateDispositionTable> list = investigateDispositionTableService.selectInvestigateDispositionTableList(investigateDispositionTable);
         return getDataTable(list);
     }
@@ -63,10 +66,10 @@ public class InvestigateDispositionTableController extends BaseController
      * 获取考察配置与考察主关联详细信息
      */
     @PreAuthorize("@ss.hasPermi('system:table:query')")
-    @GetMapping(value = "/{investigateTableId}")
-    public AjaxResult getInfo(@PathVariable("investigateTableId") Long investigateTableId)
+    @GetMapping(value = "/query")
+    public AjaxResult getInfo(InvestigateDispositionTable investigateDispositionTable)
     {
-        return success(investigateDispositionTableService.selectInvestigateDispositionTableByInvestigateTableId(investigateTableId));
+        return success(investigateDispositionTableService.selectInvestigateDispositionTableList(investigateDispositionTable));
     }
 
     /**
@@ -77,6 +80,8 @@ public class InvestigateDispositionTableController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody InvestigateDispositionTable investigateDispositionTable)
     {
+        investigateDispositionTable.setCreateBy(getUsername());
+        investigateDispositionTable.setUrl(serverConfig.getUrl());
         return toAjax(investigateDispositionTableService.insertInvestigateDispositionTable(investigateDispositionTable));
     }
 
@@ -96,9 +101,9 @@ public class InvestigateDispositionTableController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:table:remove')")
     @Log(title = "考察配置与考察主关联", businessType = BusinessType.DELETE)
-	@GetMapping("/delete/{investigateTableIds}")
-    public AjaxResult remove(@PathVariable Long[] investigateTableIds)
+	@GetMapping("/delete")
+    public AjaxResult remove(InvestigateDispositionTable investigateDispositionTable)
     {
-        return toAjax(investigateDispositionTableService.deleteInvestigateDispositionTableByInvestigateTableIds(investigateTableIds));
+        return toAjax(investigateDispositionTableService.deleteInvestigateDispositionTableByInvestigateTableIds(investigateDispositionTable));
     }
 }

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/investigate/InvestigateTableController.java

@@ -62,7 +62,6 @@ public class InvestigateTableController extends BaseController
     /**
      * 获取考察主详细信息
      */
-    @PreAuthorize("@ss.hasPermi('investigate:table:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -70,13 +69,14 @@ public class InvestigateTableController extends BaseController
     }
 
     /**
-     * 新增考察主
+     * 新增考察主信息
      */
     @PreAuthorize("@ss.hasPermi('investigate:table:add')")
     @Log(title = "考察主", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody InvestigateTable investigateTable)
     {
+        investigateTable.setCreateBy(getUsername());
         return toAjax(investigateTableService.insertInvestigateTable(investigateTable));
     }
 

+ 29 - 0
ruoyi-common/pom.xml

@@ -131,7 +131,36 @@
             <groupId>javax.servlet</groupId>
             <artifactId>javax.servlet-api</artifactId>
         </dependency>
+        <!--百度编译器核心包-->
+        <dependency>
+            <groupId>ueditor-1.1.2</groupId>
+            <artifactId>ueditor-1.1.2</artifactId>
+            <version>1.1.2</version>
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/src/main/java/lib/ueditor-1.1.2.jar</systemPath>
+        </dependency>
 
+        <dependency>
+            <groupId>commons-codec-1.9</groupId>
+            <artifactId>commons-codec-1.9</artifactId>
+            <version>1.1.2</version>
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/src/main/java/lib/commons-codec-1.9.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>commons-fileupload-1.3.1</groupId>
+            <artifactId>commons-fileupload-1.3.1</artifactId>
+            <version>1.1.2</version>
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/src/main/java/lib/commons-fileupload-1.3.1.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>json</groupId>
+            <artifactId>json</artifactId>
+            <version>1.1.2</version>
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/src/main/java/lib/json.jar</systemPath>
+        </dependency>
     </dependencies>
 
 </project>

+ 8 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java

@@ -4,6 +4,7 @@ import java.io.Serializable;
 import java.util.List;
 import java.util.stream.Collectors;
 import com.fasterxml.jackson.annotation.JsonInclude;
+import com.ruoyi.common.core.domain.entity.InvestigateDisposition;
 import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.core.domain.entity.SysMenu;
 
@@ -37,6 +38,13 @@ public class TreeSelect implements Serializable
         this.label = dept.getDeptName();
         this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
     }
+    public TreeSelect(InvestigateDisposition dept)
+    {
+        this.id = dept.getInvestigateDispositionId();
+        this.label = dept.getTitle();
+        this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
+    }
+
 
     public TreeSelect(SysMenu menu)
     {

+ 5 - 7
ruoyi-system/src/main/java/com/ruoyi/system/domain/InvestigateDisposition.java → ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InvestigateDisposition.java

@@ -1,4 +1,4 @@
-package com.ruoyi.system.domain;
+package com.ruoyi.common.core.domain.entity;
 
 import com.ruoyi.common.core.domain.entity.SysDept;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -50,7 +50,7 @@ public class InvestigateDisposition extends BaseEntity
     private String parentName;
 
     /** 子部门 */
-    private List<SysDept> children = new ArrayList<SysDept>();
+    private List<InvestigateDisposition> children = new ArrayList<InvestigateDisposition>();
 
     public String getParentName()
     {
@@ -62,17 +62,15 @@ public class InvestigateDisposition extends BaseEntity
         this.parentName = parentName;
     }
 
-    public List<SysDept> getChildren()
-    {
+    public List<InvestigateDisposition> getChildren() {
         return children;
     }
 
-    public void setChildren(List<SysDept> children)
-    {
+    public void setChildren(List<InvestigateDisposition> children) {
         this.children = children;
     }
 
-    public void setInvestigateDispositionId(Long investigateDispositionId) 
+    public void setInvestigateDispositionId(Long investigateDispositionId)
     {
         this.investigateDispositionId = investigateDispositionId;
     }

二進制
ruoyi-common/src/main/java/lib/commons-codec-1.9.jar


二進制
ruoyi-common/src/main/java/lib/commons-fileupload-1.3.1.jar


二進制
ruoyi-common/src/main/java/lib/commons-io-2.4.jar


二進制
ruoyi-common/src/main/java/lib/json.jar


二進制
ruoyi-common/src/main/java/lib/ueditor-1.1.2.jar


+ 2 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -111,6 +111,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 // 过滤请求
                 .authorizeRequests()
                 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
+                .antMatchers("/login", "/register", "/captchaImage").permitAll()
+                .antMatchers("/investigate/**","/investigate/disposition/**","/common/**").permitAll()
                 .antMatchers("/login", "/register", "/captchaImage","/common/filetext").permitAll()
                 // 静态资源,可匿名访问
                 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()

+ 7 - 0
ruoyi-system/pom.xml

@@ -17,6 +17,13 @@
 
     <dependencies>
 
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-mock</artifactId>
+            <version>2.0.8</version>
+        </dependency>
+
         <!-- 通用工具-->
         <dependency>
             <groupId>com.ruoyi</groupId>

+ 56 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/InvestigateDispositionTable.java

@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
+import java.util.List;
+
 /**
  * 考察配置与考察主关联对象 investigate_disposition_table
  * 
@@ -21,7 +23,60 @@ public class InvestigateDispositionTable extends BaseEntity
     /** 考察配置表id */
     private Long investigateDispositionId;
 
-    public void setInvestigateTableId(Long investigateTableId) 
+    /**
+     * 链接地址
+     */
+    private String url;
+    /**
+     * 考察具体内容
+     */
+    private String content;
+
+    private String title;
+    private String investigateName;
+    private String endTime;
+
+    public String getInvestigateName() {
+        return investigateName;
+    }
+
+    public void setInvestigateName(String investigateName) {
+        this.investigateName = investigateName;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public void setInvestigateTableId(Long investigateTableId)
     {
         this.investigateTableId = investigateTableId;
     }

+ 17 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/InvestigateTable.java

@@ -1,6 +1,8 @@
 package com.ruoyi.system.domain;
 
 import java.util.Date;
+import java.util.List;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -36,11 +38,26 @@ public class InvestigateTable extends BaseEntity
     /** 访问密码 */
     @Excel(name = "访问密码")
     private String cipher;
+    /**
+     * 考察人员集合
+     */
+    private List<InvestigateUser> investigateUserList;
+
 
 
     /** 考察配置组 */
     private Long[] investigateDispositionTableIds;
 
+
+
+    public List<InvestigateUser> getInvestigateUserList() {
+        return investigateUserList;
+    }
+
+    public void setInvestigateUserList(List<InvestigateUser> investigateUserList) {
+        this.investigateUserList = investigateUserList;
+    }
+
     public Long[] getInvestigateDispositionTableIds() {
         return investigateDispositionTableIds;
     }

+ 1 - 2
ruoyi-system/src/main/java/com/ruoyi/system/mapper/InvestigateDispositionMapper.java

@@ -2,8 +2,7 @@ package com.ruoyi.system.mapper;
 
 import java.util.List;
 
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.system.domain.InvestigateDisposition;
+import com.ruoyi.common.core.domain.entity.InvestigateDisposition;
 import org.apache.ibatis.annotations.Param;
 
 /**

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/mapper/InvestigateDispositionTableMapper.java

@@ -55,10 +55,10 @@ public interface InvestigateDispositionTableMapper
     /**
      * 批量删除考察配置与考察主关联
      * 
-     * @param investigateTableIds 需要删除的数据主键集合
+     * @param investigateDispositionTable 需要删除的数据主键集合
      * @return 结果
      */
-    public int deleteInvestigateDispositionTableByInvestigateTableIds(Long[] investigateTableIds);
+    public int deleteInvestigateDispositionTableByInvestigateTableIds(InvestigateDispositionTable investigateDispositionTable);
 
     /**
      * 批量新增

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/InvestigateUserMapper.java

@@ -1,6 +1,8 @@
 package com.ruoyi.system.mapper;
 
 import java.util.List;
+
+import com.ruoyi.system.domain.InvestigateDispositionTable;
 import com.ruoyi.system.domain.InvestigateUser;
 
 /**
@@ -58,4 +60,10 @@ public interface InvestigateUserMapper
      * @return 结果
      */
     public int deleteInvestigateUserByIds(Long[] ids);
+    public int batchDispositionUser(List<InvestigateUser> dispositionUserList);
+
+    int deleteInvestigateUserByInvestigateId(Long investigateTableId);
+
+
+
 }

+ 27 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/IInvestigateDispositionService.java

@@ -1,7 +1,9 @@
 package com.ruoyi.system.service;
 
 import java.util.List;
-import com.ruoyi.system.domain.InvestigateDisposition;
+
+import com.ruoyi.common.core.domain.TreeSelect;
+import com.ruoyi.common.core.domain.entity.InvestigateDisposition;
 
 /**
  * 考察配置Service接口
@@ -58,4 +60,28 @@ public interface IInvestigateDispositionService
      * @return 结果
      */
     public int deleteInvestigateDispositionByInvestigateDispositionId(Long investigateDispositionId);
+
+    /**
+     * 查询部门树结构信息
+     *
+     * @param investigateDisposition 部门信息
+     * @return 部门树信息集合
+     */
+    public List<TreeSelect> selectInvestigateDispositionTreeList(InvestigateDisposition investigateDisposition);
+
+    /**
+     * 构建前端所需要树结构
+     *
+     * @param investigateDispositions 部门列表
+     * @return 树结构列表
+     */
+    public List<InvestigateDisposition> buildInvestigateDispositionTree(List<InvestigateDisposition> investigateDispositions);
+
+    /**
+     * 构建前端所需要下拉树结构
+     *
+     * @param investigateDispositions 部门列表
+     * @return 下拉树结构列表
+     */
+    public List<TreeSelect> buildInvestigateDispositionTreeSelect(List<InvestigateDisposition> investigateDispositions);
 }

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/IInvestigateDispositionTableService.java

@@ -46,10 +46,10 @@ public interface IInvestigateDispositionTableService
     /**
      * 批量删除考察配置与考察主关联
      * 
-     * @param investigateTableIds 需要删除的考察配置与考察主关联主键集合
+     * @param investigateDispositionTable 需要删除的考察配置与考察主关联主键集合
      * @return 结果
      */
-    public int deleteInvestigateDispositionTableByInvestigateTableIds(Long[] investigateTableIds);
+    public int deleteInvestigateDispositionTableByInvestigateTableIds(InvestigateDispositionTable investigateDispositionTable);
 
     /**
      * 删除考察配置与考察主关联信息

+ 107 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InvestigateDispositionServiceImpl.java

@@ -1,14 +1,19 @@
 package com.ruoyi.system.service.impl;
 
+import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
+import java.util.stream.Collectors;
 
+import com.ruoyi.common.core.domain.TreeSelect;
 import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.InvestigateDispositionMapper;
-import com.ruoyi.system.domain.InvestigateDisposition;
+import com.ruoyi.common.core.domain.entity.InvestigateDisposition;
 import com.ruoyi.system.service.IInvestigateDispositionService;
 
 /**
@@ -58,7 +63,10 @@ public class InvestigateDispositionServiceImpl implements IInvestigateDispositio
     {
         InvestigateDisposition info = investigateDispositionMapper.selectInvestigateDispositionById(investigateDisposition.getParentId());
         investigateDisposition.setCreateTime(DateUtils.getNowDate());
-        investigateDisposition.setAncestors(info.getAncestors() + "," + investigateDisposition.getParentId());
+        investigateDisposition.setAncestors("0");
+        if (info != null){
+            investigateDisposition.setAncestors(info.getAncestors() + "," + investigateDisposition.getParentId());
+        }
         return investigateDispositionMapper.insertInvestigateDisposition(investigateDisposition);
     }
 
@@ -127,4 +135,101 @@ public class InvestigateDispositionServiceImpl implements IInvestigateDispositio
     {
         return investigateDispositionMapper.deleteInvestigateDispositionByInvestigateDispositionId(investigateDispositionId);
     }
+
+
+    /**
+     * 查询部门树结构信息
+     *
+     * @param investigateDisposition 部门信息
+     * @return 部门树信息集合
+     */
+    @Override
+    public List<TreeSelect> selectInvestigateDispositionTreeList(InvestigateDisposition investigateDisposition)
+    {
+        List<InvestigateDisposition> investigateDispositions = selectInvestigateDispositionList(investigateDisposition);
+        return buildInvestigateDispositionTreeSelect(investigateDispositions);
+    }
+
+    /**
+     * 构建前端所需要树结构
+     *
+     * @param investigateDispositions 部门列表
+     * @return 树结构列表
+     */
+    @Override
+    public List<InvestigateDisposition> buildInvestigateDispositionTree(List<InvestigateDisposition> investigateDispositions)
+    {
+        List<InvestigateDisposition> returnList = new ArrayList<InvestigateDisposition>();
+        List<Long> tempList = investigateDispositions.stream().map(InvestigateDisposition::getInvestigateDispositionId).collect(Collectors.toList());
+        for (InvestigateDisposition investigateDisposition : investigateDispositions)
+        {
+            // 如果是顶级节点, 遍历该父节点的所有子节点
+            if (!tempList.contains(investigateDisposition.getParentId()))
+            {
+                recursionFn(investigateDispositions, investigateDisposition);
+                returnList.add(investigateDisposition);
+            }
+        }
+        if (returnList.isEmpty())
+        {
+            returnList = investigateDispositions;
+        }
+        return returnList;
+    }
+
+    /**
+     * 构建前端所需要下拉树结构
+     *
+     * @param investigateDispositions 部门列表
+     * @return 下拉树结构列表
+     */
+    @Override
+    public List<TreeSelect> buildInvestigateDispositionTreeSelect(List<InvestigateDisposition> investigateDispositions)
+    {
+        List<InvestigateDisposition> deptTrees = buildInvestigateDispositionTree(investigateDispositions);
+        return deptTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
+    }
+
+    /**
+     * 递归列表
+     */
+    private void recursionFn(List<InvestigateDisposition> list, InvestigateDisposition t)
+    {
+        // 得到子节点列表
+        List<InvestigateDisposition> childList = getChildList(list, t);
+        t.setChildren(childList);
+        for (InvestigateDisposition tChild : childList)
+        {
+            if (hasChild(list, tChild))
+            {
+                recursionFn(list, tChild);
+            }
+        }
+    }
+
+    /**
+     * 得到子节点列表
+     */
+    private List<InvestigateDisposition> getChildList(List<InvestigateDisposition> list, InvestigateDisposition t)
+    {
+        List<InvestigateDisposition> tlist = new ArrayList<InvestigateDisposition>();
+        Iterator<InvestigateDisposition> it = list.iterator();
+        while (it.hasNext())
+        {
+            InvestigateDisposition n = (InvestigateDisposition) it.next();
+            if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getInvestigateDispositionId().longValue())
+            {
+                tlist.add(n);
+            }
+        }
+        return tlist;
+    }
+
+    /**
+     * 判断是否有子节点
+     */
+    private boolean hasChild(List<InvestigateDisposition> list, InvestigateDisposition t)
+    {
+        return getChildList(list, t).size() > 0;
+    }
 }

+ 48 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InvestigateDispositionTableServiceImpl.java

@@ -1,11 +1,23 @@
 package com.ruoyi.system.service.impl;
 
+import java.io.*;
+import java.nio.charset.StandardCharsets;
 import java.util.List;
+import java.util.UUID;
+
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.common.utils.file.FileUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.mock.web.MockMultipartFile;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.InvestigateDispositionTableMapper;
 import com.ruoyi.system.domain.InvestigateDispositionTable;
 import com.ruoyi.system.service.IInvestigateDispositionTableService;
+import org.springframework.util.FileCopyUtils;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
 
 /**
  * 考察配置与考察主关联Service业务层处理
@@ -19,6 +31,8 @@ public class InvestigateDispositionTableServiceImpl implements IInvestigateDispo
     @Autowired
     private InvestigateDispositionTableMapper investigateDispositionTableMapper;
 
+
+
     /**
      * 查询考察配置与考察主关联
      * 
@@ -52,9 +66,39 @@ public class InvestigateDispositionTableServiceImpl implements IInvestigateDispo
     @Override
     public int insertInvestigateDispositionTable(InvestigateDispositionTable investigateDispositionTable)
     {
+        //获取HTML文件
+        String content = investigateDispositionTable.getContent();
+        content = " <meta charset=\"utf-8\">" +content;
+        try {
+            // 上传文件路径
+            String filePath = RuoYiConfig.getUploadPath();
+            String fileNameHtml = UUID.randomUUID().toString();
+            File html = File.createTempFile(fileNameHtml, ".html",new File(filePath));
+            BufferedWriter writer = new BufferedWriter (new OutputStreamWriter (new FileOutputStream (html,true),StandardCharsets.UTF_8));
+            writer.write(content);
+            writer.close();
+            InputStream inputStream = new FileInputStream(html);
+            MultipartFile file = new org.springframework.mock.web.MockMultipartFile(html.getName(),html.getName(),"text/html",inputStream);
+
+            // 上传并返回新文件名称
+            String fileName = FileUploadUtils.upload(filePath, file);
+            String url = investigateDispositionTable.getUrl() + fileName;
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("url", url);
+            ajax.put("fileName", fileName);
+            ajax.put("newFileName", FileUtils.getName(fileName));
+            ajax.put("originalFilename", file.getOriginalFilename());
+            investigateDispositionTable.setUrl(url);
+            html.delete();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        System.out.println("文件生成成功!");
         return investigateDispositionTableMapper.insertInvestigateDispositionTable(investigateDispositionTable);
     }
 
+
+
     /**
      * 修改考察配置与考察主关联
      * 
@@ -64,19 +108,20 @@ public class InvestigateDispositionTableServiceImpl implements IInvestigateDispo
     @Override
     public int updateInvestigateDispositionTable(InvestigateDispositionTable investigateDispositionTable)
     {
+
         return investigateDispositionTableMapper.updateInvestigateDispositionTable(investigateDispositionTable);
     }
 
     /**
      * 批量删除考察配置与考察主关联
      * 
-     * @param investigateTableIds 需要删除的考察配置与考察主关联主键
+     * @param investigateDispositionTable 需要删除的考察配置与考察主关联主键
      * @return 结果
      */
     @Override
-    public int deleteInvestigateDispositionTableByInvestigateTableIds(Long[] investigateTableIds)
+    public int deleteInvestigateDispositionTableByInvestigateTableIds(InvestigateDispositionTable investigateDispositionTable)
     {
-        return investigateDispositionTableMapper.deleteInvestigateDispositionTableByInvestigateTableIds(investigateTableIds);
+        return investigateDispositionTableMapper.deleteInvestigateDispositionTableByInvestigateTableIds(investigateDispositionTable);
     }
 
     /**

+ 60 - 32
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InvestigateTableServiceImpl.java

@@ -7,8 +7,10 @@ import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.InvestigateDispositionTable;
+import com.ruoyi.system.domain.InvestigateUser;
 import com.ruoyi.system.domain.SysUserRole;
 import com.ruoyi.system.mapper.InvestigateDispositionTableMapper;
+import com.ruoyi.system.mapper.InvestigateUserMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.InvestigateTableMapper;
@@ -17,55 +19,77 @@ import com.ruoyi.system.service.IInvestigateTableService;
 
 /**
  * 考察主Service业务层处理
- * 
+ *
  * @author ruoyi
  * @date 2023-10-10
  */
 @Service
-public class InvestigateTableServiceImpl implements IInvestigateTableService 
-{
+public class InvestigateTableServiceImpl implements IInvestigateTableService {
     @Autowired
     private InvestigateTableMapper investigateTableMapper;
     @Autowired
     private InvestigateDispositionTableMapper investigateDispositionTableMapper;
+    @Autowired
+    private InvestigateUserMapper investigateUserMapper;
 
     /**
      * 查询考察主
-     * 
+     *
      * @param id 考察主主键
      * @return 考察主
      */
     @Override
-    public InvestigateTable selectInvestigateTableById(Long id)
-    {
+    public InvestigateTable selectInvestigateTableById(Long id) {
         return investigateTableMapper.selectInvestigateTableById(id);
     }
 
     /**
      * 查询考察主列表
-     * 
+     *
      * @param investigateTable 考察主
      * @return 考察主
      */
     @Override
-    public List<InvestigateTable> selectInvestigateTableList(InvestigateTable investigateTable)
-    {
+    public List<InvestigateTable> selectInvestigateTableList(InvestigateTable investigateTable) {
         return investigateTableMapper.selectInvestigateTableList(investigateTable);
     }
 
     /**
      * 新增考察主
-     * 
+     *
      * @param investigateTable 考察主
      * @return 结果
      */
     @Override
-    public int insertInvestigateTable(InvestigateTable investigateTable)
-    {
+    public int insertInvestigateTable(InvestigateTable investigateTable) {
         investigateTable.setCreateTime(DateUtils.getNowDate());
         //新增考察配置与考察主表关联
-        insertInvestigateDispositionTable(investigateTable);
-        return investigateTableMapper.insertInvestigateTable(investigateTable);
+        //insertInvestigateDispositionTable(investigateTable);
+        List<InvestigateUser> investigateUserList = investigateTable.getInvestigateUserList();
+        int i = investigateTableMapper.insertInvestigateTable(investigateTable);
+        investigateTable.setCipher(getCode(4));
+        if (investigateUserList != null) {
+            for (InvestigateUser investigateUser : investigateUserList) {
+                investigateUser.setInvestigateId(investigateTable.getInvestigateTableId());
+            }
+            investigateUserMapper.batchDispositionUser(investigateUserList);
+        }
+        return i;
+    }
+
+    //生成X位验证码
+    public static String getCode(Integer num) {
+        String[] codes = {"1", "2", "3", "4", "5", "6", "7", "8", "9"};
+        StringBuilder code = new StringBuilder();
+        for (int i = 0; i < num; i++) {
+            int j = (int) (Math.random() * 10);
+            if (j <= 0) {
+                j = 1;
+            }
+            code.append(codes[j - 1]);
+
+        }
+        return code.toString();
     }
 
     /**
@@ -73,25 +97,21 @@ public class InvestigateTableServiceImpl implements IInvestigateTableService
      *
      * @param investigateTable 考察主表对象
      */
-    public void insertInvestigateDispositionTable(InvestigateTable investigateTable)
-    {
+    public void insertInvestigateDispositionTable(InvestigateTable investigateTable) {
         this.insertInvestigateDispositionTable(investigateTable.getInvestigateTableId(), investigateTable.getInvestigateDispositionTableIds());
     }
 
     /**
      * 新增考察配置与考察主表关联
      *
-     * @param investigateTableId 察主表ID
+     * @param investigateTableId             察主表ID
      * @param investigateDispositionTableIds 考察配置组
      */
-    public void insertInvestigateDispositionTable(Long investigateTableId, Long[] investigateDispositionTableIds)
-    {
-        if (StringUtils.isNotEmpty(investigateDispositionTableIds))
-        {
+    public void insertInvestigateDispositionTable(Long investigateTableId, Long[] investigateDispositionTableIds) {
+        if (StringUtils.isNotEmpty(investigateDispositionTableIds)) {
             // 新增考察配置与考察主表关联
             List<InvestigateDispositionTable> list = new ArrayList<InvestigateDispositionTable>(investigateDispositionTableIds.length);
-            for (Long dispositionId : investigateDispositionTableIds)
-            {
+            for (Long dispositionId : investigateDispositionTableIds) {
                 InvestigateDispositionTable investigateDispositionTable = new InvestigateDispositionTable();
                 investigateDispositionTable.setInvestigateTableId(investigateTableId);
                 investigateDispositionTable.setInvestigateDispositionId(dispositionId);
@@ -100,40 +120,48 @@ public class InvestigateTableServiceImpl implements IInvestigateTableService
             investigateDispositionTableMapper.batchDispositionTable(list);
         }
     }
+
     /**
      * 修改考察主
-     * 
+     *
      * @param investigateTable 考察主
      * @return 结果
      */
     @Override
-    public int updateInvestigateTable(InvestigateTable investigateTable)
-    {
+    public int updateInvestigateTable(InvestigateTable investigateTable) {
         investigateTable.setUpdateTime(DateUtils.getNowDate());
+        //删除原先的考察人员数据
+        Long investigateTableId = investigateTable.getInvestigateTableId();
+        investigateUserMapper.deleteInvestigateUserByInvestigateId(investigateTableId);
+        List<InvestigateUser> investigateUserList = investigateTable.getInvestigateUserList();
+        if (investigateUserList != null) {
+            for (InvestigateUser investigateUser : investigateUserList) {
+                investigateUser.setInvestigateId(investigateTable.getInvestigateTableId());
+            }
+            investigateUserMapper.batchDispositionUser(investigateUserList);
+        }
         return investigateTableMapper.updateInvestigateTable(investigateTable);
     }
 
     /**
      * 批量删除考察主
-     * 
+     *
      * @param ids 需要删除的考察主主键
      * @return 结果
      */
     @Override
-    public int deleteInvestigateTableByIds(Long[] ids)
-    {
+    public int deleteInvestigateTableByIds(Long[] ids) {
         return investigateTableMapper.deleteInvestigateTableByIds(ids);
     }
 
     /**
      * 删除考察主信息
-     * 
+     *
      * @param id 考察主主键
      * @return 结果
      */
     @Override
-    public int deleteInvestigateTableById(Long id)
-    {
+    public int deleteInvestigateTableById(Long id) {
         return investigateTableMapper.deleteInvestigateTableById(id);
     }
 }

+ 42 - 11
ruoyi-system/src/main/resources/mapper/system/InvestigateDispositionTableMapper.xml

@@ -7,16 +7,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="InvestigateDispositionTable" id="InvestigateDispositionTableResult">
         <result property="investigateTableId"    column="investigate_table_id"    />
         <result property="investigateDispositionId"    column="investigate_disposition_id"    />
+        <result property="url"    column="url"    />
+        <result property="title"    column="title"    />
+        <result property="content"    column="content"    />
+        <result property="investigateName"    column="investigate_name"    />
+        <result property="endTime"    column="end_time"    />
+
     </resultMap>
 
     <sql id="selectInvestigateDispositionTableVo">
-        select investigate_table_id, investigate_disposition_id from investigate_disposition_table
+        select investigate_table_id, investigate_disposition_id,url,content from investigate_disposition_table
     </sql>
 
     <select id="selectInvestigateDispositionTableList" parameterType="InvestigateDispositionTable" resultMap="InvestigateDispositionTableResult">
-        <include refid="selectInvestigateDispositionTableVo"/>
-        <where>  
+        SELECT
+        t.investigate_table_id,
+        t.investigate_disposition_id,
+        t.url,
+        t.title,
+        t.content,
+        it.investigate_name,
+        it.end_time,
+        it.create_time
+        FROM
+        investigate_disposition_table t
+        left join investigate_table it on it.investigate_table_id = t.investigate_table_id
+        <where>
+            <if test="investigateTableId != null  "> and t.investigate_table_id = #{investigateTableId}</if>
+            <if test="investigateDispositionId != null  "> and t.investigate_disposition_id = #{investigateDispositionId}</if>
         </where>
+
+
     </select>
     
     <select id="selectInvestigateDispositionTableByInvestigateTableId" parameterType="Long" resultMap="InvestigateDispositionTableResult">
@@ -29,10 +50,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="investigateTableId != null">investigate_table_id,</if>
             <if test="investigateDispositionId != null">investigate_disposition_id,</if>
+            <if test="url != null">url,</if>
+            <if test="title != null">title,</if>
+            <if test="content != null">content,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="investigateTableId != null">#{investigateTableId},</if>
             <if test="investigateDispositionId != null">#{investigateDispositionId},</if>
+            <if test="url != null">#{url},</if>
+            <if test="title != null">#{title},</if>
+            <if test="content != null">#{content},</if>
          </trim>
     </insert>
 
@@ -40,25 +67,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update investigate_disposition_table
         <trim prefix="SET" suffixOverrides=",">
             <if test="investigateDispositionId != null">investigate_disposition_id = #{investigateDispositionId},</if>
+            <if test="investigate_table_id != null">investigate_table_id = #{investigateTableId},</if>
+            <if test="url != null">url = #{url},</if>
+            <if test="title != null">title = #{title},</if>
+            <if test="content != null">content = #{content},</if>
         </trim>
-        where investigate_table_id = #{investigateTableId}
+        where investigate_table_id = #{investigateTableId} and investigate_disposition_id = #{investigateDispositionId}
     </update>
 
     <delete id="deleteInvestigateDispositionTableByInvestigateTableId" parameterType="Long">
         delete from investigate_disposition_table where investigate_table_id = #{investigateTableId}
     </delete>
 
-    <delete id="deleteInvestigateDispositionTableByInvestigateTableIds" parameterType="String">
-        delete from investigate_disposition_table where investigate_table_id in 
-        <foreach item="investigateTableId" collection="array" open="(" separator="," close=")">
-            #{investigateTableId}
-        </foreach>
+    <delete id="deleteInvestigateDispositionTableByInvestigateTableIds" parameterType="InvestigateDispositionTable">
+        delete from investigate_disposition_table where investigate_table_id =
+
+            #{investigateTableId} and investigate_disposition_id = #{investigateDispositionId}
+
     </delete>
 
     <insert id="batchDispositionTable">
-        insert into investigate_disposition_table(investigate_table_id, investigate_disposition_id) values
+        insert into investigate_disposition_table(investigate_table_id, investigate_disposition_id,url,content,title) values
         <foreach item="item" index="index" collection="list" separator=",">
-            (#{investigateTableId},#{investigateDispositionId})
+            (#{item.investigateTableId},#{item.investigateDispositionId},#{item.url},#{content},#{title})
         </foreach>
     </insert>
 </mapper>

+ 46 - 6
ruoyi-system/src/main/resources/mapper/system/InvestigateTableMapper.xml

@@ -15,19 +15,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
+        <collection  property="investigateUserList"   javaType="java.util.List"  resultMap="InvestigateUserResult" />
     </resultMap>
 
+    <resultMap type="InvestigateDispositionTable" id="InvestigateDispositionTableResult">
+        <result property="investigateTableId"    column="investigate_table_id"    />
+        <result property="investigateDispositionId"    column="investigate_disposition_id"    />
+        <result property="url"    column="url"    />
+        <result property="title"    column="title"    />
+    </resultMap>
+
+    <resultMap type="InvestigateUser" id="InvestigateUserResult">
+        <result property="id"    column="id"    />
+        <result property="investigateId"    column="investigate_id"    />
+        <result property="userName"    column="user_name"    />
+        <result property="phonenumber"    column="phonenumber"    />
+        <result property="idCard"    column="id_card"    />
+        <result property="duty"    column="duty"    />
+        <result property="loginDate"    column="login_date"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
     <sql id="selectInvestigateTableVo">
         select investigate_table_id, investigate_name, content, end_time, cipher, create_by, create_time, update_by, update_time, remark from investigate_table
     </sql>
 
     <select id="selectInvestigateTableList" parameterType="InvestigateTable" resultMap="InvestigateTableResult">
-        <include refid="selectInvestigateTableVo"/>
+        SELECT
+        t.investigate_table_id,
+        t.investigate_name,
+        t.content,
+        t.end_time,
+        t.CIPHER,
+        t.create_by,
+        t.create_time,
+        t.update_by,
+        t.update_time,
+        u.id,
+        u.investigate_id,
+        u.user_name,
+        u.phonenumber,
+        u.id_card,
+        u.duty
+        FROM
+        investigate_table t
+        left join investigate_user u on t.investigate_table_id = u.investigate_id
         <where>  
-            <if test="investigateName != null  and investigateName != ''"> and investigate_name like concat('%', #{investigateName}, '%')</if>
-            <if test="content != null  and content != ''"> and content = #{content}</if>
-            <if test="endTime != null "> and end_time = #{endTime}</if>
-            <if test="cipher != null  and cipher != ''"> and cipher = #{cipher}</if>
+            <if test="investigateName != null  and investigateName != ''"> and t.investigate_name like concat('%', #{investigateName}, '%')</if>
+            <if test="content != null  and content != ''"> and t.content = #{content}</if>
+            <if test="endTime != null "> and t.end_time = #{endTime}</if>
+            <if test="cipher != null  and cipher != ''"> and t.cipher = #{cipher}</if>
         </where>
     </select>
     
@@ -36,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where investigate_table_id = #{investigateTableId}
     </select>
         
-    <insert id="insertInvestigateTable" parameterType="InvestigateTable" useGeneratedKeys="true" keyProperty="id">
+    <insert id="insertInvestigateTable" parameterType="InvestigateTable" useGeneratedKeys="true" keyProperty="investigateTableId">
         insert into investigate_table
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="investigateName != null">investigate_name,</if>

+ 10 - 0
ruoyi-system/src/main/resources/mapper/system/InvestigateUserMapper.xml

@@ -98,4 +98,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+    <delete id="deleteInvestigateUserByInvestigateId">
+        delete from investigate_user where investigate_id = #{investigateId}
+    </delete>
+
+    <insert id="batchDispositionUser">
+        insert into investigate_user (  `investigate_id`, `user_name`, `phonenumber`, `id_card`, `duty`,  `create_time`) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            (#{item.investigateId},#{item.userName},#{item.phonenumber},#{item.idCard},#{item.duty},sysdate())
+        </foreach>
+    </insert>
 </mapper>