Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	yudao-module-museum/yudao-module-museum-biz/pom.xml
BigLawn 1 month ago
parent
commit
67cf369f1b
14 changed files with 429 additions and 120 deletions
  1. 46 0
      yudao-module-museum/yudao-module-museum-api/src/main/java/cn/iocoder/yudao/module/museum/enums/social/LogRecordConstants.java
  2. 0 6
      yudao-module-museum/yudao-module-museum-biz/pom.xml
  3. 175 42
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/MuseumInfoController.java
  4. 0 3
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseumInfoPageReqVO.java
  5. 3 2
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseumInfoRespVO.java
  6. 2 1
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseumInfoSaveVO.java
  7. 1 1
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseuminfoMonthSaveVO.java
  8. 2 2
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseuminfoOriginVO.java
  9. 1 1
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseuminfoTypeVO.java
  10. 13 2
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museummodel/MuseummodelController.java
  11. 64 25
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/dal/mysql/museuminfo/MuseumInfoMapper.java
  12. 3 3
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/dal/mysql/museummodel/MuseummodelMapper.java
  13. 33 11
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museuminfo/MuseumInfoService.java
  14. 86 21
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museuminfo/MuseumInfoServiceImpl.java

+ 46 - 0
yudao-module-museum/yudao-module-museum-api/src/main/java/cn/iocoder/yudao/module/museum/enums/social/LogRecordConstants.java

@@ -0,0 +1,46 @@
+package cn.iocoder.yudao.module.museum.enums.social;
+
+/**
+ * Museum 操作日志枚举
+ * 目的:统一管理,也减少 Service 里各种“复杂”字符串
+ *
+ * @author 芋道源码
+ */
+public interface LogRecordConstants {
+
+    // ======================= SYSTEM_USER 用户 =======================
+
+    String SYSTEM_USER_TYPE = "SYSTEM 用户";
+    String SYSTEM_USER_CREATE_SUB_TYPE = "创建用户";
+    String SYSTEM_USER_CREATE_SUCCESS = "创建了用户【{{#user.nickname}}】";
+    String SYSTEM_USER_UPDATE_SUB_TYPE = "更新用户";
+    String SYSTEM_USER_UPDATE_SUCCESS = "更新了用户【{{#user.nickname}}】: {_DIFF{#updateReqVO}}";
+    String SYSTEM_USER_DELETE_SUB_TYPE = "删除用户";
+    String SYSTEM_USER_DELETE_SUCCESS = "删除了用户【{{#user.nickname}}】";
+    String SYSTEM_USER_UPDATE_PASSWORD_SUB_TYPE = "重置用户密码";
+    String SYSTEM_USER_UPDATE_PASSWORD_SUCCESS = "将用户【{{#user.nickname}}】的密码从【{{#user.password}}】重置为【{{#newPassword}}】";
+
+    // ======================= SYSTEM_ROLE 角色 =======================
+
+    String SYSTEM_ROLE_TYPE = "SYSTEM 角色";
+    String SYSTEM_ROLE_CREATE_SUB_TYPE = "创建角色";
+    String SYSTEM_ROLE_CREATE_SUCCESS = "创建了角色【{{#role.name}}】";
+    String SYSTEM_ROLE_UPDATE_SUB_TYPE = "更新角色";
+    String SYSTEM_ROLE_UPDATE_SUCCESS = "更新了角色【{{#role.name}}】: {_DIFF{#updateReqVO}}";
+    String SYSTEM_ROLE_DELETE_SUB_TYPE = "删除角色";
+    String SYSTEM_ROLE_DELETE_SUCCESS = "删除了角色【{{#role.name}}】";
+
+    // 操作类型常量
+    String MUSEUM_TYPE = "MUSEUM 标本";
+    String CREATE_SUB_TYPE = "入库记录";
+    String CREATE_SUB_TYPE_SUCCESS = "标本【{{#sampleId.chineseName}}】入库成功";
+    String UPDATE_SUB_TYPE = "更新记录";
+    String UPDATE_SUB_TYPE_SUCCESS = "更新了标本【{{#sampleId.chineseName}}】: {_DIFF{#MuseumInfoSaveVO}}";
+    String DELETE_SUB_TYPE = "删除记录";
+    String DELETE_SUB_TYPE_SUCCESS = "删除了标本【{{#sampleId.chineseName}}】";
+    String OUT_MUSEUM_SUB_TYPE = "出库记录";
+    String OUT_MUSEUM_SUB_TYPE_SUCCESS = "标本【{{#sampleId.chineseName}}】出库成功 : {_DIFF{#MuseumInfoSaveVO}}";
+    String BACK_MUSEUM_SUB_TYPE = "回库记录";
+    String BACK_MUSEUM_SUB_TYPE_SUCCESS = "标本【{{#sampleId.chineseName}}】回库成功";
+
+}

+ 0 - 6
yudao-module-museum/yudao-module-museum-biz/pom.xml

@@ -75,12 +75,6 @@
             <artifactId>commons-io</artifactId>
             <artifactId>commons-io</artifactId>
             <version>2.11.0</version>
             <version>2.11.0</version>
         </dependency>
         </dependency>
-        <dependency>
-            <groupId>cn.iocoder.boot</groupId>
-            <artifactId>yudao-module-system-biz</artifactId>
-            <version>2.3.0-jdk8-SNAPSHOT</version>
-            <scope>compile</scope>
-        </dependency>
 
 
     </dependencies>
     </dependencies>
 
 

+ 175 - 42
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/MuseumInfoController.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.museum.controller.admin.museuminfo;
 package cn.iocoder.yudao.module.museum.controller.admin.museuminfo;
 
 
+import cn.hutool.json.JSONArray;
 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
@@ -8,15 +9,18 @@ import cn.iocoder.yudao.module.museum.dal.database.museuminfo.MuseumInfoDO;
 import cn.iocoder.yudao.module.museum.service.museuminfo.MuseumInfoService;
 import cn.iocoder.yudao.module.museum.service.museuminfo.MuseumInfoService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
+
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import javax.validation.Valid;
 import javax.validation.Valid;
+import java.time.LocalDate;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
-
 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
 
 
 @Tag(name = "博物馆-标本库")
 @Tag(name = "博物馆-标本库")
@@ -31,22 +35,32 @@ public class MuseumInfoController {
     //TODO 判断标本编号是否重复
     //TODO 判断标本编号是否重复
     @PostMapping("/create")
     @PostMapping("/create")
     @Operation(summary = "新增标本")
     @Operation(summary = "新增标本")
-    public CommonResult<Integer> createMuseumInfo(@RequestBody MuseumInfoSaveVO saveVO) {
+    public CommonResult<Long> createMuseumInfo(@RequestBody MuseumInfoSaveVO saveVO) {
         String sampleId = saveVO.getSampleId();
         String sampleId = saveVO.getSampleId();
-        MuseumInfoDO result = museumInfoService.getMuseumInfoBySampleId(sampleId);
+        String result = museumInfoService.getMuseumInfoBySampleId(sampleId);
         if (result != null) {
         if (result != null) {
-            return CommonResult.error(1, "标本编号已存在");
+            return CommonResult.error(200, "标本编号已存在");
         } else {
         } else {
             return CommonResult.success(museumInfoService.createMuseumInfo(saveVO));
             return CommonResult.success(museumInfoService.createMuseumInfo(saveVO));
         }
         }
     }
     }
-
+    @PutMapping("/update")
     @Operation(summary = "更新标本")
     @Operation(summary = "更新标本")
-    public CommonResult<Boolean> updateMuseumInfo(@RequestBody MuseumInfoSaveVO saveVO){
-        museumInfoService.updateMuseumInfo(saveVO);
-        return CommonResult.success(true);
-
-
+    public CommonResult<Boolean> updateSampleMuseumInfo(@Valid @RequestBody MuseumInfoSaveVO saveVO){
+        museumInfoService.updateSampleMuseumInfo(saveVO);
+        return success(true);
+    }
+    @PutMapping("/outSample")
+    @Operation(summary = "标本出库")
+    public CommonResult<Boolean> outSampleMuseumInfo(@RequestParam("id")Integer id){
+        museumInfoService.outSampleMuseumInfo(id);
+        return success(true);
+    }
+    @PutMapping("/backSample")
+    @Operation(summary = "标本出库")
+    public CommonResult<Boolean> backSampleMuseumInfo(@RequestParam("id")Integer id){
+        museumInfoService.backSampleMuseumInfo(id);
+        return success(true);
     }
     }
 
 
     //TODO 需要提供原因,调用更新方法
     //TODO 需要提供原因,调用更新方法
@@ -54,11 +68,9 @@ public class MuseumInfoController {
     @Operation(summary = "删除标本")
     @Operation(summary = "删除标本")
     public CommonResult<Boolean> deleteMuseumInfo(@RequestParam("id") Integer id,@RequestParam("reason") String reason){
     public CommonResult<Boolean> deleteMuseumInfo(@RequestParam("id") Integer id,@RequestParam("reason") String reason){
         museumInfoService.deleteMuseumInfo(id,reason);
         museumInfoService.deleteMuseumInfo(id,reason);
-//        result.put("删除原因:",);
         return CommonResult.success(true);
         return CommonResult.success(true);
     }
     }
 
 
-
     @GetMapping("/get")
     @GetMapping("/get")
     @Operation(summary = "id查找")
     @Operation(summary = "id查找")
     public CommonResult<MuseumInfoRespVO> selectMuseumInfo(@RequestParam("id") Integer id){
     public CommonResult<MuseumInfoRespVO> selectMuseumInfo(@RequestParam("id") Integer id){
@@ -67,14 +79,23 @@ public class MuseumInfoController {
       return CommonResult.success(result1);
       return CommonResult.success(result1);
     }
     }
 
 
-    @GetMapping("/selectMuseumInfoList")
-    @Operation(summary = "标本类型查找")
-    public CommonResult<List<MuseumInfoRespVO>> getMuseumInfoList(@RequestParam("sampleType") Integer sampleType){
+    @GetMapping("/getSampleId")
+    @Operation(summary = "标本编号查寻")
+    public CommonResult<MuseumInfoRespVO>selectMuseumInfoBySampleId(@RequestParam("sampleId") String sampleId){
+        MuseumInfoDO result = museumInfoService.selectMuseumInfoBySampleId(sampleId);
+        MuseumInfoRespVO result1 = BeanUtils.toBean(result,MuseumInfoRespVO.class);
+        return CommonResult.success(result1);
+    }
+
+    @GetMapping("/getSampleType")
+    @Operation(summary = "标本类型查寻")
+    public CommonResult<List<MuseumInfoRespVO>> selectMuseumInfoBySampleType(@RequestParam("sampleType") Integer sampleType){
         List<MuseumInfoDO> result = museumInfoService.selectMuseumInfoListBySampleType(sampleType);
         List<MuseumInfoDO> result = museumInfoService.selectMuseumInfoListBySampleType(sampleType);
         List<MuseumInfoRespVO> result1 = BeanUtils.toBean(result,MuseumInfoRespVO.class);
         List<MuseumInfoRespVO> result1 = BeanUtils.toBean(result,MuseumInfoRespVO.class);
         return CommonResult.success(result1);
         return CommonResult.success(result1);
     }
     }
 
 
+
     @GetMapping("/page")
     @GetMapping("/page")
     @Operation(summary = "获取分页")
     @Operation(summary = "获取分页")
     public CommonResult<PageResult<MuseumInfoPageReqVO>> getPage(@Valid MuseumInfoPageReqVO pageReqVO){
     public CommonResult<PageResult<MuseumInfoPageReqVO>> getPage(@Valid MuseumInfoPageReqVO pageReqVO){
@@ -87,50 +108,162 @@ public class MuseumInfoController {
 //    TODO     1.2.3.代表哪种标本类型
 //    TODO     1.2.3.代表哪种标本类型
 //            返回某种标本类型的List数组
 //            返回某种标本类型的List数组
 //            Integer
 //            Integer
-//
+
     @GetMapping("/sampleTypeCount")
     @GetMapping("/sampleTypeCount")
     @Operation(summary = "标本类型计数")
     @Operation(summary = "标本类型计数")
-    public CommonResult<List<MuseuminfoTypeVO>> getMap(@RequestParam("sampleType") Integer sampleType) {
-        List<MuseuminfoTypeVO> result = museumInfoService.MuseumInfoBySampleType(sampleType);
+    public CommonResult<Map<String,Integer>> getMap() {
+        Integer count1 = museumInfoService.MuseumInfoBySampleType(1);
+        Integer count2 = museumInfoService.MuseumInfoBySampleType(2);
+        Integer count3 = museumInfoService.MuseumInfoBySampleType(3);
+        Integer count4 = museumInfoService.MuseumInfoBySampleType(4);
 //          标本类型:矿石-1 岩石-2 矿物-3 陨石-4>
 //          标本类型:矿石-1 岩石-2 矿物-3 陨石-4>
-        return CommonResult.success(result);
+        Map<String, Integer> map = new HashMap<>();
+        map.put("矿石", count1);
+        map.put("岩石", count2);
+        map.put("矿物", count3);
+        map.put("陨石", count4);
+        return CommonResult.success(map);
     }
     }
-
-
-
-
     @GetMapping("/joinSaveCount")
     @GetMapping("/joinSaveCount")
     @Operation(summary = "标本出入库状态计数(每月)(入库)")
     @Operation(summary = "标本出入库状态计数(每月)(入库)")
-    public CommonResult<List<MuseuminfoMonthSaveVO>> getJoinSave(@RequestParam("save") Integer save) {
-        List<MuseuminfoMonthSaveVO> result1 = museumInfoService.MuseumInfoBySaveJoin(save);
+    public CommonResult<List<MuseuminfoMonthSaveVO>> getJoinSave() {
 //        状态:在库-1 出库-0
 //        状态:在库-1 出库-0
 //          构造 12 个月的数据,确保每个月都有数据(即使为 0)
 //          构造 12 个月的数据,确保每个月都有数据(即使为 0)
-//        List<MuseuminfoMonthSaveVO> result = new ArrayList<>();
-//        for (int month = 1 ; month <= 1 ; month++){
-//            String monthStr = String.format("%d-%2d",save, month);
-//            Optional<MuseuminfoMonthSaveVO> found = MonthSave.stream()
-//            filter(f ->f.getMonth().equals(monthStr))
-//                    .findFirst();
-//            MuseuminfoMonthSaveVO vo = new MuseuminfoMonthSaveVO();
-//            vo.setMonth(monthStr);
-//            vo.setCount(found.map(MuseuminfoMonthSaveVO::getSave).orElse( other: 0)).
-//            result.add(vo);
-        return CommonResult.success(result1);
+        List<MuseuminfoMonthSaveVO> result = new ArrayList<>();
+        LocalDate date = LocalDate.now();
+        int currentYear =date.getYear();
+        for (int month = 1 ; month <= 12 ; month++) {
+
+            Integer number =museumInfoService.MuseumInfoBySaveJoin(month,currentYear);
+            MuseuminfoMonthSaveVO  re = new MuseuminfoMonthSaveVO();
+            re.setMonth(month);
+            if (number == null) {
+                re.setCount(0);
+            }else {
+                re.setCount(number);
+            }
+            result.add(re);
+        }
+        return CommonResult.success(result);
     }
     }
 
 
     @GetMapping("/outSaveCount")
     @GetMapping("/outSaveCount")
     @Operation(summary = "标本出入库状态计数(每月)(出库)")
     @Operation(summary = "标本出入库状态计数(每月)(出库)")
-    public CommonResult<List<MuseuminfoMonthSaveVO>> getOutSave(@RequestParam("save") Integer save) {
-        List<MuseuminfoMonthSaveVO> result1 = museumInfoService.MuseumInfoBySaveOut(save);
-        return CommonResult.success(result1);
+    public CommonResult<List<MuseuminfoMonthSaveVO>> getOutSave() {
+        LocalDate date = LocalDate.now();
+        int currentYear =date.getYear();
+        List<MuseuminfoMonthSaveVO> result = new ArrayList<>();
+        for (int month = 1 ; month <= 12 ; month++) {
+            int sample_number =0;
+            List<String> number =museumInfoService.MuseumInfoBySaveOut(month,currentYear);
+            MuseuminfoMonthSaveVO  re = new MuseuminfoMonthSaveVO();
+            re.setMonth(month);
+
+            if (number == null) {
+                re.setCount(0);
+            }else {
+                for (String numberStr : number) {
+
+                    String[] groupElements = numberStr.split(",");
+                    // 累加元素数量(每个元素为一组)
+                    sample_number += groupElements.length;
+                }
+                re.setCount(sample_number);
+            }
+            result.add(re);
+        }
+        return CommonResult.success(result);
+    }
+
+    @GetMapping("/backSaveCount")
+    @Operation(summary = "标本出入库状态计数(每月)(回库)")
+    public CommonResult<List<MuseuminfoMonthSaveVO>> getBackSave() {
+        LocalDate date = LocalDate.now();
+        int currentYear =date.getYear();
+
+        List<MuseuminfoMonthSaveVO> result = new ArrayList<>();
+        for (int month = 1 ; month <= 12 ; month++) {
+            int sample_number = countSampleNumbers(museumInfoService.MuseumInfoBySaveBack(month,currentYear));
+            MuseuminfoMonthSaveVO  re = new MuseuminfoMonthSaveVO();
+            re.setMonth(month);
+            re.setCount(sample_number);
+            result.add(re);
+        }
+        return CommonResult.success(result);
+    }
+
+    @GetMapping("/yearCount")
+    @Operation(summary = "历年标本数量统计")
+    public CommonResult<List<Map<Integer,Object>>> getYearSampleCount() {
+        List<Map<Integer, Object>> result = new ArrayList<>();
+        LocalDate date = LocalDate.now();
+        int currentYear = date.getYear();
+        int year1 = currentYear - 2;
+        for (int year = currentYear; year >= year1; year--) {
+
+            Integer number1 = museumInfoService.MuseumInfoYearJoin(year);
+            int sample_number2 = countSampleNumbers(museumInfoService.MuseumInfoYearOutBack(1, year));
+            int sample_number3 = countSampleNumbers(museumInfoService.MuseumInfoYearOutBack(0, year));
+                    Map<Integer,Object> map = new HashMap<>();
+                    Map<String, Integer> innerMap = new HashMap<>();
+                    innerMap.put("入库", number1);
+                    innerMap.put("回库", sample_number2);
+                    innerMap.put("出库", sample_number3);
+                    map.put(year,innerMap);
+                    result.add(map);
+                }
+        return CommonResult.success(result);
+    }
+
+    /**
+     * 统计样本数量
+     * @param number 包含样本信息的列表
+     * @return 样本数量
+     */
+    private int countSampleNumbers(List<String> number) {
+        if (number == null) {
+            return 0;
+        }
+        int count = 0;
+        for (String numberStr : number) {
+
+            String processedStr = numberStr.replaceAll("\\[|\\]","");
+            // 按逗号分割元素
+            String[] groupElements = processedStr.split(",");
+
+            count += groupElements.length;
+        }
+        return count;
     }
     }
 
 
+
+
     @GetMapping("/originCount")
     @GetMapping("/originCount")
     @Operation(summary = "标本来源计数")
     @Operation(summary = "标本来源计数")
-    public CommonResult<List<MuseuminfoOriginVO>> getOrigin(@RequestParam("origin") Integer origin){
-        List<MuseuminfoOriginVO> result1 =museumInfoService.MuseumInfoByOrigin(origin);
+    public CommonResult<List<Map<Integer,Object>>> getOrigin(){
 //        来源:采购-1 捐赠-2 采集-3 其他-4
 //        来源:采购-1 捐赠-2 采集-3 其他-4
-        return CommonResult.success(result1);
+
+        List<Map<Integer,Object>> result = new ArrayList<>();
+        LocalDate date = LocalDate.now();
+        int currentYear =date.getYear();
+        int year1 =currentYear-2;
+        for (int year =currentYear ; year>=year1  ; year--) {
+
+            Integer number1 = museumInfoService.MuseumInfoByOrigin(year,1);
+            Integer number2 = museumInfoService.MuseumInfoByOrigin(year,2);
+            Integer number3 = museumInfoService.MuseumInfoByOrigin(year,3);
+            Integer number4 = museumInfoService.MuseumInfoByOrigin(year,4);
+
+            Map<Integer,Object> map = new HashMap<>();
+            Map<String, Integer> innerMap = new HashMap<>();
+            innerMap.put("采购", number1);
+            innerMap.put("捐赠", number2);
+            innerMap.put("采集", number3);
+            innerMap.put("其他", number4);
+            map.put(year,innerMap);
+            result.add(map);
+        }
+        return CommonResult.success(result);
     }
     }
 
 
 
 

+ 0 - 3
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseumInfoPageReqVO.java

@@ -1,14 +1,11 @@
 package cn.iocoder.yudao.module.museum.controller.admin.museuminfo.vo;
 package cn.iocoder.yudao.module.museum.controller.admin.museuminfo.vo;
 
 
 import cn.iocoder.yudao.framework.common.pojo.PageParam;
 import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import cn.iocoder.yudao.module.museum.controller.admin.museuminfo.MuseumInfoController;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
 import lombok.ToString;
 
 
-import java.time.LocalDateTime;
-
 @Schema(description = "博物馆-标本信息-分页 pageReq VO")
 @Schema(description = "博物馆-标本信息-分页 pageReq VO")
 @Data
 @Data
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)

+ 3 - 2
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseumInfoRespVO.java

@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.Data;
 
 
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
+import java.util.List;
 
 
 @Schema(description = "博物馆-标本信息 Resp VO")
 @Schema(description = "博物馆-标本信息 Resp VO")
 @Data
 @Data
@@ -13,7 +14,7 @@ public class MuseumInfoRespVO {
 //private Integer Ynumber;
 //private Integer Ynumber;
 
 
     @Schema(description = "标本id")
     @Schema(description = "标本id")
-    private Integer id;
+    private Long id;
 
 
     @Schema(description = "标本编号")
     @Schema(description = "标本编号")
     private String sampleId;
     private String sampleId;
@@ -79,7 +80,7 @@ public class MuseumInfoRespVO {
     private String reason;
     private String reason;
 
 
     @Schema(description = "标本图片")
     @Schema(description = "标本图片")
-    private String picture;
+    private List<String> picture;
 
 
     @Schema(description = "备注")
     @Schema(description = "备注")
     private String sampleTip;
     private String sampleTip;

+ 2 - 1
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseumInfoSaveVO.java

@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.museum.controller.admin.museuminfo.vo;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.Data;
 
 
+import javax.swing.*;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
 
 
 @Schema(description = "博物馆-标本信息 save VO")
 @Schema(description = "博物馆-标本信息 save VO")
@@ -10,7 +11,7 @@ import java.time.LocalDateTime;
 public class MuseumInfoSaveVO {
 public class MuseumInfoSaveVO {
 
 
     @Schema(description = "标本id")
     @Schema(description = "标本id")
-    private Integer id;
+    private Long id;
 
 
     @Schema(description = "标本编号")
     @Schema(description = "标本编号")
     private String sampleId;
     private String sampleId;

+ 1 - 1
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseuminfoMonthSaveVO.java

@@ -10,5 +10,5 @@ import java.time.LocalDateTime;
 @Data
 @Data
 public class MuseuminfoMonthSaveVO {
 public class MuseuminfoMonthSaveVO {
     private Integer month;
     private Integer month;
-    private Long count;
+    private Integer count;
 }
 }

+ 2 - 2
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseuminfoOriginVO.java

@@ -9,8 +9,8 @@ import java.time.LocalDateTime;
 @Schema(description = "博物馆-标本信息 origin VO")
 @Schema(description = "博物馆-标本信息 origin VO")
 @Data
 @Data
 public class MuseuminfoOriginVO {
 public class MuseuminfoOriginVO {
-    private String year;
+    private Integer year;
     private Integer origin;
     private Integer origin;
-    private Long count;
+    private Integer count;
 
 
 }
 }

+ 1 - 1
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseuminfoTypeVO.java

@@ -10,5 +10,5 @@ import java.time.LocalDateTime;
 @Data
 @Data
 public class MuseuminfoTypeVO {
 public class MuseuminfoTypeVO {
     private Integer sampleType;
     private Integer sampleType;
-    private Long count;
+    private Integer count;
 }
 }

+ 13 - 2
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museummodel/MuseummodelController.java

@@ -33,8 +33,19 @@ public class MuseummodelController {
 
 
     @PostMapping("/create")
     @PostMapping("/create")
     @Operation(summary = "新增模型")
     @Operation(summary = "新增模型")
-    public Integer createMuseumModel(@RequestBody MuseummodelSaveVO saveVO) {
-        return museumModelService.createMuseumModel(saveVO);
+    public CommonResult<Boolean> createMuseumModel(@RequestBody MuseummodelSaveVO saveVO) {
+        String modelName =saveVO.getModelName();
+        String specimenNumber =saveVO.getSpecimenNumber();
+        String modelWay =saveVO.getModelWay();
+        if (modelName == null) {
+            return  CommonResult.error(200,"模型名称不能为空");
+        } else if (specimenNumber == null){
+            return  CommonResult.error(200,"标本编号不能为空");
+        }else if (modelWay == null){
+            return  CommonResult.error(200,"模型路径不能为空");
+        }else
+            museumModelService.createMuseumModel(saveVO);
+            return CommonResult.success(true);
     }
     }
 
 
     @PutMapping("/update")
     @PutMapping("/update")

+ 64 - 25
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/dal/mysql/museuminfo/MuseumInfoMapper.java

@@ -21,15 +21,23 @@ public interface MuseumInfoMapper extends BaseMapperX<MuseumInfoDO> {
     /**
     /**
      * 更新标本
      * 更新标本
      */
      */
-    @Update("UPDATE museum_info SET sample_type=#{sampleType}, place=#{place},chinese_name=#{chineseName} WHERE id =#{id}")
+    @Update("UPDATE museum_info SET sample_id=#{sampleId},chinese_name=#{chineseName} WHERE id =#{id}")
     void updateMuseumInfo(MuseumInfoDO museumInfoDO);
     void updateMuseumInfo(MuseumInfoDO museumInfoDO);
-
+    /**
+     * 标本出库
+     */
+    @Update("UPDATE museum_info SET save=0  WHERE id =#{id}")
+    void outSampleMuseumInfo(@Param("id")Integer id);
+    /**
+     * 标本回库
+     */
+    @Update("UPDATE museum_info SET save=1  WHERE id =#{id}")
+    void backSampleMuseumInfo(@Param("id")Integer id);
     /**
     /**
      * 删除标本
      * 删除标本
      */
      */
     @Update("UPDATE museum_info SET deleted=1,reason=#{reason}  WHERE id =#{id}")
     @Update("UPDATE museum_info SET deleted=1,reason=#{reason}  WHERE id =#{id}")
-    void deleteMuseumInfo(Integer id, String reason);
-
+    void deleteMuseumInfo(@Param("id")Integer id,@Param("reason")String reason);
     /**
     /**
      * 查询标本
      * 查询标本
      */
      */
@@ -40,7 +48,8 @@ public interface MuseumInfoMapper extends BaseMapperX<MuseumInfoDO> {
      * 查询标本编号
      * 查询标本编号
      */
      */
     @Select("SELECT * FROM museum_info WHERE sample_id =#{sampleId} AND deleted =0")
     @Select("SELECT * FROM museum_info WHERE sample_id =#{sampleId} AND deleted =0")
-    MuseumInfoDO getMuseumInfoBySampleId(@Param("sampleId") String sampleId);
+    String getMuseumInfoBySampleId(@Param("sampleId") String sampleId);
+    MuseumInfoDO selectMuseumInfoBySampleId(@Param("sampleId") String sampleId);
 
 
     /**
     /**
      * 查询标本类型
      * 查询标本类型
@@ -51,40 +60,70 @@ public interface MuseumInfoMapper extends BaseMapperX<MuseumInfoDO> {
     /**
     /**
      * 标本类型计数1
      * 标本类型计数1
      */
      */
-    @Select("SELECT sample_type ,COUNT(*)AS count FROM museum_info WHERE deleted =0 GROUP BY sample_type")
-    List<MuseuminfoTypeVO> countMuseumInfoBySampleType(@Param("sampleType") Integer sampleType);
-
+    @Select("SELECT COUNT(*) FROM museum_info WHERE deleted =0 AND sample_type =#{sampleType}")
+    Integer countMuseumInfoBySampleType(@Param("sampleType") Integer sampleType);
     /**
     /**
      * 标本入库状态计数
      * 标本入库状态计数
      */
      */
     @Select("SELECT" +
     @Select("SELECT" +
-            " DATE_FORMAT(sample_save_time,'%m')AS month," +
-            " COUNT(*) AS count " +
+            " COUNT(*)"+
             " FROM museum_info " +
             " FROM museum_info " +
-            " WHERE deleted =0 AND save =1" +
-            " GROUP BY DATE_FORMAT(sample_save_time,'%m')" +
-            " ORDER BY month")
-    List<MuseuminfoMonthSaveVO> countMuseumInfoBySaveJoin(@Param("save") Integer save);
-
+            " WHERE deleted =0 AND save =1"+
+            " AND DATE_FORMAT(sample_save_time,'%m') = #{month}"+
+            " AND DATE_FORMAT(sample_save_time,'%Y') = #{currentYear}")
+    Integer countMuseumInfoBySaveJoin(@Param("month") Integer month,@Param("currentYear") Integer currentYear);
     /**
     /**
      * 标本出库状态计数
      * 标本出库状态计数
      */
      */
     @Select("SELECT" +
     @Select("SELECT" +
-            " DATE_FORMAT(sample_save_time,'%m')AS month," +
-            " COUNT(*) AS count " +
+            " number"+
+            " FROM museum_outbound " +
+            " WHERE deleted =0"+
+            " AND state =0"+
+            " AND DATE_FORMAT(outbound_time,'%m') = #{month}"+
+            " AND DATE_FORMAT(outbound_time,'%Y') = #{currentYear}")
+    List<String> countMuseumInfoBySaveOut(@Param("month") Integer month,@Param("currentYear") Integer currentYear);
+    /**
+     * 标本回库状态计数
+     */
+    @Select("SELECT" +
+            " number"+
+            " FROM museum_outbound " +
+            " WHERE deleted =0 "+
+            " AND state =1"+
+            " AND DATE_FORMAT(outbound_time,'%m') = #{month}"+
+            " AND DATE_FORMAT(outbound_time,'%Y') = #{currentYear}")
+    List<String> countMuseumInfoBySaveBack(@Param("month") Integer month,@Param("currentYear") Integer currentYear);
+    /**
+     * 历年标本数量统计
+     */
+    @Select("SELECT" +
+            " COUNT(*)"+
             " FROM museum_info " +
             " FROM museum_info " +
-            " WHERE deleted =0 AND save =1" +
-            " GROUP BY DATE_FORMAT(sample_save_time,'%m')" +
-            " ORDER BY month")
-    List<MuseuminfoMonthSaveVO> countMuseumInfoBySaveOut(@Param("save") Integer save);
+            " WHERE deleted =0 AND save =1"+
+            " AND DATE_FORMAT(sample_save_time,'%Y') = #{currentYear}")
+    Integer countMuseumInfoYearJoin(@Param("currentYear") Integer currentYear);
+
+    @Select("SELECT" +
+            " number"+
+            " FROM museum_outbound " +
+            " WHERE deleted =0 "+
+            " AND state = #{state}"+
+            " AND DATE_FORMAT(outbound_time,'%Y') = #{currentYear}")
+    List<String> countMuseumInfoYearOutBack(@Param("state") Integer state,@Param("currentYear") Integer currentYear);
+
 
 
     /**
     /**
      * 标本来源计数(年)
      * 标本来源计数(年)
      */
      */
-//    @Select("SELECT COUNT(*)  FROM museum_info  WHERE origin =#{origin} AND deleted =0 AND sample_save_time >=2025-02")
-//    Integer countMuseumInfoByOrigin (@Param("origin") Integer origin);
-    @Select("SELECT origin,DATE_FORMAT(sample_save_time,'%Y')AS year ,COUNT(*)AS count  FROM museum_info WHERE deleted =0 AND save =1 GROUP BY origin,DATE_FORMAT(sample_save_time,'%Y')")
-    List<MuseuminfoOriginVO> countMuseumInfoByOrigin(@Param("origin") Integer origin);
+    @Select("SELECT" +
+            " COUNT(*)"+
+            " FROM museum_info " +
+            " WHERE deleted =0 AND save =1"+
+            " AND DATE_FORMAT(sample_save_time,'%Y') = #{year}"+
+            " AND origin = #{origin}")
+    Integer countMuseumInfoByOrigin(@Param("year") Integer year, @Param("origin") Integer origin);
+
 
 
     /**
     /**
      * 分页
      * 分页

+ 3 - 3
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/dal/mysql/museummodel/MuseummodelMapper.java

@@ -17,13 +17,13 @@ import org.apache.ibatis.annotations.Update;
 @Mapper
 @Mapper
 public interface MuseummodelMapper extends BaseMapperX<MuseummodelDO> {
 public interface MuseummodelMapper extends BaseMapperX<MuseummodelDO> {
 
 
-    @Update("UPDATE museum_model SET sample_type=#{sampleType}, place=#{place} WHERE id =#{id}")
+    @Update("UPDATE museum_specimen_model SET model_name=#{modelName} WHERE id =#{id}")
     void updateMuseumModel(MuseummodelDO museumModelDO);
     void updateMuseumModel(MuseummodelDO museumModelDO);
 
 
-    @Update("UPDATE museum_model SET deleted=1  WHERE id =#{id}")
+    @Update("UPDATE museum_specimen_model SET deleted=1  WHERE id =#{id}")
     void deleteMuseumModel(Integer id);
     void deleteMuseumModel(Integer id);
 
 
-    @Select("SELECT * FROM museum_model WHERE id = #{id} AND deleted =0 ")
+    @Select("SELECT * FROM museum_specimen_model WHERE id = #{id} AND deleted =0 ")
     MuseummodelDO selectMuseumModelById(@Param("id") Integer id);
     MuseummodelDO selectMuseumModelById(@Param("id") Integer id);
 
 
     //分页查询
     //分页查询

+ 33 - 11
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museuminfo/MuseumInfoService.java

@@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.museum.dal.database.museuminfo.MuseumInfoDO;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import javax.validation.Valid;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
@@ -15,13 +16,20 @@ public interface MuseumInfoService {
    /**
    /**
     * 创建标本
     * 创建标本
    * */
    * */
-   Integer createMuseumInfo(MuseumInfoSaveVO saveVO);
+   Long createMuseumInfo(MuseumInfoSaveVO saveVO);
 
 
    /**
    /**
     * 更新标本
     * 更新标本
     * */
     * */
-   void updateMuseumInfo(MuseumInfoSaveVO saveVO);
-
+   void updateSampleMuseumInfo(@Valid MuseumInfoSaveVO saveVO);
+   /**
+    * 标本出库
+    */
+   void outSampleMuseumInfo(Integer id);
+   /**
+    * 标本回库
+    */
+   void backSampleMuseumInfo(Integer id);
    /**
    /**
     * 删除标本(原因)
     * 删除标本(原因)
     * */
     * */
@@ -34,7 +42,11 @@ public interface MuseumInfoService {
    /**
    /**
     * 查询标本编号
     * 查询标本编号
     * */
     * */
-   MuseumInfoDO getMuseumInfoBySampleId(String sampleId);
+   String getMuseumInfoBySampleId(String sampleId);
+   /**
+    * 查询标本编号1
+    * */
+   MuseumInfoDO selectMuseumInfoBySampleId(String sampleId);
    /**
    /**
    * 查询标本类型
    * 查询标本类型
    * */
    * */
@@ -49,16 +61,26 @@ public interface MuseumInfoService {
    /**
    /**
     * 标本类型计数
     * 标本类型计数
     * */
     * */
-   List<MuseuminfoTypeVO> MuseumInfoBySampleType(Integer sampleType);
+   Integer MuseumInfoBySampleType(Integer sampleType);
    /**
    /**
-    * 标本入库状态计数
+    * 标本入库状态计数
     * */
     * */
-   List<MuseuminfoMonthSaveVO> MuseumInfoBySaveJoin(Integer save);
-
-   List<MuseuminfoMonthSaveVO> MuseumInfoBySaveOut(Integer save);
-
+    Integer MuseumInfoBySaveJoin(Integer month,Integer currentYear);
+   /**
+    * 标本出库状态计数
+    * */
+   List<String> MuseumInfoBySaveOut(Integer month,Integer currentYear);
+   /**
+    * 标本回库状态计数
+    * */
+   List<String> MuseumInfoBySaveBack(Integer month,Integer currentYear);
+   /**
+    * 历年标本数量统计
+    */
+   Integer MuseumInfoYearJoin(Integer currentYear);
+   List<String> MuseumInfoYearOutBack(Integer state,Integer currentYear);
    /**
    /**
     * 标本来源计数(年)
     * 标本来源计数(年)
     * */
     * */
-   List<MuseuminfoOriginVO> MuseumInfoByOrigin(Integer origin);
+   Integer MuseumInfoByOrigin(Integer year, Integer origin);
 }
 }

+ 86 - 21
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museuminfo/MuseumInfoServiceImpl.java

@@ -1,10 +1,14 @@
 package cn.iocoder.yudao.module.museum.service.museuminfo;
 package cn.iocoder.yudao.module.museum.service.museuminfo;
 
 
+import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
 import cn.iocoder.yudao.module.museum.controller.admin.museuminfo.vo.*;
 import cn.iocoder.yudao.module.museum.controller.admin.museuminfo.vo.*;
 import cn.iocoder.yudao.module.museum.dal.database.museuminfo.MuseumInfoDO;
 import cn.iocoder.yudao.module.museum.dal.database.museuminfo.MuseumInfoDO;
 import cn.iocoder.yudao.module.museum.dal.mysql.museuminfo.MuseumInfoMapper;
 import cn.iocoder.yudao.module.museum.dal.mysql.museuminfo.MuseumInfoMapper;
+import com.mzt.logapi.context.LogRecordContext;
+import com.mzt.logapi.service.impl.DiffParseFunction;
+import com.mzt.logapi.starter.annotation.LogRecord;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
@@ -14,10 +18,13 @@ import java.util.Map;
 import java.util.Set;
 import java.util.Set;
 
 
 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.singleton;
 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.singleton;
+import static cn.iocoder.yudao.module.system.enums.LogRecordConstants.*;
+import static cn.iocoder.yudao.module.museum.enums.social.LogRecordConstants.*;
 
 
 @Service
 @Service
 public  class  MuseumInfoServiceImpl implements MuseumInfoService {
 public  class  MuseumInfoServiceImpl implements MuseumInfoService {
 
 
+
    @Resource
    @Resource
    private MuseumInfoMapper museumInfoMapper;
    private MuseumInfoMapper museumInfoMapper;
 
 
@@ -25,30 +32,61 @@ public  class  MuseumInfoServiceImpl implements MuseumInfoService {
     * 新增标本
     * 新增标本
     */
     */
    @Override
    @Override
-   public Integer createMuseumInfo(MuseumInfoSaveVO saveVO) {
-      return museumInfoMapper.insert(BeanUtils.toBean(saveVO, MuseumInfoDO.class));//insert(内置)
+   @LogRecord(type = MUSEUM_TYPE, subType = CREATE_SUB_TYPE, bizNo = "{{#sampleId.id}}",
+           success =  CREATE_SUB_TYPE_SUCCESS)
+   public Long createMuseumInfo(MuseumInfoSaveVO saveVO) {
+      MuseumInfoDO sampleId = BeanUtils.toBean(saveVO, MuseumInfoDO.class);
+      museumInfoMapper.insert(sampleId);
+      LogRecordContext.putVariable("sampleId", sampleId );
+      return sampleId.getId();
    }
    }
-
    /**
    /**
     * 更新标本
     * 更新标本
     */
     */
+
+   @LogRecord(type = MUSEUM_TYPE, subType = UPDATE_SUB_TYPE, bizNo = "{{#sampleId.id}}",
+           success = UPDATE_SUB_TYPE_SUCCESS)
    @Override
    @Override
-   public void updateMuseumInfo(MuseumInfoSaveVO saveVO) {
-      museumInfoMapper.updateMuseumInfo(BeanUtils.toBean(saveVO, MuseumInfoDO.class));
+   public void updateSampleMuseumInfo(MuseumInfoSaveVO saveVO) {
+      MuseumInfoDO sampleId = BeanUtils.toBean(saveVO,MuseumInfoDO.class);
+      museumInfoMapper.updateMuseumInfo(sampleId);
+//      museumInfoMapper.updateById(sampleId);
+      LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(sampleId, MuseumInfoSaveVO.class));
+      LogRecordContext.putVariable("sampleId", sampleId );
    }
    }
-
    /**
    /**
-    * 删除标本
+    * 标本出库
     */
     */
+   @LogRecord(type = MUSEUM_TYPE, subType = OUT_MUSEUM_SUB_TYPE, bizNo = "{{#sampleId.id}}",
+           success = OUT_MUSEUM_SUB_TYPE_SUCCESS)
    @Override
    @Override
-   public void deleteMuseumInfo(Integer id,String reason) {
-      museumInfoMapper.deleteMuseumInfo(id,reason);
-//      museumInfoMapper.deleteById(id);
+   public void outSampleMuseumInfo(Integer id){
+      MuseumInfoDO sampleId = museumInfoMapper.selectMuseumInfoById(id);
+      museumInfoMapper.outSampleMuseumInfo(id);
+      LogRecordContext.putVariable("sampleId",sampleId);
+   }
+   /**
+    * 标本回库
+    */
+   @LogRecord(type = MUSEUM_TYPE, subType = BACK_MUSEUM_SUB_TYPE, bizNo = "{{#sampleId.id}}",
+           success = BACK_MUSEUM_SUB_TYPE_SUCCESS)
+   @Override
+   public void backSampleMuseumInfo(Integer id){
+      MuseumInfoDO sampleId = museumInfoMapper.selectMuseumInfoById(id);
+      museumInfoMapper.backSampleMuseumInfo(id);
+      LogRecordContext.putVariable("sampleId",sampleId);
    }
    }
    /**
    /**
     * 删除标本
     * 删除标本
     */
     */
-
+   @Override
+   @LogRecord(type = MUSEUM_TYPE, subType = DELETE_SUB_TYPE, bizNo = "{{#sampleId.id}}",
+           success = DELETE_SUB_TYPE_SUCCESS)
+   public void deleteMuseumInfo(Integer id,String reason) {
+      MuseumInfoDO sampleId = museumInfoMapper.selectMuseumInfoById(id);
+      museumInfoMapper.deleteMuseumInfo(id,reason);
+      LogRecordContext.putVariable("sampleId", sampleId );
+   }
    /**
    /**
     * 查询标本id
     * 查询标本id
     */
     */
@@ -61,9 +99,16 @@ public  class  MuseumInfoServiceImpl implements MuseumInfoService {
     * 查询标本编号
     * 查询标本编号
     */
     */
    @Override
    @Override
-   public MuseumInfoDO getMuseumInfoBySampleId (String sampleId) {
+   public String getMuseumInfoBySampleId (String sampleId) {
       return museumInfoMapper.getMuseumInfoBySampleId(sampleId);
       return museumInfoMapper.getMuseumInfoBySampleId(sampleId);
    }
    }
+   /**
+    * 查询标本编号1
+    */
+   @Override
+   public  MuseumInfoDO selectMuseumInfoBySampleId (String sampleId) {
+      return museumInfoMapper.selectMuseumInfoBySampleId(sampleId);
+   }
    /**
    /**
     * 查询标本类型
     * 查询标本类型
     */
     */
@@ -82,27 +127,47 @@ public  class  MuseumInfoServiceImpl implements MuseumInfoService {
     * 标本类型计数
     * 标本类型计数
     * */
     * */
    @Override
    @Override
-   public List<MuseuminfoTypeVO> MuseumInfoBySampleType(Integer sampleType){
+   public Integer MuseumInfoBySampleType(Integer sampleType){
       return museumInfoMapper.countMuseumInfoBySampleType(sampleType);
       return museumInfoMapper.countMuseumInfoBySampleType(sampleType);
    }
    }
    /**
    /**
-    * 标本入库状态计数
+    * 标本入库状态计数
     * */
     * */
    @Override
    @Override
-   public List<MuseuminfoMonthSaveVO> MuseumInfoBySaveJoin(Integer save) {
-      return museumInfoMapper.countMuseumInfoBySaveJoin(save);
+   public Integer MuseumInfoBySaveJoin(Integer month,Integer currentYear) {
+      return museumInfoMapper.countMuseumInfoBySaveJoin(month,currentYear);
+   }
+   /**
+    * 标本出库状态计数
+    * */
+   @Override
+   public List<String> MuseumInfoBySaveOut(Integer month,Integer currentYear) {
+      return museumInfoMapper.countMuseumInfoBySaveOut(month,currentYear);
+   }
+   /**
+    * 标本回库状态计数
+    * */
+   @Override
+   public List<String> MuseumInfoBySaveBack(Integer month,Integer currentYear) {
+      return museumInfoMapper.countMuseumInfoBySaveBack(month,currentYear);
+   }
+   /**
+    * 历年标本数量统计
+    */
+   @Override
+   public Integer MuseumInfoYearJoin(Integer currentYear) {
+      return museumInfoMapper.countMuseumInfoYearJoin(currentYear);
    }
    }
-
    @Override
    @Override
-   public List<MuseuminfoMonthSaveVO> MuseumInfoBySaveOut(Integer save) {
-      return museumInfoMapper.countMuseumInfoBySaveOut(save);
+   public List<String> MuseumInfoYearOutBack(Integer state,Integer currentYear) {
+      return museumInfoMapper.countMuseumInfoYearOutBack(state,currentYear);
    }
    }
    /**
    /**
     * 标本来源计数(年)
     * 标本来源计数(年)
     * */
     * */
    @Override
    @Override
-   public List<MuseuminfoOriginVO> MuseumInfoByOrigin(Integer origin) {
-      return museumInfoMapper.countMuseumInfoByOrigin(origin);
+   public Integer MuseumInfoByOrigin(Integer year, Integer origin) {
+      return museumInfoMapper.countMuseumInfoByOrigin(year,origin);
    }
    }
 }
 }