Merge remote-tracking branch 'origin/master'
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.event; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | |
| | | /** æ åç»´æ¤ä¿åäºä»¶ã */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @Schema(description = "æ åç»´æ¤ä¿åäºä»¶") |
| | | public class StandardMethodSavedEvent { |
| | | |
| | | @Schema(description = "æ åæ¹æ³ID") |
| | | private Integer standardMethodId; |
| | | |
| | | @Schema(description = "æ åç¼å·") |
| | | private String code; |
| | | |
| | | @Schema(description = "æ åæè¿°") |
| | | private String name; |
| | | |
| | | @Schema(description = "æ¯å¦æ¥æ°ï¼0å¦ï¼1æ¯ï¼") |
| | | private Integer needSearchNew; |
| | | |
| | | @Schema(description = "æ¯å¦ä¸ºç¼è¾æä½") |
| | | private boolean edit; |
| | | } |
| | |
| | | */ |
| | | @TableName(value ="standard_method") |
| | | @Data |
| | | @Schema(description = "æ åæ¹æ³") |
| | | public class StandardMethod implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | @Schema(description = "æ åæ¹æ³ID") |
| | | private Integer id; |
| | | |
| | | @Schema(description = "é¢å") |
| | | private String field; |
| | | |
| | | @Schema(description = "æ£éªå¯¹è±¡") |
| | | private String structureTestObjectId; |
| | | |
| | | /** æ ååºä¸çº§è¡ä¸IDï¼ä»
æ¥å£äº¤äºï¼ä¸è½standard_methodè¡¨ï¼ */ |
| | | @Schema(description = "æ ååºä¸çº§è¡ä¸ID") |
| | | @TableField(exist = false) |
| | | private List<Integer> industryIds; |
| | | |
| | | /** å·²ç»å®è¡ä¸åç§°ï¼å表å±ç¤ºï¼ */ |
| | | @Schema(description = "å·²ç»å®è¡ä¸åç§°") |
| | | @TableField(exist = false) |
| | | private String industryNames; |
| | | |
| | | /** éä»¶æ°éï¼å表å±ç¤ºï¼ */ |
| | | @Schema(description = "éä»¶æ°é") |
| | | @TableField(exist = false) |
| | | private Integer attachmentCount; |
| | | |
| | |
| | | @Schema(description = "æ¯å¦å¯ç¨") |
| | | private Integer isUse; |
| | | |
| | | @Schema(description = "æ¯å¦æ¥æ°ï¼0å¦ï¼1æ¯ï¼") |
| | | private Integer needSearchNew; |
| | | |
| | | @Schema(description = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.pojo.StandardMethodList; |
| | | import com.ruoyi.basic.event.StandardMethodSavedEvent; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.StandardMethodMapper; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | |
| | | import com.ruoyi.basic.utils.StandardTreePath; |
| | | import com.ruoyi.basic.utils.StandardTreePathParser; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.ApplicationEventPublisher; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | private LaboratoryMapper laboratoryMapper; |
| | | private StandardTreeMapper standardTreeMapper; |
| | | private StandardTreeTemplateBindingMapper standardTreeTemplateBindingMapper; |
| | | private final ApplicationEventPublisher eventPublisher; |
| | | |
| | | @Value("${file.path}") |
| | | private String filePath; |
| | |
| | | StandardMethodAttachmentMapper standardMethodAttachmentMapper, |
| | | LaboratoryMapper laboratoryMapper, |
| | | StandardTreeMapper standardTreeMapper, |
| | | StandardTreeTemplateBindingMapper standardTreeTemplateBindingMapper) { |
| | | StandardTreeTemplateBindingMapper standardTreeTemplateBindingMapper, |
| | | ApplicationEventPublisher eventPublisher) { |
| | | this.standardMethodMapper = standardMethodMapper; |
| | | this.standardProductListMapper = standardProductListMapper; |
| | | this.standardProductListService = standardProductListService; |
| | |
| | | this.laboratoryMapper = laboratoryMapper; |
| | | this.standardTreeMapper = standardTreeMapper; |
| | | this.standardTreeTemplateBindingMapper = standardTreeTemplateBindingMapper; |
| | | this.eventPublisher = eventPublisher; |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Integer addStandardMethod(StandardMethod standardMethod) { |
| | | standardMethod.setStructureTestObjectId(null); |
| | | if (standardMethod.getNeedSearchNew() == null) { |
| | | standardMethod.setNeedSearchNew(0); |
| | | } |
| | | standardMethodMapper.insert(standardMethod); |
| | | syncIndustries(standardMethod, Collections.<Integer>emptySet()); |
| | | publishSavedEvent(standardMethod, false); |
| | | return standardMethod.getId(); |
| | | } |
| | | |
| | |
| | | if (!oldStandardMethod.getCode().equals(standardMethod.getCode())) { |
| | | CompletableFuture.supplyAsync(() -> replaceMethod(oldStandardMethod.getCode(), standardMethod.getCode())); |
| | | } |
| | | if (standardMethod.getNeedSearchNew() == null) { |
| | | standardMethod.setNeedSearchNew(oldStandardMethod.getNeedSearchNew() == null |
| | | ? 0 : oldStandardMethod.getNeedSearchNew()); |
| | | } |
| | | int i = standardMethodMapper.updateById(standardMethod); |
| | | syncIndustries(standardMethod, new LinkedHashSet<>(selectIndustryIds(oldStandardMethod.getId()))); |
| | | publishSavedEvent(standardMethodMapper.selectById(standardMethod.getId()), true); |
| | | return i; |
| | | } |
| | | |
| | | private void publishSavedEvent(StandardMethod standardMethod, boolean edit) { |
| | | eventPublisher.publishEvent(new StandardMethodSavedEvent( |
| | | standardMethod.getId(), standardMethod.getCode(), standardMethod.getName(), |
| | | standardMethod.getNeedSearchNew(), edit)); |
| | | } |
| | | |
| | | private List<Integer> selectIndustryIds(Integer methodId) { |
| | | List<StandardMethodIndustry> list = standardMethodIndustryMapper.selectList( |
| | | Wrappers.<StandardMethodIndustry>lambdaQuery() |
| | |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="needSearchNew" column="need_search_new" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectStandardMethodList" resultType="com.ruoyi.basic.pojo.StandardMethod"> |
| | |
| | | sm.field, |
| | | sm.name_en, |
| | | sm.is_use, |
| | | sm.need_search_new, |
| | | sm.qualification_id, |
| | | COALESCE((SELECT GROUP_CONCAT(l.laboratory_name ORDER BY COALESCE(l.sort, 0), l.id SEPARATOR 'ã') |
| | | FROM standard_method_industry smi JOIN laboratory l ON l.id = smi.industry_id |
| | |
| | | sm.field, |
| | | sm.name_en, |
| | | sm.is_use, |
| | | sm.need_search_new, |
| | | sm.qualification_id |
| | | from standard_method sm |
| | | left join user u1 on sm.create_user = u1.id |
| | |
| | | @Operation(summary = "ä¿®æ¹æ 忥æ°") |
| | | @PostMapping("/updateMethodSearchNew") |
| | | public Result updateMethodSearchNew(@RequestBody ProcessMethodSearchNew processMethodSearchNew ) { |
| | | return Result.success(processMethodSearchNewService.updateById(processMethodSearchNew)); |
| | | return Result.success(processMethodSearchNewService.updateMethodSearchNew(processMethodSearchNew)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return Result.success(processMethodSearchNewService.pageMethodSearchNew(page, processMethodSearchNew)); |
| | | } |
| | | |
| | | @Operation(summary = "èªå¨å½æ¡£è®°å½å表") |
| | | @GetMapping("/pageAutoArchived") |
| | | public Result<IPage<ProcessMethodSearchNew>> pageAutoArchived(ProcessMethodSearchNew processMethodSearchNew, Page page) { |
| | | return Result.success(processMethodSearchNewService.pageAutoArchived(page, processMethodSearchNew)); |
| | | } |
| | | |
| | | @Operation(summary = "æ 忥æ°å¯¼åº") |
| | | @GetMapping("/exportMethodSearchNew") |
| | | public void exportMethodSearchNew(Integer archivedId, HttpServletResponse response) throws Exception { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.process.listener; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.basic.event.StandardMethodSavedEvent; |
| | | import com.ruoyi.basic.mapper.StandardMethodMapper; |
| | | import com.ruoyi.basic.pojo.StandardMethod; |
| | | import com.ruoyi.process.mapper.ProcessMethodSearchNewFileSeqMapper; |
| | | import com.ruoyi.process.mapper.ProcessMethodSearchNewMapper; |
| | | import com.ruoyi.process.pojo.ProcessMethodSearchNew; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.context.event.EventListener; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | |
| | | /** æ ¹æ®æ åç»´æ¤ä¿åå¨ä½åæ¥çæã彿¡£æ 忥æ°è®°å½ã */ |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class StandardMethodSearchNewListener { |
| | | |
| | | private static final ZoneId CHINA_ZONE = ZoneId.of("Asia/Shanghai"); |
| | | private static final DateTimeFormatter FILE_DATE = DateTimeFormatter.BASIC_ISO_DATE; |
| | | |
| | | private final StandardMethodMapper standardMethodMapper; |
| | | private final ProcessMethodSearchNewMapper searchNewMapper; |
| | | private final ProcessMethodSearchNewFileSeqMapper fileSeqMapper; |
| | | |
| | | @EventListener |
| | | public void onStandardMethodSaved(StandardMethodSavedEvent event) { |
| | | if (!Integer.valueOf(1).equals(event.getNeedSearchNew())) { |
| | | return; |
| | | } |
| | | |
| | | StandardMethod standard = standardMethodMapper.selectOne(Wrappers.<StandardMethod>lambdaQuery() |
| | | .eq(StandardMethod::getId, event.getStandardMethodId()) |
| | | .last("FOR UPDATE")); |
| | | if (standard == null) { |
| | | return; |
| | | } |
| | | |
| | | ProcessMethodSearchNew current = searchNewMapper.selectOne(Wrappers.<ProcessMethodSearchNew>lambdaQuery() |
| | | .eq(ProcessMethodSearchNew::getCurrentAutoStandardId, event.getStandardMethodId()) |
| | | .last("FOR UPDATE")); |
| | | if (!event.isEdit() && current != null) { |
| | | return; |
| | | } |
| | | |
| | | LocalDateTime now = LocalDateTime.now(CHINA_ZONE); |
| | | if (current != null) { |
| | | searchNewMapper.update(null, Wrappers.<ProcessMethodSearchNew>lambdaUpdate() |
| | | .eq(ProcessMethodSearchNew::getMethodSearchNewId, current.getMethodSearchNewId()) |
| | | .set(ProcessMethodSearchNew::getIsNewStandard, 0) |
| | | .set(ProcessMethodSearchNew::getIsAutoArchived, 1) |
| | | .set(ProcessMethodSearchNew::getCurrentAutoStandardId, null) |
| | | .set(ProcessMethodSearchNew::getAutoArchivedTime, now)); |
| | | } |
| | | |
| | | ProcessMethodSearchNew created = new ProcessMethodSearchNew(); |
| | | created.setMethodName(event.getName()); |
| | | created.setStandardNo(event.getCode()); |
| | | created.setFileNo(nextFileNo(now.toLocalDate())); |
| | | created.setIsNewStandard(1); |
| | | created.setSearchNewSource(null); |
| | | created.setStandardMethodId(event.getStandardMethodId()); |
| | | created.setCurrentAutoStandardId(event.getStandardMethodId()); |
| | | created.setIsAutoArchived(0); |
| | | searchNewMapper.insert(created); |
| | | } |
| | | |
| | | private String nextFileNo(LocalDate date) { |
| | | String prefix = date.format(FILE_DATE); |
| | | fileSeqMapper.insertIfAbsent(date); |
| | | Integer stored = fileSeqMapper.selectForUpdate(date); |
| | | Integer existing = fileSeqMapper.selectMaxExisting(prefix); |
| | | int next = Math.max(stored == null ? 0 : stored, existing == null ? 0 : existing) + 1; |
| | | fileSeqMapper.updateValue(date, next); |
| | | return prefix + String.format("%03d", next); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.process.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Mapper |
| | | public interface ProcessMethodSearchNewFileSeqMapper { |
| | | |
| | | int insertIfAbsent(@Param("seqDate") LocalDate seqDate); |
| | | |
| | | Integer selectForUpdate(@Param("seqDate") LocalDate seqDate); |
| | | |
| | | Integer selectMaxExisting(@Param("prefix") String prefix); |
| | | |
| | | int updateValue(@Param("seqDate") LocalDate seqDate, @Param("value") Integer value); |
| | | } |
| | |
| | | */ |
| | | IPage<ProcessMethodSearchNew> pageMethodSearchNew(@Param("page") Page page, @Param("ew") QueryWrapper<ProcessMethodSearchNewBackupsDto> processMethodSearchNewDtoQueryWrapper, @Param("beginDate") String beginDate, @Param("endDate") String endDate); |
| | | |
| | | IPage<ProcessMethodSearchNew> pageAutoArchived(@Param("page") Page page, |
| | | @Param("ew") QueryWrapper<ProcessMethodSearchNew> queryWrapper); |
| | | |
| | | } |
| | | |
| | |
| | | public class ProcessMethodSearchNew { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @Schema(description = "æ 忥æ°è®°å½ID") |
| | | private Integer methodSearchNewId; |
| | | |
| | | @Schema(description = "æ åæ¹æ³éªè¯id") |
| | |
| | | @Schema(description = "夿³¨,0ä½åº, 1æ¿æ¢") |
| | | private Integer remark; |
| | | |
| | | @Schema(description = "æ¥æºæ åç»´æ¤IDï¼èªå¨çæè®°å½ä½¿ç¨") |
| | | private Integer standardMethodId; |
| | | |
| | | @Schema(description = "å½åèªå¨è®°å½å¯¹åºçæ åç»´æ¤IDï¼å½æ¡£å为空") |
| | | private Integer currentAutoStandardId; |
| | | |
| | | @Schema(description = "æ¯å¦èªå¨å½æ¡£ï¼0å¦ï¼1æ¯ï¼") |
| | | private Integer isAutoArchived; |
| | | |
| | | @Schema(description = "èªå¨å½æ¡£æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime autoArchivedTime; |
| | | |
| | | @Schema(description = "å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | |
| | | */ |
| | | boolean addMethodSearchNew(List<ProcessMethodSearchNew> processMethodSearchNewList); |
| | | |
| | | boolean updateMethodSearchNew(ProcessMethodSearchNew processMethodSearchNew); |
| | | |
| | | /** |
| | | * æ 忥æ°å表 |
| | | * @param processMethodSearchNew |
| | |
| | | */ |
| | | IPage<ProcessMethodSearchNew> pageMethodSearchNew(Page page, ProcessMethodSearchNewBackupsDto processMethodSearchNew); |
| | | |
| | | IPage<ProcessMethodSearchNew> pageAutoArchived(Page page, ProcessMethodSearchNew processMethodSearchNew); |
| | | |
| | | /** |
| | | * æ 忥æ°å¯¼åº |
| | | * @param archivedId |
| | |
| | | public boolean addMethodSearchNew(List<ProcessMethodSearchNew> processMethodSearchNewList) { |
| | | for (ProcessMethodSearchNew processMethodSearchNew : processMethodSearchNewList) { |
| | | processMethodSearchNew.setIsNewStandard(1); |
| | | processMethodSearchNew.setIsAutoArchived(0); |
| | | processMethodSearchNew.setStandardMethodId(null); |
| | | processMethodSearchNew.setCurrentAutoStandardId(null); |
| | | processMethodSearchNew.setAutoArchivedTime(null); |
| | | } |
| | | // æ°å¢ |
| | | this.saveBatch(processMethodSearchNewList); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateMethodSearchNew(ProcessMethodSearchNew processMethodSearchNew) { |
| | | ProcessMethodSearchNew old = getById(processMethodSearchNew.getMethodSearchNewId()); |
| | | if (old == null) { |
| | | throw new ErrorException("æ 忥æ°è®°å½ä¸åå¨"); |
| | | } |
| | | if (Integer.valueOf(1).equals(old.getIsAutoArchived())) { |
| | | throw new ErrorException("èªå¨å½æ¡£è®°å½ä¸å
许修æ¹"); |
| | | } |
| | | return update(Wrappers.<ProcessMethodSearchNew>lambdaUpdate() |
| | | .eq(ProcessMethodSearchNew::getMethodSearchNewId, old.getMethodSearchNewId()) |
| | | .set(ProcessMethodSearchNew::getVerifyId, processMethodSearchNew.getVerifyId()) |
| | | .set(ProcessMethodSearchNew::getMethodName, processMethodSearchNew.getMethodName()) |
| | | .set(ProcessMethodSearchNew::getStandardNo, processMethodSearchNew.getStandardNo()) |
| | | .set(ProcessMethodSearchNew::getFileNo, processMethodSearchNew.getFileNo()) |
| | | .set(ProcessMethodSearchNew::getNewMethodName, processMethodSearchNew.getNewMethodName()) |
| | | .set(ProcessMethodSearchNew::getNewStandardNo, processMethodSearchNew.getNewStandardNo()) |
| | | .set(ProcessMethodSearchNew::getSearchNewSource, processMethodSearchNew.getSearchNewSource()) |
| | | .set(ProcessMethodSearchNew::getRemark, processMethodSearchNew.getRemark()) |
| | | .set(ProcessMethodSearchNew::getIsNewStandard, 1)); |
| | | } |
| | | |
| | | /** |
| | |
| | | processMethodSearchNew.setBeginDate(null); |
| | | processMethodSearchNew.setEndDate(null); |
| | | return baseMapper.pageMethodSearchNew(page, QueryWrappers.queryWrappers(processMethodSearchNew), beginDate, endDate); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ProcessMethodSearchNew> pageAutoArchived(Page page, ProcessMethodSearchNew processMethodSearchNew) { |
| | | processMethodSearchNew.setIsAutoArchived(null); |
| | | return baseMapper.pageAutoArchived(page, QueryWrappers.queryWrappers(processMethodSearchNew)); |
| | | } |
| | | |
| | | /** |
| | |
| | | searchNewBackupsDto.setRemarkString("ä½åº"); |
| | | } |
| | | } |
| | | switch (methodSearchNew.getSearchNewSource()) { |
| | | if (methodSearchNew.getSearchNewSource() != null) switch (methodSearchNew.getSearchNewSource()) { |
| | | case 0: |
| | | searchNewBackupsDto.setStandardNet("â"); |
| | | break; |
| | |
| | | List<ProcessMethodSearchNew> collect = searchNewDtoList.stream().map(searchNewDto -> { |
| | | ProcessMethodSearchNew searchNew = new ProcessMethodSearchNew(); |
| | | BeanUtils.copyProperties(searchNewDto, searchNew); |
| | | // æ¯å¦æ¯æ´æ° |
| | | if (StringUtils.isNotBlank(searchNewDto.getIsNewStandardString())) { |
| | | if (searchNewDto.getIsNewStandardString().equals("æ¯")) { |
| | | searchNew.setIsNewStandard(1); |
| | | } else { |
| | | searchNew.setIsNewStandard(0); |
| | | } |
| | | } |
| | | searchNew.setIsNewStandard(1); |
| | | searchNew.setIsAutoArchived(0); |
| | | // æ¥æ°è®°å½ |
| | | if (StringUtils.isNotBlank(searchNewDto.getStandardNet())) { |
| | | searchNew.setSearchNewSource(0); |
| | | } else if (StringUtils.isNotBlank(searchNewDto.getInformationOffices())) { |
| | | searchNew.setSearchNewSource(1); |
| | | } else if (StringUtils.isNotBlank(searchNewDto.getIsNewStandardString())) { |
| | | } else if (StringUtils.isNotBlank(searchNewDto.getStandardBookstore())) { |
| | | searchNew.setSearchNewSource(2); |
| | | } else if (StringUtils.isNotBlank(searchNewDto.getOther())) { |
| | | searchNew.setSearchNewSource(3); |
| | |
| | | processMethodSearchNewArchivedMapper.insert(archived); |
| | | |
| | | // æ¥è¯¢ææçæ åæ¥æ° |
| | | List<ProcessMethodSearchNew> searchNewList = this.list(); |
| | | List<ProcessMethodSearchNew> searchNewList = this.list(Wrappers.<ProcessMethodSearchNew>lambdaQuery() |
| | | .eq(ProcessMethodSearchNew::getIsAutoArchived, 0)); |
| | | |
| | | // æ°å¢å¤å¶ |
| | | List<ProcessMethodSearchNewBackups> methodSearchNewBackups = searchNewList.stream().map(processMethodSearchNew -> { |
| | | ProcessMethodSearchNewBackups backups = new ProcessMethodSearchNewBackups(); |
| | | BeanUtils.copyProperties(processMethodSearchNew, backups); |
| | | backups.setIsNewStandard(0); |
| | | backups.setArchivedId(archived.getArchivedId()); |
| | | return backups; |
| | | }).collect(Collectors.toList()); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.process.mapper.ProcessMethodSearchNewFileSeqMapper"> |
| | | |
| | | <insert id="insertIfAbsent"> |
| | | INSERT IGNORE INTO cnas_process_method_search_new_file_seq |
| | | (seq_date, sequence_value) |
| | | VALUES |
| | | (#{seqDate}, 0) |
| | | </insert> |
| | | |
| | | <select id="selectForUpdate" resultType="java.lang.Integer"> |
| | | SELECT sequence_value |
| | | FROM cnas_process_method_search_new_file_seq |
| | | WHERE seq_date = #{seqDate} |
| | | FOR UPDATE |
| | | </select> |
| | | |
| | | <select id="selectMaxExisting" resultType="java.lang.Integer"> |
| | | SELECT COALESCE(MAX(seq_value), 0) |
| | | FROM ( |
| | | SELECT CAST(SUBSTRING(file_no, 9) AS UNSIGNED) AS seq_value |
| | | FROM cnas_process_method_search_new |
| | | WHERE file_no REGEXP CONCAT('^', #{prefix}, '[0-9]+$') |
| | | UNION ALL |
| | | SELECT CAST(SUBSTRING(file_no, 9) AS UNSIGNED) AS seq_value |
| | | FROM cnas_process_method_search_new_backups |
| | | WHERE file_no REGEXP CONCAT('^', #{prefix}, '[0-9]+$') |
| | | ) numbers |
| | | </select> |
| | | |
| | | <update id="updateValue"> |
| | | UPDATE cnas_process_method_search_new_file_seq |
| | | SET sequence_value = #{value} |
| | | WHERE seq_date = #{seqDate} |
| | | </update> |
| | | |
| | | </mapper> |
| | |
| | | from (select * |
| | | from cnas_process_method_search_new |
| | | <where> |
| | | and is_auto_archived = 0 |
| | | <if test="beginDate != null and beginDate != '' and endDate != null and endDate != ''"> |
| | | and create_time between #{beginDate} and #{endDate} |
| | | </if> |
| | |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="pageAutoArchived" resultType="com.ruoyi.process.pojo.ProcessMethodSearchNew"> |
| | | select * |
| | | from ( |
| | | select * from cnas_process_method_search_new |
| | | where is_auto_archived = 1 |
| | | order by auto_archived_time desc, method_search_new_id desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://192.168.0.24:3307/lims-xjxj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://127.0.0.1:3307/lims-xjxj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 123456 |
| | | # ä»åºæ°æ®æº |
| | |
| | | config: |
| | | multi-statement-allow: true |
| | | |
| | | # Redis è¿æ¥é
ç½® |
| | | data: |
| | | redis: |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | database: 0 |
| | | password: |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | ruoyi: |
| | | name: RuoYi |
| | | version: 3.9.2 |
| | | copyrightYear: 2026 |
| | | profile: D:/ruoyi/uploadPath |
| | | addressEnabled: false |
| | | |
| | | # ç¨æ·å¯ç é
ç½® |
| | | user: |
| | | password: |
| | | maxRetryCount: 5 |
| | | lockTime: 10 |
| | | |
| | | # 令çé
ç½® |
| | | token: |
| | | header: Authorization |
| | | secret: awertgbadrtawetfgfbsdfawerghbfdsftreagd |
| | | expireTime: 450 |
| | | |
| | | # é²çé¾é
ç½® |
| | | referer: |
| | | enabled: false |
| | | allowed-domains: localhost,127.0.0.1,ruoyi.vip,www.ruoyi.vip |
| | | |
| | | # XSS è¿æ»¤é
ç½® |
| | | xss: |
| | | enabled: true |
| | | excludes: /system/notice |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | # ç
§çåå¨è·¯å¾+++++++++++++++++++++++++++è¿ç»´éè¦é
ç½®+++++++++++++++++++++++++++ |
| | | file: |
| | | path: D:\é¡¹ç®æä»¶åå¨\image |
| | |
| | | allowed: png,jpg,jpeg,gif |
| | | |
| | | # æ¥å word åå¨è·¯å¾ |
| | | wordUrl: D:\é¡¹ç®æä»¶åå¨\word |
| | | wordUrl: D:\é¡¹ç®æä»¶åå¨\word |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # è£
夿µè¯åºé
ç½® |
| | | |
| | | # æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://172.17.0.1:11101/lims-xjxj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: xd@123456.. |
| | | |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®è¿æ¥è¶
æ¶æ¶é´ |
| | | connectTimeout: 30000 |
| | | # é
ç½®ç½ç»è¶
æ¶æ¶é´ |
| | | socketTimeout: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | |
| | | # redis é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 11102 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 6 |
| | | # å¯ç |
| | | password: |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # mybatis-plusé
ç½® |
| | | mybatis-plus: |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | # æ¥å¿é
ç½® |
| | | logging: |
| | | file-location: /center-lims/Java |
| | | level: |
| | | root: info |
| | | com.ruoyi: debug |
| | | org.springframework.web: debug |
| | | org.springframework.security: info |
| | | org.mybatis: debug |
| | | com.baomidou.mybatisplus: debug |
| | | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | | # æ¯å¦å¼å¯swagger |
| | | enabled: true |
| | | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | ruoyi: |
| | | name: RuoYi |
| | | version: 3.9.2 |
| | | copyrightYear: 2026 |
| | | profile: D:/ruoyi/uploadPath |
| | | addressEnabled: false |
| | | |
| | | # ç¨æ·å¯ç é
ç½® |
| | | user: |
| | | password: |
| | | maxRetryCount: 5 |
| | | lockTime: 10 |
| | | |
| | | # 令çé
ç½® |
| | | token: |
| | | header: Authorization |
| | | secret: awertgbadrtawetfgfbsdfawerghbfdsftreagd |
| | | expireTime: 450 |
| | | |
| | | # é²çé¾é
ç½® |
| | | referer: |
| | | enabled: false |
| | | allowed-domains: localhost,127.0.0.1,ruoyi.vip,www.ruoyi.vip |
| | | |
| | | # XSS è¿æ»¤é
ç½® |
| | | xss: |
| | | enabled: true |
| | | excludes: /system/notice |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | |
| | | # ç
§çåå¨è·¯å¾+++++++++++++++++++++++++++è¿ç»´éè¦é
ç½®+++++++++++++++++++++++++++ |
| | | file: |
| | | path: /center-lims/Work/img |
| | | # ä¸ä¼ æä»¶å
è®¸çæ©å±å |
| | | allowed: png,jpg,jpeg,gif |
| | | # æ¥åå°å |
| | | wordUrl: /center-lims/Work/word |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | ruoyi: |
| | | # åç§° |
| | | name: RuoYi |
| | | # çæ¬ |
| | | version: 3.9.2 |
| | | # çæå¹´ä»½ |
| | | copyrightYear: 2026 |
| | | # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/uploadPathï¼Linuxé
ç½® /home/ruoyi/uploadPathï¼ |
| | | profile: D:/ruoyi/uploadPath |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 8002 |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080ï¼æå¡å¨æ°èå端为9509 |
| | | port: 9509 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | |
| | | level: |
| | | com.ruoyi: debug |
| | | org.springframework: warn |
| | | |
| | | # ç¨æ·é
ç½® |
| | | user: |
| | | password: |
| | | # å¯ç æå¤§éè¯¯æ¬¡æ° |
| | | maxRetryCount: 5 |
| | | # å¯ç é宿¶é´ï¼é»è®¤10åéï¼ |
| | | lockTime: 10 |
| | | |
| | | # Springé
ç½® |
| | | spring: |
| | |
| | | restart: |
| | | # çé¨ç½²å¼å
³ |
| | | enabled: true |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 192.168.0.24 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: abcdefghijklmnopqrstuvwxyz |
| | | # ä»¤çæææï¼é»è®¤30åéï¼ |
| | | expireTime: 30 |
| | | |
| | | # MyBatis-Plusé
ç½® |
| | | mybatis-plus: |
| | | # æç´¢æå®å
å«å |
| | |
| | | display-name: 'æµè¯æ¨¡å' |
| | | paths-to-match: '/**' |
| | | packages-to-scan: com.ruoyi |
| | | |
| | | # é²çé¾é
ç½® |
| | | referer: |
| | | # é²çé¾å¼å
³ |
| | | enabled: false |
| | | # å
许çååå表 |
| | | allowed-domains: localhost,127.0.0.1,ruoyi.vip,www.ruoyi.vip |
| | | |
| | | # 鲿¢XSSæ»å» |
| | | xss: |
| | | # è¿æ»¤å¼å
³ |
| | | enabled: true |
| | | # æé¤é¾æ¥ï¼å¤ä¸ªç¨éå·åéï¼ |
| | | excludes: /system/notice |
| | | # å¹é
龿¥ |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |