linwei
2024-01-17 687f224f099d08f9d7a5d908570d28e5d8b7e7c6
物业评分+bug修复
6 files modified
10 files added
657 ■■■■■ changed files
src/main/java/org/springblade/modules/answerRecord/controller/AnswerRecordController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/answerRecord/dto/AnswerRecordDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/answerRecord/entity/AnswerRecordEntity.java 114 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/answerRecord/mapper/AnswerRecordMapper.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/answerRecord/mapper/AnswerRecordMapper.xml 66 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/answerRecord/service/IAnswerRecordService.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/answerRecord/service/impl/AnswerRecordServiceImpl.java 67 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/answerRecord/vo/AnswerRecordVO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/answerRecord/wrapper/AnswerRecordWrapper.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.xml 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskReportForRepairsController.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.java 3 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml 14 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskReportForRepairsService.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java 4 ●●●● patch | view | raw | blame | history
src/main/java/sql/answerrecord.menu.sql 10 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/answerRecord/controller/AnswerRecordController.java
New file
@@ -0,0 +1,126 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.answerRecord.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
import org.springblade.modules.answerRecord.service.IAnswerRecordService;
import org.springblade.modules.answerRecord.vo.AnswerRecordVO;
import org.springblade.modules.answerRecord.wrapper.AnswerRecordWrapper;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
 * 答题记录表 控制器
 *
 * @author BladeX
 * @since 2024-01-17
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-answerRecord/answerRecord")
@Api(value = "答题记录表", tags = "答题记录表接口")
public class AnswerRecordController extends BladeController {
    private final IAnswerRecordService answerRecordService;
    /**
     * 答题记录表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入answerRecord")
    public R<AnswerRecordVO> detail(AnswerRecordEntity answerRecord) {
        AnswerRecordEntity detail = answerRecordService.getOne(Condition.getQueryWrapper(answerRecord));
        return R.data(AnswerRecordWrapper.build().entityVO(detail));
    }
    /**
     * 答题记录表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入answerRecord")
    public R<IPage<AnswerRecordVO>> list(AnswerRecordEntity answerRecord, Query query) {
        IPage<AnswerRecordEntity> pages = answerRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(answerRecord));
        return R.data(AnswerRecordWrapper.build().pageVO(pages));
    }
    /**
     * 答题记录表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入answerRecord")
    public R<IPage<AnswerRecordVO>> page(AnswerRecordVO answerRecord, Query query) {
        IPage<AnswerRecordVO> pages = answerRecordService.selectAnswerRecordPage(Condition.getPage(query), answerRecord);
        return R.data(pages);
    }
    /**
     * 答题记录表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入answerRecord")
    public R save(@Valid @RequestBody AnswerRecordEntity answerRecord) {
        return R.status(answerRecordService.save(answerRecord));
    }
    /**
     * 答题记录表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入answerRecord")
    public R update(@Valid @RequestBody AnswerRecordEntity answerRecord) {
        return R.status(answerRecordService.updateById(answerRecord));
    }
    /**
     * 答题记录表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入answerRecord")
    public R submit(@Valid @RequestBody AnswerRecordEntity answerRecord) {
        return R.status(answerRecordService.saveOrUpdate(answerRecord));
    }
    /**
     * 答题记录表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(answerRecordService.removeBatchByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/answerRecord/dto/AnswerRecordDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.answerRecord.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
/**
 * 答题记录表 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-01-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AnswerRecordDTO extends AnswerRecordEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/answerRecord/entity/AnswerRecordEntity.java
New file
@@ -0,0 +1,114 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.answerRecord.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * 答题记录表 实体类
 *
 * @author BladeX
 * @since 2024-01-17
 */
@Data
@TableName("jczz_answer_record")
@ApiModel(value = "AnswerRecord对象", description = "答题记录表")
public class AnswerRecordEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 题目id
     */
    @ApiModelProperty(value = "题目id", example = "")
    @TableField("subject_choices_id")
    private Long subjectChoicesId;
    /**
     * 题目类型 0:单选题  1:多选题  2:判断题  3:填空题(排序填空)
     */
    @ApiModelProperty(value = "题目类型 0:单选题  1:多选题  2:判断题  3:填空题(排序填空)", example = "")
    @TableField("subject_choices_type")
    private Integer subjectChoicesType;
    /**
     * 选项id
     */
    @ApiModelProperty(value = "选项id", example = "")
    @TableField("subject_option_id")
    private Long subjectOptionId;
    /**
     * 提交的选项id
     */
    @ApiModelProperty(value = "提交的选项id", example = "")
    @TableField("answer_option")
    private String answerOption;
    /**
     * 本题得分
     */
    @ApiModelProperty(value = "本题得分", example = "")
    @TableField("answer_score")
    private Integer answerScore;
    /**
     * 物业Id
     */
    @ApiModelProperty(value = "物业Id", example = "")
    @TableField("property_id")
    private Long propertyId;
    /**
     * 成绩id
     */
    @ApiModelProperty(value = "成绩id", example = "")
    @TableField("score_id")
    private Long scoreId;
    /**
     * 答案
     */
    @ApiModelProperty(value = "答案", example = "")
    @TableField("answer")
    private Integer answer;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;
}
src/main/java/org/springblade/modules/answerRecord/mapper/AnswerRecordMapper.java
New file
@@ -0,0 +1,60 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.answerRecord.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.answerRecord.dto.AnswerRecordDTO;
import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
import org.springblade.modules.answerRecord.vo.AnswerRecordVO;
import java.util.List;
/**
 * 答题记录表 Mapper 接口
 *
 * @author BladeX
 * @since 2024-01-17
 */
public interface AnswerRecordMapper extends BaseMapper<AnswerRecordEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param answerRecord
     * @return
     */
    List<AnswerRecordVO> selectAnswerRecordPage(IPage page, AnswerRecordVO answerRecord);
    /**
     * 查询答题记录表
     *
     * @param id 答题记录表ID
     * @return 答题记录表
     */
    AnswerRecordDTO selectAnswerRecordById(Long id);
    /**
     * 查询答题记录表列表
     *
     * @param answerRecordDTO 答题记录表
     * @return 答题记录表集合
     */
    List<AnswerRecordDTO> selectAnswerRecordList(AnswerRecordDTO answerRecordDTO);
}
src/main/java/org/springblade/modules/answerRecord/mapper/AnswerRecordMapper.xml
New file
@@ -0,0 +1,66 @@
<?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="org.springblade.modules.answerRecord.mapper.AnswerRecordMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="answerRecordResultMap" type="org.springblade.modules.answerRecord.entity.AnswerRecordEntity">
    </resultMap>
    <select id="selectAnswerRecordPage" resultMap="answerRecordResultMap">
        select * from jczz_answer_record where is_deleted = 0
    </select>
    <resultMap type="org.springblade.modules.answerRecord.dto.AnswerRecordDTO" id="AnswerRecordDTOResult">
        <result property="id" column="id"/>
        <result property="subjectChoicesId" column="subject_choices_id"/>
        <result property="subjectChoicesType" column="subject_choices_type"/>
        <result property="subjectOptionId" column="subject_option_id"/>
        <result property="answerOption" column="answer_option"/>
        <result property="answerScore" column="answer_score"/>
        <result property="propertyId" column="property_id"/>
        <result property="scoreId" column="score_id"/>
        <result property="answer" column="answer"/>
        <result property="createTime" column="create_time"/>
    </resultMap>
    <sql id="selectAnswerRecord">
        select
            id,
            subject_choices_id,
            subject_choices_type,
            subject_option_id,
            answer_option,
            answer_score,
            property_id,
            score_id,
            answer,
            create_time
        from
            jczz_answer_record
    </sql>
    <select id="selectAnswerRecordById" parameterType="long" resultMap="AnswerRecordDTOResult">
        <include refid="selectAnswerRecord"/>
        where
        id = #{id}
    </select>
    <select id="selectAnswerRecordList" parameterType="org.springblade.modules.answerRecord.dto.AnswerRecordDTO"
            resultMap="AnswerRecordDTOResult">
        <include refid="selectAnswerRecord"/>
        <where>
            <if test="id != null ">and id = #{id}</if>
            <if test="subjectChoicesId != null ">and subject_choices_id = #{subjectChoicesId}</if>
            <if test="subjectChoicesType != null ">and subject_choices_type = #{subjectChoicesType}</if>
            <if test="subjectOptionId != null ">and subject_option_id = #{subjectOptionId}</if>
            <if test="answerOption != null  and answerOption != ''">and answer_option = #{answerOption}</if>
            <if test="answerScore != null ">and answer_score = #{answerScore}</if>
            <if test="propertyId != null ">and property_id = #{propertyId}</if>
            <if test="scoreId != null ">and score_id = #{scoreId}</if>
            <if test="answer != null ">and answer = #{answer}</if>
            <if test="createTime != null ">and create_time = #{createTime}</if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/answerRecord/service/IAnswerRecordService.java
New file
@@ -0,0 +1,59 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.answerRecord.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.answerRecord.dto.AnswerRecordDTO;
import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
import org.springblade.modules.answerRecord.vo.AnswerRecordVO;
import java.util.List;
/**
 * 答题记录表 服务类
 *
 * @author BladeX
 * @since 2024-01-17
 */
public interface IAnswerRecordService extends IService<AnswerRecordEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param answerRecord
     * @return
     */
    IPage<AnswerRecordVO> selectAnswerRecordPage(IPage<AnswerRecordVO> page, AnswerRecordVO answerRecord);
    /**
     * 查询答题记录表
     *
     * @param id 答题记录表ID
     * @return 答题记录表
     */
    AnswerRecordDTO selectAnswerRecordById(Long id);
    /**
     * 查询答题记录表列表
     *
     * @param answerRecordDTO 答题记录表
     * @return 答题记录表集合
     */
    List<AnswerRecordDTO> selectAnswerRecordList(AnswerRecordDTO answerRecordDTO);
}
src/main/java/org/springblade/modules/answerRecord/service/impl/AnswerRecordServiceImpl.java
New file
@@ -0,0 +1,67 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.answerRecord.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.answerRecord.dto.AnswerRecordDTO;
import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
import org.springblade.modules.answerRecord.mapper.AnswerRecordMapper;
import org.springblade.modules.answerRecord.service.IAnswerRecordService;
import org.springblade.modules.answerRecord.vo.AnswerRecordVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * 答题记录表 服务实现类
 *
 * @author BladeX
 * @since 2024-01-17
 */
@Service
public class AnswerRecordServiceImpl extends ServiceImpl<AnswerRecordMapper, AnswerRecordEntity> implements IAnswerRecordService {
    @Override
    public IPage<AnswerRecordVO> selectAnswerRecordPage(IPage<AnswerRecordVO> page, AnswerRecordVO answerRecord) {
        return page.setRecords(baseMapper.selectAnswerRecordPage(page, answerRecord));
    }
    /**
     * 查询答题记录表
     *
     * @param id 答题记录表ID
     * @return 答题记录表
     */
    @Override
    public AnswerRecordDTO selectAnswerRecordById(Long id) {
        return this.baseMapper.selectAnswerRecordById(id);
    }
    /**
     * 查询答题记录表列表
     *
     * @param answerRecordDTO 答题记录表
     * @return 答题记录表集合
     */
    @Override
    public List<AnswerRecordDTO> selectAnswerRecordList(AnswerRecordDTO answerRecordDTO) {
        return this.baseMapper.selectAnswerRecordList(answerRecordDTO);
    }
}
src/main/java/org/springblade/modules/answerRecord/vo/AnswerRecordVO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.answerRecord.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
/**
 * 答题记录表 视图实体类
 *
 * @author BladeX
 * @since 2024-01-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AnswerRecordVO extends AnswerRecordEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/answerRecord/wrapper/AnswerRecordWrapper.java
New file
@@ -0,0 +1,51 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.answerRecord.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.answerRecord.entity.AnswerRecordEntity;
import org.springblade.modules.answerRecord.vo.AnswerRecordVO;
import java.util.Objects;
/**
 * 答题记录表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-01-17
 */
public class AnswerRecordWrapper extends BaseEntityWrapper<AnswerRecordEntity, AnswerRecordVO> {
    public static AnswerRecordWrapper build() {
        return new AnswerRecordWrapper();
    }
    @Override
    public AnswerRecordVO entityVO(AnswerRecordEntity answerRecord) {
        AnswerRecordVO answerRecordVO = Objects.requireNonNull(BeanUtil.copy(answerRecord, AnswerRecordVO.class));
        //User createUser = UserCache.getUser(answerRecord.getCreateUser());
        //User updateUser = UserCache.getUser(answerRecord.getUpdateUser());
        //answerRecordVO.setCreateUserName(createUser.getName());
        //answerRecordVO.setUpdateUserName(updateUser.getName());
        return answerRecordVO;
    }
}
src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.xml
@@ -77,7 +77,10 @@
            <if test="subjectChoices.modifyDate != null ">and modify_date = #{subjectChoices.modifyDate}</if>
            <if test="subjectChoices.delFlag != null ">and del_flag = #{subjectChoices.delFlag}</if>
            <if test="subjectChoices.level != null ">and level = #{subjectChoices.level}</if>
        </where>
        order by level desc
    </select>
src/main/java/org/springblade/modules/task/controller/TaskReportForRepairsController.java
@@ -21,7 +21,6 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import liquibase.pro.packaged.D;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
@@ -151,8 +150,8 @@
     * @return
     */
    @GetMapping("/getStatisticsCount")
    public R statisticsCount() {
        return R.data(taskReportForRepairsService.getStatisticsCount());
    public R statisticsCount(@RequestParam("houseCode") String houseCode) {
        return R.data(taskReportForRepairsService.getStatisticsCount(houseCode));
    }
    /**
src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.java
@@ -48,10 +48,11 @@
    /**
     * 查询报事报修统计
     *
     * @param userId
     * @return
     */
    TaskReportStatistics getStatisticsCount(@Param("userId") Long userId);
    TaskReportStatistics getStatisticsCount(@Param("userId") Long userId, @Param("houseCode") String houseCode);
    Integer getStatistics(Long userId,String neiCode);
src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml
@@ -172,11 +172,13 @@
            AND jtrfr.phone like concat('%',#{vo.phone},'%')
        </if>
        <if test="vo.confirmFlag != null">
            AND jtrfr.confirm_flag = #{vo.confirmFlag}
            AND (jtrfr.confirm_flag = #{vo.confirmFlag}
            <if test="vo.confirmUserId != null and vo.roleName!='网格员'">
                or jtrfr.confirm_user_id = #{vo.confirmUserId}
            </if>
            )
        </if>
        <if test="vo.confirmUserId != null and vo.roleName!='网格员'">
            AND jtrfr.confirm_user_id = #{vo.confirmUserId}
        </if>
        <if test="vo.status != null">
            AND jtrfr.status = #{vo.status}
        </if>
@@ -264,6 +266,10 @@
        WHERE is_deleted = 0
        <if test="userId != null">
            and create_user = #{userId}
        </if>
        <if test="houseCode != null and houseCode != ''">
            and address_code = #{houseCode}
        </if>
    </select>
src/main/java/org/springblade/modules/task/service/ITaskReportForRepairsService.java
@@ -16,11 +16,11 @@
 */
package org.springblade.modules.task.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.grid.entity.GridmanEntity;
import org.springblade.modules.task.entity.TaskReportForRepairsEntity;
import org.springblade.modules.task.vo.TaskReportForRepairsVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.task.vo.TaskReportStatistics;
/**
@@ -42,9 +42,10 @@
    /**
     * 查询报事报修统计
     *
     * @return
     */
    TaskReportStatistics getStatisticsCount();
    TaskReportStatistics getStatisticsCount(String houseCode);
    /**
     * 报事报修任务表 新增
src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java
@@ -89,8 +89,8 @@
     * @return
     */
    @Override
    public TaskReportStatistics getStatisticsCount() {
        return baseMapper.getStatisticsCount(AuthUtil.getUserId());
    public TaskReportStatistics getStatisticsCount(String houseCode) {
        return baseMapper.getStatisticsCount(AuthUtil.getUserId(), houseCode);
    }
    /**
src/main/java/sql/answerrecord.menu.sql
New file
@@ -0,0 +1,10 @@
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1747526709527629825', 1123598815738675201, 'answerRecord', '答题记录表', 'menu', '/answerRecord/answerRecord', NULL, 1, 1, 0, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1747526709527629826', '1747526709527629825', 'answerRecord_add', '新增', 'add', '/answerRecord/answerRecord/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1747526709527629827', '1747526709527629825', 'answerRecord_edit', '修改', 'edit', '/answerRecord/answerRecord/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1747526709527629828', '1747526709527629825', 'answerRecord_delete', '删除', 'delete', '/api/blade-answerRecord/answerRecord/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1747526709527629829', '1747526709527629825', 'answerRecord_view', '查看', 'view', '/answerRecord/answerRecord/view', 'file-text', 4, 2, 2, 1, NULL, 0);