Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

jiafei 2 hónapja
szülő
commit
b1c4bfc090
18 módosított fájl, 65 hozzáadás és 119 törlés
  1. 5 5
      yudao-module-museum/yudao-module-museum-api/src/main/java/cn/iocoder/yudao/module/museum/enums/social/LogRecordConstants.java
  2. 13 14
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museumflow/MuseumFlowController.java
  3. 1 1
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museumflow/vo/MuseumFlowInfoVO.java
  4. 1 1
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museumflow/vo/MuseumFlowPageVO.java
  5. 1 1
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museumflow/vo/MuseumFlowRespVO.java
  6. 1 34
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museumflow/vo/MuseumFlowReturnVO.java
  7. 1 1
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museumflow/vo/MuseumFlowReviewVO.java
  8. 1 1
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museumflow/vo/MuseumFlowSaveVO.java
  9. 4 13
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/MuseumInfoController.java
  10. 6 2
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseumInfoRespVO.java
  11. 1 0
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseumInfoSaveVO.java
  12. 1 0
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseuminfoImportExcelVO.java
  13. 4 4
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/dal/mysql/museumflow/MuseumFlowMapper.java
  14. 5 20
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/dal/mysql/museuminfo/MuseumInfoMapper.java
  15. 1 1
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museumflow/MuseumFlowService.java
  16. 3 4
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museumflow/MuseumFlowServiceImpl.java
  17. 4 8
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museuminfo/MuseumInfoService.java
  18. 12 9
      yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museuminfo/MuseumInfoServiceImpl.java

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

@@ -33,14 +33,14 @@ public interface LogRecordConstants {
     // 操作类型常量
     String MUSEUM_TYPE = "MUSEUM 标本";
     String CREATE_SUB_TYPE = "入库记录";
-    String CREATE_SUB_TYPE_SUCCESS = "标本【{{#sampleId.chineseName}}】入库成功";
+    String CREATE_SUB_TYPE_SUCCESS = "标本【{{#sample.chineseName}}】入库成功";
     String UPDATE_SUB_TYPE = "更新记录";
-    String UPDATE_SUB_TYPE_SUCCESS = "更新了标本【{{#sampleId.chineseName}}】: {_DIFF{#MuseumInfoSaveVO}}";
+    String UPDATE_SUB_TYPE_SUCCESS = "更新了标本【{{#sample.chineseName}}】: {_DIFF{#MuseumInfoSaveVO}}";
     String DELETE_SUB_TYPE = "删除记录";
-    String DELETE_SUB_TYPE_SUCCESS = "删除了标本【{{#sampleId.chineseName}}】";
+    String DELETE_SUB_TYPE_SUCCESS = "删除了标本【{{#sample.chineseName}}】";
     String OUT_MUSEUM_SUB_TYPE = "出库记录";
-    String OUT_MUSEUM_SUB_TYPE_SUCCESS = "标本【{{#sampleId.chineseName}}】出库成功 : {_DIFF{#MuseumInfoSaveVO}}";
+    String OUT_MUSEUM_SUB_TYPE_SUCCESS = "标本【{{#sample.chineseName}}】出库 : {_DIFF{#MuseumInfoSaveVO}}";
     String BACK_MUSEUM_SUB_TYPE = "回库记录";
-    String BACK_MUSEUM_SUB_TYPE_SUCCESS = "标本【{{#sampleId.chineseName}}】回库成功";
+    String BACK_MUSEUM_SUB_TYPE_SUCCESS = "标本【{{#sample.chineseName}}】回库 : {_DIFF{#MuseumInfoSaveVO}}";
 
 }

+ 13 - 14
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museumflow/MuseumFlowController.java

@@ -113,26 +113,25 @@ public class MuseumFlowController {
         }
     }
 
-    @GetMapping("/menId")
-    @Operation(summary = "查询身份信息")
-    public CommonResult<Boolean> hasAnyRoles() {
-        Long UserId = getLoginUserId();
-        if (permissionService.hasAnyRoles(UserId, "operate")) {
-            return CommonResult.success(true);
-        } else {
-            return CommonResult.error(200, "无权限");
-        }
-    }
+//    @GetMapping("/menId")
+//    @Operation(summary = "查询身份信息")
+//    public CommonResult<Boolean> hasAnyRoles() {
+//        Long UserId = getLoginUserId();
+//        if (permissionService.hasAnyRoles(UserId, "operate")) {
+//            return CommonResult.success(true);
+//        } else {
+//            return CommonResult.error(200, "无权限");
+//        }
+//    }
 
     @PostMapping("/outbound")
     @Operation(summary = "出库功能")
     public CommonResult<Boolean> createMuseumFlowOutbound(@RequestBody MuseumFlowSaveVO saveVO) {
-        //TODO
         Long UserId = getLoginUserId();
         if (permissionService.hasAnyRoles(UserId, "operate")) {
             List<String> errorList = new ArrayList<>();
 //            errorList.add(museumFlowService.isMuseumFlowIn(saveVO));
-//      Save中 1现为未出库或已回库,0为已出库
+//      store中 1现为未出库或已回库,0为已出库
 //      State中 0在库,1为已出库,2为审批中,3为审批通过,4为审批驳回
             for (String number : saveVO.getNumber()) {
                 MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(number);
@@ -145,7 +144,7 @@ public class MuseumFlowController {
                     } else {
                         List<MuseumFlowDO> event = museumFlowService.selectMuseumFlowByNumbersLike(number);
                         if (event != null) {
-                            errorList.addAll( museumFlowService.isMuseumFlowStateOutbound0(event));
+                            errorList.addAll( museumFlowService.isMuseumFlowStateOutbound0(event,number));
                         }
                     }
                 }
@@ -177,7 +176,7 @@ public class MuseumFlowController {
                     museumFlowService.updateMuseumFlowOutbound(saveVO);
                     return CommonResult.success(true);
                 } else {
-                    return CommonResult.error(2, result.getNumber() + museumFlowService.isMuseumFlowStateForm(State));
+                    return CommonResult.error(2, result.getId() + museumFlowService.isMuseumFlowStateForm(State));
                 }
             } else {
                 return CommonResult.error(2, "找不到该审批单");

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

@@ -37,7 +37,7 @@ public class MuseumFlowInfoVO {
     @Schema(description = "备注")
     private String nots;
 
-    @Schema(description = "状态")
+    @Schema(description = "状态 (0在库,1已出库,2审批中,3审批通过,4审批驳回)")
     private Integer state;
 
     @Schema(description = "标本详情")

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

@@ -75,6 +75,6 @@ public class MuseumFlowPageVO extends PageParam {
     @Schema(description = "备注")
     private String nots;
 
-    @Schema(description = "状态")
+    @Schema(description = "状态 (0在库,1已出库,2审批中,3审批通过,4审批驳回)")
     private Integer state;
 }

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

@@ -67,6 +67,6 @@ public class MuseumFlowRespVO {
     @Schema(description = "备注")
     private String nots;
 
-    @Schema(description = "状态")
+    @Schema(description = "状态 (0在库,1已出库,2审批中,3审批通过,4审批驳回)")
     private Integer state;
 }

+ 1 - 34
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museumflow/vo/MuseumFlowReturnVO.java

@@ -19,39 +19,6 @@ public class MuseumFlowReturnVO {
     @Schema(description = "样品名称")
     private String sampleName;
 
-    @Schema(description = "出库员")
-    private String outboundPerson;
-
-    @Schema(description = "出库时间")
-    private LocalDateTime outboundTime;
-
-    @Schema(description = "目的")
-    private String purpose;
-
-    @Schema(description = "出库附件")
-    private String annexOut;
-
-    @Schema(description = "申请人")
-    private String applyPerson;
-
-    @Schema(description = "申请单位")
-    private String applyUnit;
-
-    @Schema(description = "申请时间")
-    private LocalDateTime applyTime;
-
-    @Schema(description = "预计退还时间")
-    private String returnExpect;
-
-    @Schema(description = "审批人")
-    private String reviewPerson;
-
-    @Schema(description = "审批时间")
-    private LocalDateTime reviewTime;
-
-    @Schema(description = "拒绝原因")
-    private String rejectSeason;
-
     @Schema(description = "退还员")
     private String returnPerson;
 
@@ -67,6 +34,6 @@ public class MuseumFlowReturnVO {
     @Schema(description = "备注")
     private String nots;
 
-    @Schema(description = "状态")
+    @Schema(description = "状态 (0在库,1已出库,2审批中,3审批通过,4审批驳回)")
     private Integer state;
 }

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

@@ -32,7 +32,7 @@ public class MuseumFlowReviewVO {
     @Schema(description = "备注")
     private String nots;
 
-    @Schema(description = "状态")
+    @Schema(description = "状态 (0在库,1已出库,2审批中,3审批通过,4审批驳回)")
     private Integer state;
 
 }

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

@@ -48,7 +48,7 @@ public class MuseumFlowSaveVO {
     @Schema(description = "备注")
     private String nots;
 
-    @Schema(description = "状态")
+    @Schema(description = "状态 (0在库,1已出库,2审批中,3审批通过,4审批驳回)")
     private Integer state;
 
 }

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

@@ -1,7 +1,5 @@
 package cn.iocoder.yudao.module.museum.controller.admin.museuminfo;
 
-import cn.hutool.json.JSONArray;
-import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
@@ -9,17 +7,10 @@ import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
 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.service.museuminfo.MuseumInfoService;
-import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserImportExcelVO;
-import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserImportRespVO;
-import cn.iocoder.yudao.module.system.enums.common.SexEnum;
-import com.alibaba.druid.filter.logging.Log4j2Filter;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.tags.Tag;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
@@ -46,7 +37,7 @@ public class MuseumInfoController {
     //TODO 判断标本编号是否重复
     @PostMapping("/create")
     @Operation(summary = "新增标本")
-    public CommonResult<Integer> createMuseumInfo(@RequestBody MuseumInfoSaveVO saveVO) {
+    public CommonResult<Integer> createMuseumInfo(@Valid @RequestBody MuseumInfoSaveVO saveVO) {
         String sampleId = saveVO.getSampleId();
         String result = museumInfoService.getMuseumInfoBySampleId(sampleId);
         if (result != null) {
@@ -259,14 +250,14 @@ public class MuseumInfoController {
             Integer number3 = museumInfoService.MuseumInfoByOrigin(year,3);
             Integer number4 = museumInfoService.MuseumInfoByOrigin(year,4);
 
-            Map<Integer,Object> map = new HashMap<>();
+            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);
+            Map.put(year,innerMap);
+            result.add(Map);
         }
         return CommonResult.success(result);
     }

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

@@ -4,6 +4,9 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
 import java.time.LocalDateTime;
 import java.util.List;
 
@@ -11,11 +14,12 @@ import java.util.List;
 @Data
 @ExcelIgnoreUnannotated
 public class MuseumInfoRespVO {
-//private Integer Ynumber;
-
     @Schema(description = "标本id")
     private Integer id;
 
+    @NotBlank(message = "标本编号不能为空")
+    @Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成")
+    @Size(min = 4, max = 30, message = "标本编号长度为 4-30 个字符")
     @Schema(description = "标本编号")
     private String sampleId;
 

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

@@ -12,6 +12,7 @@ public class MuseumInfoSaveVO {
 
     @Schema(description = "标本id")
     private Integer id;
+//    private Long id;
 
     @Schema(description = "标本编号")
     private String sampleId;

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

@@ -43,6 +43,7 @@ public class MuseuminfoImportExcelVO {
     @ExcelProperty("国际名称")
     private String internationName;
 
+
     @ExcelProperty("保存类型")
     private Integer keepType;
 

+ 4 - 4
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/dal/mysql/museumflow/MuseumFlowMapper.java

@@ -48,15 +48,16 @@ public interface MuseumFlowMapper extends BaseMapperX<MuseumFlowDO> {
     MuseumFlowDO selectMuseumFlowByNumber(@Param("number")String number);
 
     /**根据编号数组在Flow库中进行模糊查询*/
-    @Select("SELECT * FROM museum_outbound WHERE CONCAT('[', number, ']') LIKE CONCAT('%', #{number}, '%') AND deleted = 0")
+    @Select("SELECT * FROM museum_outbound WHERE JSON_CONTAINS(number, CAST(#{number} AS JSON)) AND deleted = 0")
     List<MuseumFlowDO> selectMuseumFlowByNumbersLike(@Param("number") String number);
 
 
+
 /**出库功能 Save中 1现为未出库或已回库,0为已出库   State中 0现为未出库或已回库,1为已出库,2为审批中,3为审批通过,4为审批驳回
 
 
     /**将总库中样品状态更新为0 已出库**/
-    @Update("UPDATE museum_info SET save=0  WHERE sample_id =#{sample_id} AND deleted =0 ")
+    @Update("UPDATE museum_info SET store=0  WHERE sample_id =#{sample_id} AND deleted =0 ")
     void updateMuseumFlowSave0(String sample_id);
 
     @Update("UPDATE museum_outbound SET state=#{state},outbound_person=#{outboundPerson},outbound_time=#{outboundTime} " +
@@ -94,7 +95,7 @@ public interface MuseumFlowMapper extends BaseMapperX<MuseumFlowDO> {
 
 
     /**将主库样品状态更新为1 已出库**/
-    @Update("UPDATE museum_info SET save=1  WHERE sample_id = #{sample_id} AND deleted =0 ")
+    @Update("UPDATE museum_info SET store=1  WHERE sample_id = #{sample_id} AND deleted =0 ")
     void updateMuseumFlowSave1(String sample_id);
 
     /**对样品信息进行更新**/
@@ -108,5 +109,4 @@ public interface MuseumFlowMapper extends BaseMapperX<MuseumFlowDO> {
     @Select("SELECT * FROM system_users WHERE id = #{UserId} AND deleted =0 ")
     AdminUserDO selectAdminUserDOById(Long UserId);
 
-
 }

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

@@ -4,18 +4,16 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
 import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
 import cn.iocoder.yudao.module.museum.controller.admin.museuminfo.vo.*;
-import cn.iocoder.yudao.module.museum.dal.database.museumflow.MuseumFlowDO;
+
 import cn.iocoder.yudao.module.museum.dal.database.museuminfo.MuseumInfoDO;
-import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
-import org.apache.ibatis.annotations.Mapper;
+
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
 
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
+
 
 @Mapper
 public interface MuseumInfoMapper extends BaseMapperX<MuseumInfoDO> {
@@ -33,12 +31,12 @@ public interface MuseumInfoMapper extends BaseMapperX<MuseumInfoDO> {
     /**
      * 标本出库
      */
-    @Update("UPDATE museum_info SET store=0  WHERE id =#{id}")
+    @Update("UPDATE museum_info SET store=0  WHERE id =#{id} AND deleted =0")
     void outSampleMuseumInfo(@Param("id")Integer id);
     /**
      * 标本回库
      */
-    @Update("UPDATE museum_info SET store=1  WHERE id =#{id}")
+    @Update("UPDATE museum_info SET store=1  WHERE id =#{id} AND deleted =0")
     void backSampleMuseumInfo(@Param("id")Integer id);
     /**
      * 删除标本
@@ -139,20 +137,9 @@ public interface MuseumInfoMapper extends BaseMapperX<MuseumInfoDO> {
             " AND origin = #{origin}")
     Integer countMuseumInfoByOrigin(@Param("year") Integer year, @Param("origin") Integer origin);
 
-
-
-
     /**
      * 分页
      */
-//    default PageResult<MuseumInfoDO> selectPage(MuseumInfoPageReqVO pageReqVO) {
-//        LambdaQueryWrapperX<MuseumInfoDO> queryWrapper = new LambdaQueryWrapperX<>();
-//        queryWrapper.likeIfPresent(MuseumInfoDO::getSampleId, pageReqVO.getSampleId())
-//                .eqIfPresent(MuseumInfoDO::getSampleType, pageReqVO.getSampleType())
-//                .likeIfPresent(MuseumInfoDO::getPlace, pageReqVO.getPlace())
-//                .orderByDesc(MuseumInfoDO::getId);
-//        return selectPage(pageReqVO, queryWrapper);}
-//
     default PageResult<MuseumInfoDO> selectPage(MuseumInfoPageReqVO pageReqVO) {
         return selectPage(pageReqVO, new LambdaQueryWrapperX<MuseumInfoDO>()
                 .likeIfPresent(MuseumInfoDO::getSampleId, pageReqVO.getSampleId())
@@ -160,6 +147,4 @@ public interface MuseumInfoMapper extends BaseMapperX<MuseumInfoDO> {
                 .likeIfPresent(MuseumInfoDO::getPlace, pageReqVO.getPlace())
                 .orderByDesc(MuseumInfoDO::getId));
     }
-
-
 }

+ 1 - 1
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museumflow/MuseumFlowService.java

@@ -63,7 +63,7 @@ public interface MuseumFlowService {
 
     String isMuseumFlowStateForm(Integer State);
 
-    List<String> isMuseumFlowStateOutbound0(List<MuseumFlowDO> event);
+    List<String> isMuseumFlowStateOutbound0(List<MuseumFlowDO> event,String number);
 
 //    String isMuseumFlowIn(MuseumFlowSaveVO saveVO);
 

+ 3 - 4
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museumflow/MuseumFlowServiceImpl.java

@@ -145,15 +145,14 @@ public class MuseumFlowServiceImpl implements MuseumFlowService {
 //    }
 
     /**
-     * 判断有相关编号的数据中的状态值 有不为0(出库)的返回相应错误信息 无则返回null
+     * 判断有相关编号的数据中的状态值 有不为0(出库)的返回相应错误信息 无则为空
      */
-    public List<String> isMuseumFlowStateOutbound0(List<MuseumFlowDO> event){
+    public List<String> isMuseumFlowStateOutbound0(List<MuseumFlowDO> event,String number){
         List<String> errorList = new ArrayList<>();
         for (MuseumFlowDO event1 : event) {
             Integer State = event1.getState();
-            String sampleId = event1.getNumber();
             if (State != 0) {
-                errorList.add(sampleId + isMuseumFlowState(State));
+                errorList.add(number + isMuseumFlowState(State));
             }
         }
         return errorList;

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

@@ -3,16 +3,12 @@ package cn.iocoder.yudao.module.museum.service.museuminfo;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 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.system.controller.admin.user.vo.user.UserImportExcelVO;
-import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserImportRespVO;
-import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
-import org.apache.ibatis.annotations.Param;
+
 import org.springframework.stereotype.Service;
 
 import javax.validation.Valid;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
+
 
 @Service
 public interface MuseumInfoService {
@@ -42,11 +38,11 @@ public interface MuseumInfoService {
     * */
    MuseumInfoDO selectMuseumInfo (Integer id);
    /**
-    * 查询标本编号
+    * 查询标本编号(String)
     * */
    String getMuseumInfoBySampleId(String sampleId);
    /**
-    * 查询标本编号1
+    * 查询标本编号(DO)
     * */
    MuseumInfoDO selectMuseumInfoBySampleId(String sampleId);
    /**

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

@@ -34,23 +34,24 @@ public  class  MuseumInfoServiceImpl implements MuseumInfoService {
     * 新增标本
     */
    @Override
-   @LogRecord(type = MUSEUM_TYPE, subType = CREATE_SUB_TYPE, bizNo = "{{#sampleId.id}}",
+   @LogRecord(type = MUSEUM_TYPE, subType = CREATE_SUB_TYPE, bizNo = "{{#sample.id}}",
            success =  CREATE_SUB_TYPE_SUCCESS)
    public Integer createMuseumInfo(MuseumInfoSaveVO saveVO) {
       MuseumInfoDO sample = BeanUtils.toBean(saveVO, MuseumInfoDO.class);
+      sample.setStore(1);
       museumInfoMapper.insert(sample);
-      LogRecordContext.putVariable("sample", sample );
+      LogRecordContext.putVariable("sample", sample);
       return sample.getId();
+
    }
    /**
     * 更新标本
     */
-   @LogRecord(type = MUSEUM_TYPE, subType = UPDATE_SUB_TYPE, bizNo = "{{#sampleId.id}}",
+   @LogRecord(type = MUSEUM_TYPE, subType = UPDATE_SUB_TYPE, bizNo = "{{#sample.id}}",
            success = UPDATE_SUB_TYPE_SUCCESS)
    @Override
    public void updateSampleMuseumInfo(MuseumInfoSaveVO saveVO) {
       MuseumInfoDO sample = BeanUtils.toBean(saveVO,MuseumInfoDO.class);
-
       museumInfoMapper.updateMuseumInfo(sample);
       LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(sample, MuseumInfoSaveVO.class));
       LogRecordContext.putVariable("sample", sample );
@@ -59,30 +60,32 @@ public  class  MuseumInfoServiceImpl implements MuseumInfoService {
    /**
     * 标本出库
     */
-   @LogRecord(type = MUSEUM_TYPE, subType = OUT_MUSEUM_SUB_TYPE, bizNo = "{{#sampleId.id}}",
+   @LogRecord(type = MUSEUM_TYPE, subType = OUT_MUSEUM_SUB_TYPE, bizNo = "{{#sample.id}}",
            success = OUT_MUSEUM_SUB_TYPE_SUCCESS)
    @Override
    public void outSampleMuseumInfo(Integer id){
       MuseumInfoDO sample = museumInfoMapper.selectMuseumInfoById(id);
       museumInfoMapper.outSampleMuseumInfo(id);
+      LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(sample, MuseumInfoSaveVO.class));
       LogRecordContext.putVariable("sample",sample);
    }
    /**
     * 标本回库
     */
-   @LogRecord(type = MUSEUM_TYPE, subType = BACK_MUSEUM_SUB_TYPE, bizNo = "{{#sampleId.id}}",
+   @LogRecord(type = MUSEUM_TYPE, subType = BACK_MUSEUM_SUB_TYPE, bizNo = "{{#sample.id}}",
            success = BACK_MUSEUM_SUB_TYPE_SUCCESS)
    @Override
    public void backSampleMuseumInfo(Integer id){
       MuseumInfoDO sample = museumInfoMapper.selectMuseumInfoById(id);
       museumInfoMapper.backSampleMuseumInfo(id);
+      LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(sample, MuseumInfoSaveVO.class));
       LogRecordContext.putVariable("sample",sample);
    }
    /**
     * 删除标本
     */
    @Override
-   @LogRecord(type = MUSEUM_TYPE, subType = DELETE_SUB_TYPE, bizNo = "{{#sampleId.id}}",
+   @LogRecord(type = MUSEUM_TYPE, subType = DELETE_SUB_TYPE, bizNo = "{{#sample.id}}",
            success = DELETE_SUB_TYPE_SUCCESS)
    public void deleteMuseumInfo(Integer id,String reason) {
       MuseumInfoDO sample = museumInfoMapper.selectMuseumInfoById(id);
@@ -98,14 +101,14 @@ public  class  MuseumInfoServiceImpl implements MuseumInfoService {
    }
 
    /**
-    * 查询标本编号
+    * 查询标本编号(String)
     */
    @Override
    public String getMuseumInfoBySampleId (String sampleId) {
       return museumInfoMapper.getMuseumInfoBySampleId(sampleId);
    }
    /**
-    * 查询标本编号1
+    * 查询标本编号(DO)
     */
    @Override
    public  MuseumInfoDO selectMuseumInfoBySampleId (String sampleId) {