zss
2025-03-04 c4d2be35ce4c31362b2f9aead4455e6a3c7ad27d
设备问题修改
已修改15个文件
95 ■■■■■ 文件已修改
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceInspectionRecordController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceInstructionController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceStateController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/mapper/DeviceInspectionRecordMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/mapper/InstructionMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/service/DeviceInspectionRecordService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/service/DeviceInstructionService.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceInspectionRecordServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceInstructionServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceMaintenanceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/resources/mapper/DeviceInspectionRecordMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/resources/mapper/InstructionMapper.xml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceInspectionRecordController.java
@@ -35,7 +35,7 @@
     */
    @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);
    }
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceInstructionController.java
@@ -41,9 +41,9 @@
    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));
    }
@@ -54,7 +54,7 @@
        return Result.success();
    }
    @ApiOperation(value = "作业指导书编辑")
    @ApiOperation(value = "作业指导书详情")
    @GetMapping("/homeworkGuidebookEditor")
    public Result<Map<String, Object>> homeworkGuidebookEditor(Integer instructionId){
        DeviceInstruction instruction = deviceInstructionService.getById(instructionId);
@@ -66,7 +66,7 @@
    }
    @ApiOperation(value = "作业指导书受控文件删除")
    @GetMapping("/deleteHomeworkGuidebook")
    @DeleteMapping("/deleteHomeworkGuidebook")
    public Result deleteHomeworkGuidebook(String ids){
        if (ObjectUtils.isNotEmpty(ids)) {
            String[] idArray = ids.split(",");
@@ -76,7 +76,7 @@
    }
    @ApiOperation(value = "作业指导书删除")
    @GetMapping("/homeworkGuidebook")
    @DeleteMapping("/homeworkGuidebook")
    public Result homeworkGuidebook(String id, String instructionId){
        // 删除子表数据
        deviceOperationInstructionService.removeById(id);
@@ -91,8 +91,10 @@
    }
    @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)
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java
@@ -71,7 +71,7 @@
     */
    @ApiOperation(value = "新增设备维护保养")
    @DeleteMapping("/deleteDeviceMaintenance")
    public void deleteDeviceMaintenance(@PathVariable Integer id) {
    public void deleteDeviceMaintenance( Integer id) {
        deviceMaintenanceService.removeById(id);
    }
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceStateController.java
@@ -63,9 +63,9 @@
        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");
cnas-device/src/main/java/com/ruoyi/device/mapper/DeviceInspectionRecordMapper.java
@@ -3,6 +3,7 @@
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;
@@ -23,6 +24,6 @@
     * @param queryWrappers
     * @return
     */
    IPage<DeviceInspectionRecord> selectDeviceParameterPage(IPage page, @Param("ew") QueryWrapper<DeviceInspectionRecordDto> queryWrappers);
    IPage<DeviceInspectionRecord> selectDeviceParameterPage(Page page, @Param("ew") QueryWrapper<DeviceInspectionRecordDto> queryWrappers);
}
cnas-device/src/main/java/com/ruoyi/device/mapper/InstructionMapper.java
@@ -8,6 +8,8 @@
import com.ruoyi.device.pojo.DeviceInstruction;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
/**
 * <p>
 * 作业指导书添加受控文件表 Mapper 接口
@@ -19,5 +21,5 @@
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);
}
cnas-device/src/main/java/com/ruoyi/device/service/DeviceInspectionRecordService.java
@@ -1,6 +1,7 @@
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;
@@ -22,7 +23,7 @@
     * 分页查询设备点检记录
     * @param page
     */
    Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(IPage page, DeviceInspectionRecordDto deviceInspectionRecord);
    Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(Page page, DeviceInspectionRecordDto deviceInspectionRecord);
    /**
cnas-device/src/main/java/com/ruoyi/device/service/DeviceInstructionService.java
@@ -7,6 +7,8 @@
import com.ruoyi.device.dto.DeviceOperationInstructionDto;
import com.ruoyi.device.pojo.DeviceInstruction;
import java.util.Map;
/**
 * <p>
 * 作业指导书添加受控文件表 服务类
@@ -17,7 +19,7 @@
 */
public interface DeviceInstructionService extends IService<DeviceInstruction> {
    IPage<DeviceInstruction> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto);
    IPage<DeviceOperationInstructionDto> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto);
    void newHomeworkGuidebookAdded(DeviceInstructionDto instructionDto);
}
cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceInspectionRecordServiceImpl.java
@@ -4,6 +4,7 @@
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;
@@ -52,6 +53,8 @@
    private DeviceMapper deviceMapper;
    @Resource
    private DeviceInspectionRecordDetailsService deviceInspectionRecordDetailsService;
    @Resource
    private DeviceInspectionRecordMapper deviceInspectionRecordMapper;
    /**
     * 分页查询设备点检记录
@@ -59,8 +62,8 @@
     * @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);
    }
cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceInstructionServiceImpl.java
@@ -21,6 +21,7 @@
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
/**
 * <p>
@@ -41,7 +42,7 @@
    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));
    }
cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceMaintenanceImpl.java
@@ -12,6 +12,7 @@
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;
@@ -27,7 +28,11 @@
    @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));
    }
cnas-device/src/main/resources/mapper/DeviceInspectionRecordMapper.xml
@@ -4,9 +4,8 @@
    <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>
cnas-device/src/main/resources/mapper/InstructionMapper.xml
@@ -1,17 +1,20 @@
<?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>
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -55,6 +55,7 @@
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;
@@ -141,8 +142,7 @@
    private InsOrderFactoryVerifyMapper insOrderFactoryVerifyMapper;
    @Resource
    private InsOrderFactoryVerifyItemService insOrderFactoryVerifyItemService;
    @Value("${file.licenseUrl}")
    private String licenseUrl;
    @Resource
    private SpotCheckQuarterItemMapper spotCheckQuarterItemMapper;
    @Resource
@@ -4227,7 +4227,7 @@
        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()) {
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
@@ -39,6 +39,7 @@
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;
@@ -83,8 +84,7 @@
    private String wordUrl;
    @Value("${file.path}")
    private String imgUrl;
    @Value("${file.licenseUrl}")
    private String licenseUrl;
    @Resource
    private InsOrderMapper insOrderMapper;
    @Resource
@@ -676,7 +676,7 @@
        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()) {
@@ -1115,7 +1115,7 @@
        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()) {