a5a5124dec9cc40c4dfcd1cce7373703feda5175..d5ae8cf83c4b5babb532870be80aef82c3059bd4
2026-08-28 gongchunyi
feat: 质检不合格详情接口
d5ae8c 对比 | 目录
2026-08-28 gongchunyi
fix: 操作日志根据操作时间倒序
280261 对比 | 目录
2026-08-28 gongchunyi
fix: 入库记录修改为批号倒序
9e300f 对比 | 目录
已修改7个文件
54 ■■■■■ 文件已修改
src/main/java/com/ruoyi/quality/controller/QualityUnqualifiedController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/quality/pojo/QualityUnqualified.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/quality/service/IQualityUnqualifiedService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/quality/service/impl/QualityUnqualifiedServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/monitor/SysOperLogMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/production/ProductionPlanMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/quality/QualityUnqualifiedMapper.xml 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/quality/controller/QualityUnqualifiedController.java
@@ -70,6 +70,18 @@
    }
    /**
     * 不合格管理详情
     * @param id
     * @return
     */
    @GetMapping("/detail/{id}")
    @Operation(summary = "不合格管理详情")
    @Log(title = "不合格管理详情", businessType = BusinessType.OTHER)
    public R<?> QualityUnqualifiedFullDetail(@PathVariable("id") Integer id) {
        return R.ok(qualityUnqualifiedService.getUnqualifiedDetail(id));
    }
    /**
     * 不合格管理修改
     * @param qualityUnqualified
     * @return
src/main/java/com/ruoyi/quality/pojo/QualityUnqualified.java
@@ -146,4 +146,10 @@
    @Schema(description = "关联产品型号id")
    private Long productModelId;
    @TableField(exist = false)
    private String process;
    @TableField(exist = false)
    private String checkCompany;
}
src/main/java/com/ruoyi/quality/service/IQualityUnqualifiedService.java
@@ -18,4 +18,6 @@
    int deal(QualityUnqualified qualityUnqualified);
    QualityUnqualified getUnqualified(Integer id);
    QualityUnqualified getUnqualifiedDetail(Integer id);
}
src/main/java/com/ruoyi/quality/service/impl/QualityUnqualifiedServiceImpl.java
@@ -112,6 +112,19 @@
        return qualityUnqualifiedMapper.getUnqualified(id);
    }
    @Override
    public QualityUnqualified getUnqualifiedDetail(Integer id) {
        QualityUnqualified res = qualityUnqualifiedMapper.getUnqualified(id);
        if (res != null && res.getInspectId() != null) {
            QualityInspect inspect = qualityInspectService.getById(res.getInspectId());
            if (inspect != null) {
                res.setProcess(inspect.getProcess());
                res.setCheckCompany(inspect.getCheckCompany());
            }
        }
        return res;
    }
    private void createReworkProductionByNewModel(ProductionProductMain sourceMain, BigDecimal quantity) {
        ProductionOperationTask sourceTask = productionOperationTaskMapper.selectById(sourceMain.getProductionOperationTaskId());
        if (sourceTask == null) {
src/main/resources/mapper/monitor/SysOperLogMapper.xml
@@ -28,12 +28,12 @@
        select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time
        from sys_oper_log
    </sql>
    <insert id="insertOperlog" parameterType="com.ruoyi.project.monitor.domain.SysOperLog">
        insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time)
        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate())
    </insert>
    <select id="selectOperLogList" parameterType="com.ruoyi.project.monitor.domain.SysOperLog" resultMap="SysOperLogResult">
        <include refid="selectOperLogVo"/>
        <where>
@@ -50,7 +50,7 @@
                AND business_type in
                <foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
                     #{businessType}
                </foreach>
                </foreach>
            </if>
            <if test="status != null">
                AND status = #{status}
@@ -65,23 +65,23 @@
                AND oper_time &lt;= #{params.endTime}
            </if>
        </where>
        order by oper_id desc
        order by oper_time desc
    </select>
    <delete id="deleteOperLogByIds" parameterType="Long">
         delete from sys_oper_log where oper_id in
         <foreach collection="array" item="operId" open="(" separator="," close=")">
             #{operId}
        </foreach>
        </foreach>
     </delete>
     <select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult">
        <include refid="selectOperLogVo"/>
        where oper_id = #{operId}
    </select>
    <update id="cleanOperLog">
        truncate table sys_oper_log
    </update>
</mapper>
</mapper>
src/main/resources/mapper/production/ProductionPlanMapper.xml
@@ -58,7 +58,7 @@
                </if>
            </if>
        </where>
        ORDER BY pp.required_date DESC
        ORDER BY pp.mps_no DESC
    </select>
    <select id="selectWithMaterialByIds" resultType="com.ruoyi.production.bean.dto.ProductionPlanDto">
src/main/resources/mapper/quality/QualityUnqualifiedMapper.xml
@@ -65,6 +65,7 @@
    <select id="getUnqualified" resultType="com.ruoyi.quality.pojo.QualityUnqualified">
        SELECT
            qu.id,
            qu.inspect_id,
            qu.inspect_type,
            qu.inspect_state,
            qu.check_time,