Эх сурвалжийг харах

修改询价函其他功能,未完成

Anthony 1 долоо хоног өмнө
parent
commit
4449fe6c17
19 өөрчлөгдсөн 406 нэмэгдсэн , 404 устгасан
  1. 1 0
      supervision-admin/src/main/java/com/supervision/RuoYiApplication.java
  2. 8 1
      supervision-admin/src/main/java/com/supervision/web/controller/bdglSecret/BdglSecretController.java
  3. 1 1
      supervision-admin/src/main/java/com/supervision/web/controller/grassrootsregistration/BdglWeekworkController.java
  4. 24 11
      supervision-admin/src/main/java/com/supervision/web/controller/grassrootsregistration/PersonnelRosterController.java
  5. 58 0
      supervision-admin/src/main/java/com/supervision/web/noticeManage/controller/FileController.java
  6. 86 0
      supervision-admin/src/main/java/com/supervision/web/noticeManage/controller/NoticeController.java
  7. 14 0
      supervision-admin/src/main/java/com/supervision/web/noticeManage/entity/Notice.java
  8. 27 0
      supervision-admin/src/main/java/com/supervision/web/noticeManage/mapper/NoticeMapper.java
  9. 50 0
      supervision-admin/src/main/java/com/supervision/web/noticeManage/mapper/xml/NoticeMapper.xml
  10. 19 0
      supervision-admin/src/main/java/com/supervision/web/noticeManage/service/NoticeService.java
  11. 46 0
      supervision-admin/src/main/java/com/supervision/web/noticeManage/service/impl/NoticeServiceImpl.java
  12. 6 1
      supervision-system/pom.xml
  13. 7 173
      supervision-system/src/main/java/com/supervision/bdglSecret/domain/BdglSecret.java
  14. 11 8
      supervision-system/src/main/java/com/supervision/bdglSecret/mapper/BdglSecretMapper.java
  15. 9 9
      supervision-system/src/main/java/com/supervision/bdglSecret/service/IBdglSecretService.java
  16. 14 8
      supervision-system/src/main/java/com/supervision/bdglSecret/service/impl/BdglSecretServiceImpl.java
  17. 9 183
      supervision-system/src/main/java/com/supervision/grassrootsregistration/domain/BdglWeekwork.java
  18. 13 6
      supervision-system/src/main/resources/mapper/bdglSecret/BdglSecretMapper.xml
  19. 3 3
      supervision-system/src/main/resources/mapper/grassrootsregistration/BdglWeekworkMapper.xml

+ 1 - 0
supervision-admin/src/main/java/com/supervision/RuoYiApplication.java

@@ -13,6 +13,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
 @MapperScan("com.supervision.web.peopleGateManage.mapper")
 @MapperScan("com.supervision.web.carGateManage.Mapper")
+@MapperScan("com.supervision.web.noticeManage.mapper")
 public class RuoYiApplication
 {
     public static void main(String[] args)

+ 8 - 1
supervision-admin/src/main/java/com/supervision/web/controller/bdglSecret/BdglSecretController.java

@@ -17,7 +17,7 @@ import com.supervision.common.core.page.TableDataInfo;
 
 /**
  * 保密设备外借记录Controller
- * 
+ *
  * @author supervision
  * @date 2022-03-25
  */
@@ -155,4 +155,11 @@ public class BdglSecretController extends BaseController
     {
         return toAjax(bdglSecretService.deleteBdglSecretByIds(ids));
     }
+
+    @PostMapping("/updateStatus")
+    public AjaxResult updateStatus(@RequestBody BdglSecret bdglSecret) {
+        return bdglSecretService.updateStatus(bdglSecret.getId(), bdglSecret.getStatus()) > 0
+                ? AjaxResult.success()
+                : AjaxResult.error();
+    }
 }

+ 1 - 1
supervision-admin/src/main/java/com/supervision/web/controller/grassrootsregistration/BdglWeekworkController.java

@@ -226,4 +226,4 @@ public class BdglWeekworkController extends BaseController
         String format = eeee.format(date);
         return AjaxResult.success(format);
     }
-}
+}

+ 24 - 11
supervision-admin/src/main/java/com/supervision/web/controller/grassrootsregistration/PersonnelRosterController.java

@@ -17,14 +17,13 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**人员名册*/
 @RestController
@@ -92,14 +91,28 @@ public class PersonnelRosterController extends BaseController {
 
     @PreAuthorize("@ss.hasPermi('grassrootsregistration:personnelRoster:list')")
     @GetMapping("/getPersonnelRosterList")
-    public TableDataInfo getPersonnelRosterList(String year)
-    {
-        if (StringUtils.isNotEmpty(year)){
-            startPage();
-            List<SysDeptDto> list = peopleService.getPeopleList(year);
-            return getDataTable(list);
+//    public TableDataInfo getPersonnelRosterList(String year)
+//    {
+//        if (StringUtils.isNotEmpty(year)){
+//            startPage();
+//            List<SysDeptDto> list = peopleService.getPeopleList(year);
+//            return getDataTable(list);
+//        }
+//        List<List<SysDeptDto>> list = deptService.getMeetpeopleList();
+//        return getDataTable(list);
+//    }
+    public TableDataInfo getPersonnelRosterList(@RequestParam(required = false) String year) {
+        startPage(); // ✅ 建议统一放在上面,分页总是生效
+
+        List<SysDeptDto> list;
+        if (StringUtils.isNotEmpty(year)) {
+            list = peopleService.getPeopleList(year);
+        } else {
+            // 如果 deptService.getMeetpeopleList() 返回的是 List<List<SysDeptDto>>
+            // 就改成扁平化
+            List<List<SysDeptDto>> temp = deptService.getMeetpeopleList();
+            list = temp.stream().flatMap(Collection::stream).collect(Collectors.toList());
         }
-        List<List<SysDeptDto>> list = deptService.getMeetpeopleList();
         return getDataTable(list);
     }
 

+ 58 - 0
supervision-admin/src/main/java/com/supervision/web/noticeManage/controller/FileController.java

@@ -0,0 +1,58 @@
+package com.supervision.web.noticeManage.controller;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.ResponseEntity;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.*;
+import java.nio.file.*;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+
+@RestController
+@RequestMapping("/notice")
+public class FileController {
+
+    @Value("${file.upload-dir}")
+    private String uploadDir;
+
+    @Value("${file.url-prefix}")
+    private String urlPrefix;
+
+    @PostMapping("/upload")
+    public ResponseEntity<?> upload(@RequestParam("file") MultipartFile file) {
+        if (file == null || file.isEmpty()) {
+            return ResponseEntity.badRequest().body(Collections.singletonMap("message", "文件为空"));
+        }
+        try {
+            // 按日期分目录: yyyy/MM/dd
+            String sub = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy/MM/dd"));
+            Path dir = Paths.get(uploadDir, sub);
+            if (!Files.exists(dir)) Files.createDirectories(dir);
+
+            String original = StringUtils.cleanPath(Objects.requireNonNull(file.getOriginalFilename()));
+            String ext = "";
+            int idx = original.lastIndexOf('.');
+            if (idx >= 0) ext = original.substring(idx);
+
+            String filename = UUID.randomUUID().toString().replace("-", "") + ext;
+            Path target = dir.resolve(filename);
+            try (InputStream in = file.getInputStream()) {
+                Files.copy(in, target, StandardCopyOption.REPLACE_EXISTING);
+            }
+
+            // 返回相对 URL:/files/yyyy/MM/dd/filename.ext
+            String fileUrl = urlPrefix + "/" + sub + "/" + filename;
+            Map<String, Object> body = new HashMap<>();
+            body.put("url", fileUrl);
+            body.put("contentType", file.getContentType());
+            return ResponseEntity.ok(body);
+        } catch (IOException e) {
+            e.printStackTrace();
+            return ResponseEntity.status(500).body(Collections.singletonMap("message", "上传失败"));
+        }
+    }
+}

+ 86 - 0
supervision-admin/src/main/java/com/supervision/web/noticeManage/controller/NoticeController.java

@@ -0,0 +1,86 @@
+package com.supervision.web.noticeManage.controller;
+
+import com.supervision.web.noticeManage.entity.Notice;
+import com.supervision.web.noticeManage.service.NoticeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+@RestController
+@RequestMapping("/notice")
+
+public class NoticeController {
+
+    @Autowired
+    private NoticeService noticeService;
+
+    /**
+     * 新增
+     * 前端传 JSON 示例:
+     * {
+     *   "title": "公告标题",
+     *   "description": "公告内容",
+     *   "attachment": "https://example.com/file.pdf"  // 前端传的 URL
+     * }
+     */
+    @PostMapping("/add")
+    public ResponseEntity<?> addNotice(@RequestBody Notice notice) {
+        notice.setCreateTime(LocalDateTime.now());
+        notice.setUpdateTime(LocalDateTime.now());
+        boolean success = noticeService.addNotice(notice);
+        if (success) {
+            return ResponseEntity.ok().body("新增成功");
+        } else {
+            return ResponseEntity.status(500).body("新增失败");
+        }
+    }
+
+    /**
+     * 获取所有
+     */
+    @GetMapping("/list")
+    public ResponseEntity<List<Notice>> listNotices() {
+        List<Notice> list = noticeService.getAllNotices();
+        return ResponseEntity.ok(list);
+    }
+
+    /**
+     * 搜索:按标题模糊或按时间范围
+     * 示例:
+     * GET /notice/select?title=公告&start=2024-01-01T00:00:00&end=2024-12-31T23:59:59
+     *
+     * 参数说明:
+     * - title 可选(模糊匹配)
+     * - start 可选(ISO 本地时间格式)
+     * - end 可选
+     */
+    @GetMapping("/select")
+    public ResponseEntity<List<Notice>> selectNotices(
+            @RequestParam(value = "title", required = false) String title,
+            @RequestParam(value = "start", required = false)
+            @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start,
+            @RequestParam(value = "end", required = false)
+            @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime end) {
+
+        List<Notice> results = noticeService.searchNotices(title, start, end);
+        return ResponseEntity.ok(results);
+    }
+
+    /**
+     * 删除
+     * DELETE /notice/delete/{id}
+     */
+    @DeleteMapping("/delete/{id}")
+    public ResponseEntity<?> deleteNotice(@PathVariable("id") Integer id) {
+        boolean success = noticeService.deleteNotice(id);
+        if (success) {
+            return ResponseEntity.ok("删除成功");
+        } else {
+            return ResponseEntity.status(404).body("未找到或删除失败");
+        }
+    }
+}

+ 14 - 0
supervision-admin/src/main/java/com/supervision/web/noticeManage/entity/Notice.java

@@ -0,0 +1,14 @@
+package com.supervision.web.noticeManage.entity;
+
+import lombok.Data;
+import java.time.LocalDateTime;
+
+@Data
+public class Notice {
+    private Integer id;
+    private String title;
+    private String description;
+    private String attachment; // 存放前端传过来的文件URL
+    private LocalDateTime createTime;
+    private LocalDateTime updateTime;
+}

+ 27 - 0
supervision-admin/src/main/java/com/supervision/web/noticeManage/mapper/NoticeMapper.java

@@ -0,0 +1,27 @@
+package com.supervision.web.noticeManage.mapper;
+
+
+import com.supervision.web.noticeManage.entity.Notice;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Mapper
+
+public interface NoticeMapper {
+    int insertNotice(com.supervision.web.noticeManage.entity.Notice notice);
+
+    List<Notice> selectAll();
+
+    /**
+     * 模糊按标题或按时间范围查询(全部参数可选)
+     * 如果 title 为空则忽略标题条件;start/end 为空则忽略时间条件
+     */
+    List<Notice> selectByTitleAndTimeRange(@Param("title") String title,
+                                           @Param("start") LocalDateTime start,
+                                           @Param("end") LocalDateTime end);
+
+    int deleteById(@Param("id") Integer id);
+}

+ 50 - 0
supervision-admin/src/main/java/com/supervision/web/noticeManage/mapper/xml/NoticeMapper.xml

@@ -0,0 +1,50 @@
+<?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.supervision.web.noticeManage.mapper.NoticeMapper">
+
+<resultMap id="NoticeResultMap" type="com.supervision.web.noticeManage.entity.Notice">
+    <id property="id" column="id"/>
+    <result property="title" column="title"/>
+    <result property="description" column="description"/>
+    <result property="attachment" column="attachment"/>
+    <result property="createTime" column="create_time"/>
+    <result property="updateTime" column="update_time"/>
+    <result property="fileType" column="file_type"/>
+</resultMap>
+
+<insert id="insertNotice" parameterType="com.supervision.web.noticeManage.entity.Notice" useGeneratedKeys="true" keyProperty="id">
+    INSERT INTO new_notice (title, description, attachment, create_time, update_time, file_type)
+    VALUES (#{title}, #{description}, #{attachment}, #{createTime}, #{updateTime}, #{fileType})
+</insert>
+
+<select id="selectAll" resultMap="NoticeResultMap">
+    SELECT id, title, description, attachment, create_time, update_time,file_type
+    FROM new_notice
+    ORDER BY create_time DESC
+</select>
+
+<select id="selectByTitleAndTimeRange" resultMap="NoticeResultMap">
+    SELECT id, title, description, attachment, create_time, update_time,file_type
+    FROM new_notice
+    WHERE 1=1
+    <if test="title != null and title.trim() != ''">
+        AND title LIKE CONCAT('%', #{title}, '%')
+    </if>
+    <if test="start != null">
+        AND create_time &gt;= #{start}
+    </if>
+    <if test="end != null">
+        AND create_time &lt;= #{end}
+    </if>
+    ORDER BY create_time DESC
+</select>
+
+<delete id="deleteById" parameterType="int">
+    DELETE FROM new_notice WHERE id = #{id}
+</delete>
+
+</mapper>

+ 19 - 0
supervision-admin/src/main/java/com/supervision/web/noticeManage/service/NoticeService.java

@@ -0,0 +1,19 @@
+package com.supervision.web.noticeManage.service;
+
+
+
+import com.supervision.web.noticeManage.entity.Notice;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+public interface NoticeService {
+    boolean addNotice(Notice notice);
+
+    List<Notice> getAllNotices();
+
+    List<Notice> searchNotices(String title, LocalDateTime start, LocalDateTime end);
+
+    boolean deleteNotice(Integer id);
+
+}

+ 46 - 0
supervision-admin/src/main/java/com/supervision/web/noticeManage/service/impl/NoticeServiceImpl.java

@@ -0,0 +1,46 @@
+package com.supervision.web.noticeManage.service.impl;
+
+import com.supervision.web.noticeManage.entity.Notice;
+import com.supervision.web.noticeManage.mapper.NoticeMapper;
+import com.supervision.web.noticeManage.service.NoticeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+import java.util.List;
+@Service
+
+public class NoticeServiceImpl implements NoticeService {
+
+    @Autowired
+    private NoticeMapper noticeMapper;
+
+    @Override
+    public boolean addNotice(Notice notice) {
+        // 补全时间(前端不传也可以由数据库默认)
+        LocalDateTime now = LocalDateTime.now();
+        if (notice.getCreateTime() == null) {
+            notice.setCreateTime(now);
+        }
+        notice.setUpdateTime(now);
+
+        int rows = noticeMapper.insertNotice(notice);
+        return rows > 0;
+    }
+
+    @Override
+    public List<Notice> getAllNotices() {
+        return noticeMapper.selectAll();
+    }
+
+    @Override
+    public List<Notice> searchNotices(String title, LocalDateTime start, LocalDateTime end) {
+        return noticeMapper.selectByTitleAndTimeRange(title, start, end);
+    }
+
+    @Override
+    public boolean deleteNotice(Integer id) {
+        int rows = noticeMapper.deleteById(id);
+        return rows > 0;
+    }
+}

+ 6 - 1
supervision-system/pom.xml

@@ -30,5 +30,10 @@
             <artifactId>hutool-all</artifactId>
             <version>5.8.5</version>
         </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
-</project>
+</project>

+ 7 - 173
supervision-system/src/main/java/com/supervision/bdglSecret/domain/BdglSecret.java

@@ -2,6 +2,7 @@ package com.supervision.bdglSecret.domain;
 
 import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.supervision.common.annotation.Excel;
@@ -9,10 +10,11 @@ import com.supervision.common.core.domain.BaseEntity;
 
 /**
  * 保密设备外借记录对象 bdgl_secret
- * 
+ *
  * @author supervision
  * @date 2022-03-25
  */
+@Data
 public class BdglSecret extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -20,6 +22,8 @@ public class BdglSecret extends BaseEntity
     /** $column.columnComment */
     private Integer id;
 
+    private String status;
+
     /** 分类 */
     @Excel(name = "分类")
     private Integer secrecyType;
@@ -91,180 +95,8 @@ public class BdglSecret extends BaseEntity
     @Excel(name = "部门名称")
     private String deptName;
 
-
     private String remarks;
 
-    public String getRemarks() {
-        return remarks;
-    }
-
-    public void setRemarks(String remarks) {
-        this.remarks = remarks;
-    }
-
-    public void setId(Integer id)
-    {
-        this.id = id;
-    }
-
-    public Integer getId() 
-    {
-        return id;
-    }
-    public void setSecrecyType(Integer secrecyType) 
-    {
-        this.secrecyType = secrecyType;
-    }
-
-    public Integer getSecrecyType() 
-    {
-        return secrecyType;
-    }
-    public void setNumber(String number) 
-    {
-        this.number = number;
-    }
-
-    public String getNumber() 
-    {
-        return number;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
-
-    public String getName() 
-    {
-        return name;
-    }
-    public void setKind(String kind) 
-    {
-        this.kind = kind;
-    }
-
-    public String getKind() 
-    {
-        return kind;
-    }
-    public void setVersion(String version) 
-    {
-        this.version = version;
-    }
-
-    public String getVersion() 
-    {
-        return version;
-    }
-    public void setConfidential(String confidential) 
-    {
-        this.confidential = confidential;
-    }
-
-    public String getConfidential() 
-    {
-        return confidential;
-    }
-    public void setPeopleId(Integer peopleId) 
-    {
-        this.peopleId = peopleId;
-    }
-
-    public Integer getPeopleId() 
-    {
-        return peopleId;
-    }
-    public void setPeopleId1(Integer peopleId1) 
-    {
-        this.peopleId1 = peopleId1;
-    }
-
-    public Integer getPeopleId1() 
-    {
-        return peopleId1;
-    }
-    public void setPeopleId2(Integer peopleId2) 
-    {
-        this.peopleId2 = peopleId2;
-    }
-
-    public Integer getPeopleId2() 
-    {
-        return peopleId2;
-    }
-    public void setStartTime(Date startTime) 
-    {
-        this.startTime = startTime;
-    }
-
-    public Date getStartTime() 
-    {
-        return startTime;
-    }
-    public void setEndTime(Date endTime) 
-    {
-        this.endTime = endTime;
-    }
-
-    public Date getEndTime() 
-    {
-        return endTime;
-    }
-    public void setHindOverTime(Date hindOverTime) 
-    {
-        this.hindOverTime = hindOverTime;
-    }
-
-    public Date getHindOverTime() 
-    {
-        return hindOverTime;
-    }
-    public void setUnitId(Integer unitId) 
-    {
-        this.unitId = unitId;
-    }
-
-    public Integer getUnitId() 
-    {
-        return unitId;
-    }
-    public void setPeopleName(String peopleName) 
-    {
-        this.peopleName = peopleName;
-    }
-
-    public String getPeopleName() 
-    {
-        return peopleName;
-    }
-    public void setPeople1Name(String people1Name) 
-    {
-        this.people1Name = people1Name;
-    }
-
-    public String getPeople1Name() 
-    {
-        return people1Name;
-    }
-    public void setPeople2Name(String people2Name) 
-    {
-        this.people2Name = people2Name;
-    }
-
-    public String getPeople2Name() 
-    {
-        return people2Name;
-    }
-    public void setDeptName(String deptName) 
-    {
-        this.deptName = deptName;
-    }
-
-    public String getDeptName() 
-    {
-        return deptName;
-    }
-
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -286,6 +118,8 @@ public class BdglSecret extends BaseEntity
             .append("people1Name", getPeople1Name())
             .append("people2Name", getPeople2Name())
             .append("deptName", getDeptName())
+            .append("status", getStatus())
             .toString();
     }
+
 }

+ 11 - 8
supervision-system/src/main/java/com/supervision/bdglSecret/mapper/BdglSecretMapper.java

@@ -2,18 +2,19 @@ package com.supervision.bdglSecret.mapper;
 
 import java.util.List;
 import com.supervision.bdglSecret.domain.BdglSecret;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 保密设备外借记录Mapper接口
- * 
+ *
  * @author supervision
  * @date 2022-03-25
  */
-public interface BdglSecretMapper 
+public interface BdglSecretMapper
 {
     /**
      * 查询保密设备外借记录
-     * 
+     *
      * @param id 保密设备外借记录主键
      * @return 保密设备外借记录
      */
@@ -21,7 +22,7 @@ public interface BdglSecretMapper
 
     /**
      * 查询保密设备外借记录列表
-     * 
+     *
      * @param bdglSecret 保密设备外借记录
      * @return 保密设备外借记录集合
      */
@@ -29,7 +30,7 @@ public interface BdglSecretMapper
 
     /**
      * 新增保密设备外借记录
-     * 
+     *
      * @param bdglSecret 保密设备外借记录
      * @return 结果
      */
@@ -37,15 +38,17 @@ public interface BdglSecretMapper
 
     /**
      * 修改保密设备外借记录
-     * 
+     *
      * @param bdglSecret 保密设备外借记录
      * @return 结果
      */
     public int updateBdglSecret(BdglSecret bdglSecret);
 
+    public int updateStatus(@Param("id") Integer id, @Param("status") String status);
+
     /**
      * 删除保密设备外借记录
-     * 
+     *
      * @param id 保密设备外借记录主键
      * @return 结果
      */
@@ -53,7 +56,7 @@ public interface BdglSecretMapper
 
     /**
      * 批量删除保密设备外借记录
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */

+ 9 - 9
supervision-system/src/main/java/com/supervision/bdglSecret/service/IBdglSecretService.java

@@ -5,15 +5,15 @@ import com.supervision.bdglSecret.domain.BdglSecret;
 
 /**
  * 保密设备外借记录Service接口
- * 
+ *
  * @author supervision
  * @date 2022-03-25
  */
-public interface IBdglSecretService 
+public interface IBdglSecretService
 {
     /**
      * 查询保密设备外借记录
-     * 
+     *
      * @param id 保密设备外借记录主键
      * @return 保密设备外借记录
      */
@@ -21,7 +21,7 @@ public interface IBdglSecretService
 
     /**
      * 查询保密设备外借记录列表
-     * 
+     *
      * @param bdglSecret 保密设备外借记录
      * @return 保密设备外借记录集合
      */
@@ -29,7 +29,7 @@ public interface IBdglSecretService
 
     /**
      * 新增保密设备外借记录
-     * 
+     *
      * @param bdglSecret 保密设备外借记录
      * @return 结果
      */
@@ -37,15 +37,15 @@ public interface IBdglSecretService
 
     /**
      * 修改保密设备外借记录
-     * 
+     *
      * @param bdglSecret 保密设备外借记录
      * @return 结果
      */
     public int updateBdglSecret(BdglSecret bdglSecret);
-
+    public int updateStatus(Integer id, String status);
     /**
      * 批量删除保密设备外借记录
-     * 
+     *
      * @param ids 需要删除的保密设备外借记录主键集合
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface IBdglSecretService
 
     /**
      * 删除保密设备外借记录信息
-     * 
+     *
      * @param id 保密设备外借记录主键
      * @return 结果
      */

+ 14 - 8
supervision-system/src/main/java/com/supervision/bdglSecret/service/impl/BdglSecretServiceImpl.java

@@ -9,19 +9,19 @@ import com.supervision.bdglSecret.service.IBdglSecretService;
 
 /**
  * 保密设备外借记录Service业务层处理
- * 
+ *
  * @author supervision
  * @date 2022-03-25
  */
 @Service
-public class BdglSecretServiceImpl implements IBdglSecretService 
+public class BdglSecretServiceImpl implements IBdglSecretService
 {
     @Autowired
     private BdglSecretMapper bdglSecretMapper;
 
     /**
      * 查询保密设备外借记录
-     * 
+     *
      * @param id 保密设备外借记录主键
      * @return 保密设备外借记录
      */
@@ -33,7 +33,7 @@ public class BdglSecretServiceImpl implements IBdglSecretService
 
     /**
      * 查询保密设备外借记录列表
-     * 
+     *
      * @param bdglSecret 保密设备外借记录
      * @return 保密设备外借记录
      */
@@ -45,7 +45,7 @@ public class BdglSecretServiceImpl implements IBdglSecretService
 
     /**
      * 新增保密设备外借记录
-     * 
+     *
      * @param bdglSecret 保密设备外借记录
      * @return 结果
      */
@@ -57,7 +57,7 @@ public class BdglSecretServiceImpl implements IBdglSecretService
 
     /**
      * 修改保密设备外借记录
-     * 
+     *
      * @param bdglSecret 保密设备外借记录
      * @return 结果
      */
@@ -67,9 +67,15 @@ public class BdglSecretServiceImpl implements IBdglSecretService
         return bdglSecretMapper.updateBdglSecret(bdglSecret);
     }
 
+    @Override
+    public int updateStatus(Integer id, String status)
+    {
+        return bdglSecretMapper.updateStatus(id, status);
+    }
+
     /**
      * 批量删除保密设备外借记录
-     * 
+     *
      * @param ids 需要删除的保密设备外借记录主键
      * @return 结果
      */
@@ -81,7 +87,7 @@ public class BdglSecretServiceImpl implements IBdglSecretService
 
     /**
      * 删除保密设备外借记录信息
-     * 
+     *
      * @param id 保密设备外借记录主键
      * @return 结果
      */

+ 9 - 183
supervision-system/src/main/java/com/supervision/grassrootsregistration/domain/BdglWeekwork.java

@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import com.supervision.common.annotation.Excel;
 import com.supervision.common.core.domain.BaseEntity;
 import com.supervision.grassrootsregistration.domain.BdglWeekworkRegister;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -16,8 +17,13 @@ import java.util.List;
  * @author supervision
  * @date 2022-02-28
  */
+@Data
 public class BdglWeekwork extends BaseEntity
 {
+    private Integer pageNum;
+
+    private Integer pageSize;
+
     private static final long serialVersionUID = 1L;
 
     /** $column.columnComment */
@@ -88,194 +94,14 @@ public class BdglWeekwork extends BaseEntity
     private String organizer;
 
     private String date;
-    private String date1;
-    private String date2;
-
-    public String getDate() {
-        return date;
-    }
-
-    public void setDate(String date) {
-        this.date = date;
-    }
-
-    public String getDate1() {
-        return date1;
-    }
-
-    public void setDate1(String date1) {
-        this.date1 = date1;
-    }
-
-    public String getDate2() {
-        return date2;
-    }
-
-    public void setDate2(String date2) {
-        this.date2 = date2;
-    }
-
-    public String getOrganizer() {
-        return organizer;
-    }
-
-    public void setOrganizer(String organizer) {
-        this.organizer = organizer;
-    }
 
-    public String getPeopleName() {
-        return peopleName;
-    }
-
-    public void setPeopleName(String peopleName) {
-        this.peopleName = peopleName;
-    }
-
-    public String getPeople1Name() {
-        return people1Name;
-    }
-
-    public void setPeople1Name(String people1Name) {
-        this.people1Name = people1Name;
-    }
-
-    public String getPeople2Name() {
-        return people2Name;
-    }
-
-    public void setPeople2Name(String people2Name) {
-        this.people2Name = people2Name;
-    }
-
-    public String getUnitName() {
-        return unitName;
-    }
-
-    public void setUnitName(String unitName) {
-        this.unitName = unitName;
-    }
-
-    public String getAdminName() {
-        return adminName;
-    }
+    private String date1;
 
-    public void setAdminName(String adminName) {
-        this.adminName = adminName;
-    }
+    private String date2;
 
     /** 一周安排工作分信息 */
     private List<BdglWeekworkRegister> bdglWeekworkRegisterList;
 
-    public void setId(Integer id)
-    {
-        this.id = id;
-    }
-
-    public Integer getId()
-    {
-        return id;
-    }
-    public void setName(String name)
-    {
-        this.name = name;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-    public void setStartTime(Date startTime)
-    {
-        this.startTime = startTime;
-    }
-
-    public Date getStartTime()
-    {
-        return startTime;
-    }
-    public void setEndTime(Date endTime)
-    {
-        this.endTime = endTime;
-    }
-
-    public Date getEndTime()
-    {
-        return endTime;
-    }
-    public void setPeopleId(Integer peopleId)
-    {
-        this.peopleId = peopleId;
-    }
-
-    public Integer getPeopleId()
-    {
-        return peopleId;
-    }
-    public void setPhone(String phone)
-    {
-        this.phone = phone;
-    }
-
-    public String getPhone()
-    {
-        return phone;
-    }
-    public void setPeopleId1(Long peopleId1)
-    {
-        this.peopleId1 = peopleId1;
-    }
-
-    public Long getPeopleId1()
-    {
-        return peopleId1;
-    }
-    public void setPeopleId2(Long peopleId2)
-    {
-        this.peopleId2 = peopleId2;
-    }
-
-    public Long getPeopleId2()
-    {
-        return peopleId2;
-    }
-    public void setTime(Date time)
-    {
-        this.time = time;
-    }
-
-    public Date getTime()
-    {
-        return time;
-    }
-    public void setUnitId(Integer unitId)
-    {
-        this.unitId = unitId;
-    }
-
-    public Integer getUnitId()
-    {
-        return unitId;
-    }
-    public void setAdminId(Integer adminId)
-    {
-        this.adminId = adminId;
-    }
-
-    public Integer getAdminId()
-    {
-        return adminId;
-    }
-
-    public List<BdglWeekworkRegister> getBdglWeekworkRegisterList()
-    {
-        return bdglWeekworkRegisterList;
-    }
-
-    public void setBdglWeekworkRegisterList(List<BdglWeekworkRegister> bdglWeekworkRegisterList)
-    {
-        this.bdglWeekworkRegisterList = bdglWeekworkRegisterList;
-    }
-
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -294,4 +120,4 @@ public class BdglWeekwork extends BaseEntity
                 .append("bdglWeekworkRegisterList", getBdglWeekworkRegisterList())
                 .toString();
     }
-}
+}

+ 13 - 6
supervision-system/src/main/resources/mapper/bdglSecret/BdglSecretMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.supervision.bdglSecret.mapper.BdglSecretMapper">
-    
+
     <resultMap type="BdglSecret" id="BdglSecretResult">
         <result property="id"    column="id"    />
         <result property="secrecyType"    column="secrecy_type"    />
@@ -24,15 +24,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="people2Name"    column="people2_name"    />
         <result property="deptName"    column="dept_name"    />
         <result property="remarks"    column="remarks"    />
+        <result property="status" column="status" />
     </resultMap>
 
     <sql id="selectBdglSecretVo">
-        select id, secrecy_type, number, name, kind, version, confidential, people_id, people_id1, people_id2, start_time, end_time, hind_over_time, unit_id, people_name, people1_name, people2_name, dept_name,remarks from bdgl_secret
+        select id, secrecy_type, number, name, kind, version, confidential, people_id, people_id1, people_id2, start_time, end_time, hind_over_time, unit_id, people_name, people1_name, people2_name, dept_name,remarks,status  from bdgl_secret
     </sql>
 
     <select id="selectBdglSecretList" parameterType="BdglSecret" resultMap="BdglSecretResult">
         <include refid="selectBdglSecretVo"/>
-        <where>  
+        <where>
             <if test="secrecyType != null "> and secrecy_type = #{secrecyType}</if>
             <if test="number != null  and number != ''"> and number = #{number}</if>
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
@@ -54,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by start_time desc
     </select>
-    
+
     <select id="selectBdglSecretById" parameterType="Integer" resultMap="BdglSecretResult">
         <include refid="selectBdglSecretVo"/>
         where id = #{id}
@@ -138,14 +139,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
+    <update id="updateStatus" parameterType="BdglSecret">
+        UPDATE bdgl_secret
+        SET status = #{status}
+        WHERE id = #{id}
+    </update>
+
     <delete id="deleteBdglSecretById" parameterType="Integer">
         delete from bdgl_secret where id = #{id}
     </delete>
 
     <delete id="deleteBdglSecretByIds" parameterType="String">
-        delete from bdgl_secret where id in 
+        delete from bdgl_secret where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
-</mapper>
+</mapper>

+ 3 - 3
supervision-system/src/main/resources/mapper/grassrootsregistration/BdglWeekworkMapper.xml

@@ -53,9 +53,9 @@
     </sql>
 
     <select id="selectBdglWeekworkList" parameterType="BdglWeekwork" resultMap="BdglWeekworkResult">
-        select id, name, start_time, end_time, people_id, w.phone, people_id1, people_id2, time, remark, unit_id, admin_id, people_name, people1_name, people2_name, unit_name, admin_name
-        from bdgl_weekwork w left join sys_dept t
-        on w.unit_id=t.dept_id
+        select id, name, start_time, end_time, people_id, people_id1, people_id2, time, remark, unit_id, admin_id, people_name, people1_name, people2_name, unit_name, admin_name
+        from bdgl_weekwork
+        w left join sys_dept t on w.unit_id=t.dept_id
         <where>
             <if test="unitId != null ">
                 and (w.unit_id=#{unitId} or find_in_set(#{unitId}, t.ancestors))