Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-after into dev_cr
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "设å¤éªæ¶éä»¶å é¤") |
| | | @GetMapping("/delDeviceAcceptanceFileList") |
| | | @DeleteMapping("/delDeviceAcceptanceFileList") |
| | | public Result delDeviceAcceptanceFileList(Integer acceptanceFileId){ |
| | | return Result.success(deviceAcceptanceFileService.removeById(acceptanceFileId)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½") |
| | | @GetMapping("/getDeviceInspectionRecordByPage") |
| | | public Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(IPage page, DeviceInspectionRecordDto itemParameter) { |
| | | public Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(Page page, DeviceInspectionRecordDto itemParameter) { |
| | | return deviceInspectionRecordService.getDeviceInspectionRecordByPage(page, itemParameter); |
| | | } |
| | | |
| | |
| | | private DeviceOperationInstructionService deviceOperationInstructionService; |
| | | |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦ å页") |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦å页") |
| | | @GetMapping("/pageByPageQueryOfHomeworkInstructions") |
| | | public Result<IPage<DeviceInstruction>> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto){ |
| | | public Result<IPage<DeviceOperationInstructionDto>> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto){ |
| | | return Result.success(deviceInstructionService.pageByPageQueryOfHomeworkInstructions(page, operationInstructionDto)); |
| | | } |
| | | |
| | |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦ç¼è¾") |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦è¯¦æ
") |
| | | @GetMapping("/homeworkGuidebookEditor") |
| | | public Result<Map<String, Object>> homeworkGuidebookEditor(Integer instructionId){ |
| | | DeviceInstruction instruction = deviceInstructionService.getById(instructionId); |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦åæ§æä»¶å é¤") |
| | | @GetMapping("/deleteHomeworkGuidebook") |
| | | @DeleteMapping("/deleteHomeworkGuidebook") |
| | | public Result deleteHomeworkGuidebook(String ids){ |
| | | if (ObjectUtils.isNotEmpty(ids)) { |
| | | String[] idArray = ids.split(","); |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦å é¤") |
| | | @GetMapping("/homeworkGuidebook") |
| | | @DeleteMapping("/homeworkGuidebook") |
| | | public Result homeworkGuidebook(String id, String instructionId){ |
| | | // å é¤åè¡¨æ°æ® |
| | | deviceOperationInstructionService.removeById(id); |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦å®¡æ¹") |
| | | @GetMapping("/approvalOfHomeworkInstructionManual") |
| | | public Result approvalOfHomeworkInstructionManual(String id, Boolean status){ |
| | | @PostMapping("/approvalOfHomeworkInstructionManual") |
| | | public Result approvalOfHomeworkInstructionManual(@RequestBody Map<String,Object> map){ |
| | | Integer id =(Integer) map.get("id"); |
| | | Boolean status =(Boolean) map.get("status"); |
| | | deviceOperationInstructionService.update(Wrappers.<OperationInstruction>lambdaUpdate() |
| | | .eq(OperationInstruction::getId, id) |
| | | .set(OperationInstruction::getStatus, status) |
| | |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤ç»´æ¤ä¿å
»") |
| | | @DeleteMapping("/deleteDeviceMaintenance") |
| | | public void deleteDeviceMaintenance(@PathVariable Integer id) { |
| | | public void deleteDeviceMaintenance( Integer id) { |
| | | deviceMaintenanceService.removeById(id); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.pojo.DeviceMetric; |
| | | import com.ruoyi.device.service.IDeviceMetricService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/deviceMetrics") |
| | | public class DeviceMetricController { |
| | | |
| | | @Autowired |
| | | private IDeviceMetricService deviceMetricService; |
| | | |
| | | @PostMapping("/saveOrUpdateDeviceMetric") |
| | | public Result create(@RequestBody DeviceMetric deviceMetric) { |
| | | return Result.success(deviceMetricService.saveOrUpdate(deviceMetric)); |
| | | } |
| | | |
| | | @GetMapping("/selectDeviceMetric") |
| | | public Result read(@RequestParam("deviceId") Integer deviceId, @RequestParam("type") String type) { |
| | | return Result.success(deviceMetricService.list(Wrappers.<DeviceMetric>lambdaQuery() |
| | | .eq(DeviceMetric::getDeviceId,deviceId) |
| | | .eq(DeviceMetric::getType,type))); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDeviceMetrics") |
| | | public Result delete(@RequestParam("id") Integer id) { |
| | | return Result.success(deviceMetricService.removeById(id)); |
| | | } |
| | | } |
| | |
| | | return Result.success(deviceStateService.removeById(stateId)); |
| | | } |
| | | |
| | | @PostMapping("/deviceStateExport") |
| | | @GetMapping("/deviceStateExport") |
| | | public Result deviceStateExport(@RequestParam("deviceId") Integer deviceId, String processNumber, HttpServletResponse response) throws Exception { |
| | | IPage<DeviceStateDto> deviceBorrows = deviceStateService.getDeviceStatePage(deviceId, new Page<>(1, -1), processNumber); |
| | | IPage<DeviceStateDto> deviceBorrows = deviceStateService.getDeviceStatePage(deviceId, new Page<>(-1, -1), processNumber); |
| | | List<DeviceStateExport> studentList = JSONObject.parseArray(JSON.toJSONString(deviceBorrows.getRecords()), DeviceStateExport.class); |
| | | response.setHeader("requestType", "excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceInspectionRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * @param queryWrappers |
| | | * @return |
| | | */ |
| | | IPage<DeviceInspectionRecord> selectDeviceParameterPage(IPage page, @Param("ew") QueryWrapper<DeviceInspectionRecordDto> queryWrappers); |
| | | IPage<DeviceInspectionRecord> selectDeviceParameterPage(Page page, @Param("ew") QueryWrapper<DeviceInspectionRecordDto> queryWrappers); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.DeviceMetric; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceMetricMapper extends BaseMapper<DeviceMetric> { |
| | | } |
| | |
| | | import com.ruoyi.device.pojo.DeviceInstruction; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ Mapper æ¥å£ |
| | |
| | | public interface InstructionMapper extends BaseMapper<DeviceInstruction> { |
| | | |
| | | |
| | | IPage<DeviceInstruction> pageByPageQueryOfHomeworkInstructions(Page page, @Param("ew") QueryWrapper<DeviceOperationInstructionDto> ew); |
| | | IPage<DeviceOperationInstructionDto> pageByPageQueryOfHomeworkInstructions(Page page, @Param("ew") QueryWrapper<DeviceOperationInstructionDto> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("device_metrics") |
| | | public class DeviceMetric implements Serializable { |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; //id |
| | | private Integer deviceId; // 设å¤ID |
| | | private String measurementParameter; // 计éåæ° |
| | | private String rangeOfMeasurement; // éç¨èå´ |
| | | private String maxPermissibleError; // æå¤§å
许误差 |
| | | private String judgmentCriteria; // å¤å®æ å |
| | | private String createdBy; // å建人 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime creationTime; // å建æ¶é´ |
| | | |
| | | @ApiModelProperty("calibrateï¼æ ¡åï¼examineï¼æ ¸æ¥") |
| | | private String type; // ç±»å |
| | | } |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceInspectionRecordDto; |
| | |
| | | * å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | | * @param page |
| | | */ |
| | | Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(IPage page, DeviceInspectionRecordDto deviceInspectionRecord); |
| | | Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(Page page, DeviceInspectionRecordDto deviceInspectionRecord); |
| | | |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.device.dto.DeviceOperationInstructionDto; |
| | | import com.ruoyi.device.pojo.DeviceInstruction; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ æå¡ç±» |
| | |
| | | */ |
| | | public interface DeviceInstructionService extends IService<DeviceInstruction> { |
| | | |
| | | IPage<DeviceInstruction> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto); |
| | | IPage<DeviceOperationInstructionDto> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto); |
| | | |
| | | void newHomeworkGuidebookAdded(DeviceInstructionDto instructionDto); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceMetric; |
| | | |
| | | public interface IDeviceMetricService extends IService<DeviceMetric> { |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | |
| | | private DeviceMapper deviceMapper; |
| | | @Resource |
| | | private DeviceInspectionRecordDetailsService deviceInspectionRecordDetailsService; |
| | | @Resource |
| | | private DeviceInspectionRecordMapper deviceInspectionRecordMapper; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | |
| | | * @param page å½å页ç |
| | | */ |
| | | @Override |
| | | public Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(IPage page, DeviceInspectionRecordDto deviceInspectionRecordDto) { |
| | | IPage<DeviceInspectionRecord> iPage = baseMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(deviceInspectionRecordDto)); |
| | | public Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(Page page, DeviceInspectionRecordDto deviceInspectionRecordDto) { |
| | | IPage<DeviceInspectionRecord> iPage = deviceInspectionRecordMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(deviceInspectionRecordDto)); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private NumberGenerator<DeviceInstruction> numberGenerator; |
| | | |
| | | @Override |
| | | public IPage<DeviceInstruction> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto) { |
| | | public IPage<DeviceOperationInstructionDto> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto) { |
| | | return baseMapper.pageByPageQueryOfHomeworkInstructions(page, QueryWrappers.queryWrappers(operationInstructionDto)); |
| | | } |
| | | |
| | |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.service.DeviceMaintenanceService; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Override |
| | | public IPage<DeviceMaintenance> getDeviceMaintenancePage(Page page, Integer deviceId, String deviceNumber) { |
| | | return baseMapper.selectPage(page, Wrappers.<DeviceMaintenance>lambdaQuery() |
| | | if (ObjectUtils.isEmpty(deviceNumber)){ |
| | | return baseMapper.selectPage(page, Wrappers.<DeviceMaintenance>lambdaQuery() |
| | | .eq(DeviceMaintenance::getDeviceId, deviceId)); |
| | | } |
| | | else return baseMapper.selectPage(page, Wrappers.<DeviceMaintenance>lambdaQuery() |
| | | .eq(DeviceMaintenance::getDeviceId, deviceId) |
| | | .like(DeviceMaintenance::getDeviceNumber, deviceNumber)); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceMetricMapper; |
| | | import com.ruoyi.device.pojo.DeviceMetric; |
| | | import com.ruoyi.device.service.IDeviceMetricService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class DeviceMetricServiceImpl extends ServiceImpl<DeviceMetricMapper, DeviceMetric> implements IDeviceMetricService { |
| | | } |
| | |
| | | |
| | | |
| | | <select id="selectDeviceParameterPage" resultType="com.ruoyi.device.pojo.DeviceInspectionRecord"> |
| | | SELECT |
| | | * |
| | | from device_inspection_record |
| | | select * from ( SELECT * |
| | | from device_inspection_record ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectMaintenancePlanById" resultType="com.ruoyi.device.pojo.DeviceMaintenancePlan"> |
| | | <select id="selectMaintenancePlanById" resultType="com.ruoyi.device.dto.DeviceMaintenancePlanDto"> |
| | | select |
| | | dmp.*, |
| | | date_format(dmp.date_preparation, '%Y-%m-%d') as datePreparationStr, |
| | |
| | | <?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.device.mapper.InstructionMapper"> |
| | | |
| | | |
| | | <select id="pageByPageQueryOfHomeworkInstructions" resultType="com.ruoyi.device.pojo.DeviceInstruction"> |
| | | <select id="pageByPageQueryOfHomeworkInstructions" resultType="com.ruoyi.device.dto.DeviceOperationInstructionDto"> |
| | | SELECT |
| | | doi.*,di.*,d.device_name, d.management_number device_number, d.specification_model device_model, u.name uploader_name, u1.name approver_name |
| | | doi.*,di.*, |
| | | d.device_name deviceName, |
| | | d.management_number deviceNumber, |
| | | d.specification_model deviceModel, |
| | | u.name uploaderName, |
| | | u1.name approverName |
| | | FROM |
| | | device_operation_instruction doi |
| | | LEFT JOIN device_instruction di ON di.id = doi.instruction_id |
| | | left join device d on d.id = doi.device_id |
| | | left join user u on u.id = doi.uploader |
| | | left join user u1 on u1.id = doi.approver_id |
| | | device_operation_instruction doi |
| | | LEFT JOIN device_instruction di ON di.id = doi.instruction_id |
| | | left join device d on d.id = doi.device_id |
| | | left join user u on u.id = doi.uploader |
| | | left join user u1 on u1.id = doi.approver_id |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.mock.web.MockMultipartFile; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private InsOrderFactoryVerifyMapper insOrderFactoryVerifyMapper; |
| | | @Resource |
| | | private InsOrderFactoryVerifyItemService insOrderFactoryVerifyItemService; |
| | | @Value("${file.licenseUrl}") |
| | | private String licenseUrl; |
| | | |
| | | @Resource |
| | | private SpotCheckQuarterItemMapper spotCheckQuarterItemMapper; |
| | | @Resource |
| | |
| | | FileOutputStream os = null; |
| | | try { |
| | | //åè¯ ä¸ç¶åæ¢åææ°´å° |
| | | InputStream is = Files.newInputStream(new File(licenseUrl).toPath()); |
| | | InputStream is = new ClassPathResource("/lib/license.xml").getInputStream(); |
| | | License license = new License(); |
| | | license.setLicense(is); |
| | | if (!license.getIsLicensed()) { |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private String wordUrl; |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | @Value("${file.licenseUrl}") |
| | | private String licenseUrl; |
| | | |
| | | @Resource |
| | | private InsOrderMapper insOrderMapper; |
| | | @Resource |
| | |
| | | FileOutputStream os = null; |
| | | try { |
| | | //åè¯ ä¸ç¶åæ¢åææ°´å° |
| | | InputStream is = Files.newInputStream(new File(licenseUrl).toPath()); |
| | | InputStream is = new ClassPathResource("/lib/license.xml").getInputStream(); |
| | | License license = new License(); |
| | | license.setLicense(is); |
| | | if (!license.getIsLicensed()) { |
| | |
| | | FileOutputStream os = null; |
| | | try { |
| | | //åè¯ ä¸ç¶åæ¢åææ°´å° |
| | | InputStream is = Files.newInputStream(new File(licenseUrl).toPath()); |
| | | InputStream is = new ClassPathResource("/lib/license.xml").getInputStream(); |
| | | License license = new License(); |
| | | license.setLicense(is); |
| | | if (!license.getIsLicensed()) { |
| | |
| | | # ç
§çåå¨è·¯å¾+++++++++++++++++++++++++++è¿ç»´éè¦é
ç½®+++++++++++++++++++++++++++ |
| | | file: |
| | | path: D:\é¡¹ç®æä»¶åå¨\image |
| | | # 转pdfæä»¶è·¯å¾ |
| | | licenseUrl: D:\20892\Desktop\lims\code\center-lims-after\inspect-server\src\main\resources\lib\license.xml |
| | | # ä¸ä¼ æä»¶å
è®¸çæ©å±å |
| | | allowed: png,jpg,jpeg,gif |
| | | |
| | | wordUrl: D:\é¡¹ç®æä»¶åå¨\word |
| | | twoCode: D:\é¡¹ç®æä»¶åå¨\two_code |
| | | outPath: D:\é¡¹ç®æä»¶åå¨\image |
| | | |
| | | |
| | | #oa: |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://114.132.189.42:9004/lims-ruoyi-test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 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 |
| | | |
| | | |
| | | minio: |
| | | endpoint: http://114.132.189.42/ |
| | | port: 7019 |
| | | secure: false |
| | | accessKey: admin |
| | | secretKey: 12345678 |
| | | preview-expiry: 24 # é¢è§å°åé»è®¤24å°æ¶ |
| | | |
| | | # ç
§çåå¨è·¯å¾+++++++++++++++++++++++++++è¿ç»´éè¦é
ç½®+++++++++++++++++++++++++++ |
| | | file: |
| | | path: /javaWork/lims-ruoyi/file/img |
| | | # ä¸ä¼ æä»¶å
è®¸çæ©å±å |
| | | allowed: png,jpg,jpeg,gif |
| | | |
| | | wordUrl: /javaWork/lims-ruoyi/file/word |
| | | twoCode: /javaWork/lims-ruoyi/file/two_code |
| | | |
| | | |
| | | #oa: |
| | | # oaHost: http://192.168.0.49:8000/oa_workflowrequest.asmx?wsdl |
| | | # prodIp: http://192.168.21.53:8081 |
| | | # unqualifiedProcessId: 41974 |
| | | |
| | | wechat: |
| | | # è´¨éæ¥æ£éç¥ |
| | | examiningUrl: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=21993616-9966-4fe4-81b0-68e99a40c964 |
| | | |
| | | ifs: |
| | | contract: ZTZB |
| | | contract-key-get: 4ttDeLKNsZuhstjtROMcRE1USNFXKdFYE7lQ2p1m5Bo= |
| | | contract-key-post: 4ttDeLKNsZuhstjtROMcRE1USNFXKdFYE7lQ2p1m5Bo= |
| | | custorder: http://192.168.20.47/PurchService.ashx? |
| | | custorder-port: http://192.168.20.47:8008/PurchService.ashx? |
| | | erp-services: http://192.168.20.47:8081 |
| | | |
| | | # 夿³¨ 18083å¯ç ï¼zttZTT123!@ |
| | | mqtt: |
| | | url: tcp://mqtt-ztt.zttiot.com:1883 # æå¡å¨ip |
| | | username: forwarder # MQTT-æå¡ç«¯-ç¨æ·å,åæä¼ä¿®æ¹ä¸ºç¨æ·ç»å½å |
| | | password: ZTlink12345 # MQTT-æå¡ç«¯-å¯ç ï¼,åæä¼ä¿®æ¹ä¸ºç¨æ·ç»å½å¯ç |
| | | timeout: 100 # è¶
æ¶æ¶é´ ï¼åä½ï¼ç§ï¼ |
| | | keepalive: 60 # å¿è·³ ï¼åä½ï¼ç§ï¼ |
| | | qos: 1 # å¿è·³å
çº§å« |
| | | completion-timeout: 3000 # è¿æ¥è¶
æ¶æ¶é´ï¼åä½ï¼ç§ï¼ |
| | | clientId: javaPublish # clientId |
| | | subscribe: /ztt/v3/2443521/publish # 订é
ä¸»é¢ |
| | | client: false # 妿å¼åéè¦å¯å¨æµè¯ï¼éè¦æ¹ä¸ºfalseä¸ç¶ä¼ä¸ç´æ¥é |
| | |
| | | # çæå¹´ä»½ |
| | | copyrightYear: 2025 |
| | | # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/uploadPathï¼Linuxé
ç½® /home/ruoyi/uploadPathï¼ |
| | | profile: D:/ruoyi/uploadPath |
| | | profile: /javaWork/lims-ruoyi/file/uploadPath |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ |
| | |
| | | |
| | | # æ¥å¿é
ç½® |
| | | logging: |
| | | file-location: /javaWork/lims-ruoyi |
| | | level: |
| | | com.ruoyi: debug |
| | | com.ruoyi: info |
| | | org.springframework: warn |
| | | |
| | | # ç¨æ·é
ç½® |
| | |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: 123456 |
| | | # # å¯ç |
| | | # password: root2022! |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <configuration> |
| | | <!-- æ¥å¿åæ¾è·¯å¾ --> |
| | | <property name="log.path" value="/home/ruoyi/logs" /> |
| | | <springProperty scope="context" name="logs" source="logging.file-location" default="/logs"/> |
| | | <property name="log.path" value="logs"/> |
| | | |
| | | <!-- æ¥å¿è¾åºæ ¼å¼ --> |
| | | <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" /> |
| | | |
| | |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | </appender> |
| | | |
| | | |
| | | <!-- ç³»ç»æ¥å¿è¾åº --> |
| | | <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.path}/sys-info.log</file> |
| | |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | |
| | | <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.path}/sys-error.log</file> |
| | | <!-- å¾ªç¯æ¿çï¼åºäºæ¶é´å建æ¥å¿æä»¶ --> |
| | |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <!-- ç¨æ·è®¿é®æ¥å¿è¾åº --> |
| | | <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.path}/sys-user.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <!-- æå¤©åæ» daily --> |
| | | <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern> |
| | | <!-- æ¥å¿æå¤§çåå² 60天 --> |
| | | <maxHistory>60</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | </appender> |
| | | |
| | | <!-- ç³»ç»æ¨¡åæ¥å¿çº§å«æ§å¶ --> |
| | | <logger name="com.ruoyi" level="info" /> |
| | | <!-- Springæ¥å¿çº§å«æ§å¶ --> |
| | | <logger name="org.springframework" level="warn" /> |
| | | |
| | | <!-- ç³»ç»æ¨¡åæ¥å¿çº§å«æ§å¶ --> |
| | | <logger name="com.ruoyi" level="info" /> |
| | | <!-- Springæ¥å¿çº§å«æ§å¶ --> |
| | | <logger name="org.springframework" level="warn" /> |
| | | |
| | | <root level="info"> |
| | | <appender-ref ref="console" /> |
| | | </root> |
| | | |
| | | |
| | | <!--ç³»ç»æä½æ¥å¿--> |
| | | <root level="info"> |
| | | <appender-ref ref="file_info" /> |
| | | <appender-ref ref="file_error" /> |
| | | </root> |
| | | |
| | | <!--ç³»ç»ç¨æ·æä½æ¥å¿--> |
| | | <logger name="sys-user" level="info"> |
| | | <appender-ref ref="sys-user"/> |
| | | </logger> |
| | | </configuration> |
| | | </configuration> |
| | |
| | | package com.ruoyi.framework.config; |
| | | |
| | | import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; |
| | | import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | |
| | | @Configuration |
| | | public class LocalDateTimeSerializerConfig { |
| | | @Value("${spring.jackson.date-format}") |
| | | private String pattern; |
| | | |
| | | @Bean |
| | | public LocalDateTimeSerializer localDateTimeSerializer() { |
| | | return new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(pattern)); |
| | | } |
| | | |
| | | @Bean |
| | | public LocalDateTimeDeserializer localDateTimeDeserializer() { |
| | | return new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(pattern)); |
| | | } |
| | | |
| | | @Bean |
| | | public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() { |
| | | return builder -> { |
| | | builder.serializerByType(LocalDateTime.class, localDateTimeSerializer()); |
| | | builder.deserializerByType(LocalDateTime.class, localDateTimeDeserializer()); |
| | | builder.simpleDateFormat(pattern); |
| | | }; |
| | | } |
| | | } |
| | | //package com.ruoyi.framework.config; |
| | | // |
| | | //import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; |
| | | //import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; |
| | | //import org.springframework.beans.factory.annotation.Value; |
| | | //import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; |
| | | //import org.springframework.context.annotation.Bean; |
| | | //import org.springframework.context.annotation.Configuration; |
| | | // |
| | | //import java.time.LocalDateTime; |
| | | //import java.time.format.DateTimeFormatter; |
| | | // |
| | | //@Configuration |
| | | //public class LocalDateTimeSerializerConfig { |
| | | // @Value("${spring.jackson.date-format}") |
| | | // private String pattern; |
| | | // |
| | | // @Bean |
| | | // public LocalDateTimeSerializer localDateTimeSerializer() { |
| | | // return new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(pattern)); |
| | | // } |
| | | // |
| | | // @Bean |
| | | // public LocalDateTimeDeserializer localDateTimeDeserializer() { |
| | | // return new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(pattern)); |
| | | // } |
| | | // |
| | | // @Bean |
| | | // public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() { |
| | | // return builder -> { |
| | | // builder.serializerByType(LocalDateTime.class, localDateTimeSerializer()); |
| | | // builder.deserializerByType(LocalDateTime.class, localDateTimeDeserializer()); |
| | | // builder.simpleDateFormat(pattern); |
| | | // }; |
| | | // } |
| | | //} |
| | |
| | | package com.ruoyi.framework.config; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import com.fasterxml.jackson.databind.DeserializationFeature; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.databind.SerializationFeature; |
| | | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; |
| | | import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; |
| | | import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.http.CacheControl; |
| | | import org.springframework.http.converter.HttpMessageConverter; |
| | | import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; |
| | | import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; |
| | | import org.springframework.web.cors.CorsConfiguration; |
| | | import org.springframework.web.cors.UrlBasedCorsConfigurationSource; |
| | | import org.springframework.web.filter.CorsFilter; |
| | |
| | | @Value("${file.path}") |
| | | private String filePath; |
| | | |
| | | @Value("${outPath}") |
| | | private String outPath; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | |
| | | |
| | | //设置æä»¶èæè·¯å¾æ å° |
| | | registry.addResourceHandler("/img/**").addResourceLocations("file:" + filePath + "/"); |
| | | registry.addResourceHandler("/outPath/**").addResourceLocations("file:" + outPath); |
| | | registry.addResourceHandler("/word/**").addResourceLocations("file:" + wordUrl + "/"); |
| | | } |
| | | |
| | |
| | | // è¿åæ°çCorsFilter |
| | | return new CorsFilter(source); |
| | | } |
| | | |
| | | // å
¨å±æ ¼å¼åå¤ç |
| | | @Override |
| | | public void extendMessageConverters(List<HttpMessageConverter<?>> converters) { |
| | | String dateFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | |
| | | Jackson2ObjectMapperBuilder json = Jackson2ObjectMapperBuilder.json(); |
| | | MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); |
| | | |
| | | //localDateTimeæ ¼å¼å |
| | | JavaTimeModule module = new JavaTimeModule(); |
| | | LocalDateTimeDeserializer dateTimeDeserializer = new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(dateFormat)); |
| | | LocalDateTimeSerializer dateTimeSerializer = new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(dateFormat)); |
| | | module.addDeserializer(LocalDateTime.class, dateTimeDeserializer); |
| | | module.addSerializer(LocalDateTime.class, dateTimeSerializer); |
| | | ObjectMapper objectMapper = json.modules(module) |
| | | .featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS).build(); |
| | | |
| | | //dateæ¶é´æ ¼å¼å |
| | | objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
| | | objectMapper.setDateFormat(new SimpleDateFormat(dateFormat.split(" ")[0])); |
| | | |
| | | // è®¾ç½®æ ¼å¼åå
容 |
| | | converter.setObjectMapper(objectMapper); |
| | | converters.add(0, converter); |
| | | } |
| | | } |
| | |
| | | // 对äºç»å½login 注åregister éªè¯ç captchaImage å
许å¿åè®¿é® |
| | | requests.antMatchers("/login", "/register", "/captchaImage").permitAll() |
| | | // éæèµæºï¼å¯å¿åè®¿é® |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**", "/img/**", "/outPath/**", "/word/**").permitAll() |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**", "/img/**", "/word/**").permitAll() |
| | | .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() |
| | | // é¤ä¸é¢å¤çææè¯·æ±å
¨é¨éè¦é´æè®¤è¯ |
| | | .anyRequest().authenticated(); |