xuhy
2025-02-21 b7d6f4cbaa6f7dab0fe6277cf88fc1c798287190
修改报修
8个文件已修改
45 ■■■■■ 已修改文件
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TFaultRepairMessageController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TItemTypeMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TFaultRepairMessageAppletQuery.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/TItemTypeService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TItemTypeServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TFaultRepairMessageMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TItemTypeMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java
@@ -267,7 +267,7 @@
     * 获取报修管理列表
     */
    @ApiOperation(value = "管理员-房屋维修分页列表")
    @PostMapping(value = "/houstPageList")
    @PostMapping(value = "/housePageList")
    public R<PageInfo<TFaultRepairMessageVO>> pageList(@RequestBody TFaultRepairMessageAppletQuery query) {
        return R.ok(tFaultRepairMessageService.pageListApplet(query));
    }
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TFaultRepairMessageController.java
@@ -14,11 +14,7 @@
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.util.List;
@@ -62,9 +58,9 @@
     * 获取维修物品二级结构
     */
    @ApiOperation(value = "获取维修物品二级结构")
    @PostMapping(value = "/getItemList")
    public R<List<TItemTypeVO>> getItemList() {
        List<TItemTypeVO> itemTypes = itemTypeService.getItemList();
    @GetMapping(value = "/getItemList")
    public R<List<TItemTypeVO>> getItemList(@RequestParam(required = false) String itemName) {
        List<TItemTypeVO> itemTypes = itemTypeService.getItemList(itemName);
        List<TItem> items = itemService.list();
        itemTypes.forEach(itemType -> {
            itemType.setItemList(items.stream().filter(item -> itemType.getId().equals(item.getTypeId())).collect(Collectors.toList()));
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TItemTypeMapper.java
@@ -27,7 +27,7 @@
     */
    List<TItemType> pageList(@Param("query") TItemTypeQuery query, @Param("pageInfo")PageInfo<TItemType> pageInfo);
    List<TItemTypeVO> getItemList();
    List<TItemTypeVO> getItemList(@Param("itemName") String itemName);
}
ruoyi-system/src/main/java/com/ruoyi/system/query/TFaultRepairMessageAppletQuery.java
@@ -11,4 +11,6 @@
    @ApiModelProperty(value = "房屋地址")
    private String houseAddress;
    @ApiModelProperty(value = "处理状态 1=待处理 2=已处理")
    private Integer status;
}
ruoyi-system/src/main/java/com/ruoyi/system/service/TItemTypeService.java
@@ -32,5 +32,5 @@
     */
    PageInfo<TItemType> pageList(TItemTypeQuery query);
    List<TItemTypeVO> getItemList();
    List<TItemTypeVO> getItemList(String itemName);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TItemTypeServiceImpl.java
@@ -46,7 +46,7 @@
    }
    @Override
    public List<TItemTypeVO> getItemList() {
        return this.baseMapper.getItemList();
    public List<TItemTypeVO> getItemList(String itemName) {
        return this.baseMapper.getItemList(itemName);
    }
}
ruoyi-system/src/main/resources/mapper/system/TFaultRepairMessageMapper.xml
@@ -167,7 +167,10 @@
        LEFT JOIN t_tenant tnt ON t.tenant_id = tnt.id
        <where>
            <if test="query.houseAddress != null and query.houseAddress != ''">
                AND tnt.service_address LIKE CONCAT('%', #{query.houseAddress}, '%')
                AND t.service_address LIKE CONCAT('%', #{query.houseAddress}, '%')
            </if>
            <if test="query.status != null">
                AND t.status = #{query.status}
            </if>
            AND t.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
ruoyi-system/src/main/resources/mapper/system/TItemTypeMapper.xml
@@ -26,11 +26,19 @@
        ORDER BY sort_by,create_time DESC
    </select>
    <select id="getItemList" resultType="com.ruoyi.system.vo.TItemTypeVO">
        select
        <include refid="Base_Column_List"/>
        select <include refid="Base_Column_List"></include>
        from t_item_type
        where disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        ORDER BY sort_by,create_time DESC
        where id in (
        select
            tit.id
        from t_item_type tit
        left join t_item ti on tit.id = ti.type_id
        where tit.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        <if test="itemName != null and itemName != ''">
            and ti.item_name like concat('%', #{itemName}, '%')
        </if>
        GROUP BY tit.id
        ORDER BY tit.sort_by,tit.create_time DESC)
    </select>
</mapper>