吉安感知网项目-后端
linwei
2026-01-14 a537bce3184800d6fe51d4193bc80e4142ceed5c
工单管理
30 files added
1970 ■■■■■ changed files
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/controller/GdPatrolTaskController.java 153 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/dto/GdPatrolTaskDTO.java 34 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/entity/GdPatrolTaskEntity.java 91 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/excel/GdPatrolTaskExcel.java 111 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/mapper/GdPatrolTaskMapper.java 54 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/mapper/GdPatrolTaskMapper.xml 37 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/service/IGdPatrolTaskService.java 52 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/service/impl/GdPatrolTaskServiceImpl.java 54 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/vo/GdPatrolTaskVO.java 34 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/wrapper/GdPatrolTaskWrapper.java 50 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/controller/GdWorkOrderController.java 153 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/dto/GdWorkOrderDTO.java 34 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/entity/GdWorkOrderEntity.java 96 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/excel/GdWorkOrderExcel.java 117 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/mapper/GdWorkOrderMapper.java 54 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/mapper/GdWorkOrderMapper.xml 38 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/service/IGdWorkOrderService.java 52 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/service/impl/GdWorkOrderServiceImpl.java 54 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/vo/GdWorkOrderVO.java 34 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/wrapper/GdWorkOrderWrapper.java 50 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/controller/GdWorkOrderFlowController.java 151 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/dto/GdWorkOrderFlowDTO.java 34 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/entity/GdWorkOrderFlowEntity.java 70 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/excel/GdWorkOrderFlowExcel.java 86 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/mapper/GdWorkOrderFlowMapper.java 54 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/mapper/GdWorkOrderFlowMapper.xml 33 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/service/IGdWorkOrderFlowService.java 52 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/service/impl/GdWorkOrderFlowServiceImpl.java 54 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/vo/GdWorkOrderFlowVO.java 34 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/wrapper/GdWorkOrderFlowWrapper.java 50 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/controller/GdPatrolTaskController.java
New file
@@ -0,0 +1,153 @@
/*
 *      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.sxkj.gd.patrolTask.controller;
import com.github.xiaoymin.knife4j.annotations.Ignore;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.sxkj.gd.patrolTask.entity.GdPatrolTaskEntity;
import org.sxkj.gd.patrolTask.vo.GdPatrolTaskVO;
import org.sxkj.gd.patrolTask.excel.GdPatrolTaskExcel;
import org.sxkj.gd.patrolTask.wrapper.GdPatrolTaskWrapper;
import org.sxkj.gd.patrolTask.service.IGdPatrolTaskService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
 * 巡查任务表 控制器
 *
 * @author lw
 * @since 2026-01-14
 */
@RestController
@AllArgsConstructor
@RequestMapping("gdPatrolTask/gdPatrolTask")
@Api(value = "巡查任务表", tags = "巡查任务表接口")
public class GdPatrolTaskController extends BladeController {
    private final IGdPatrolTaskService gdPatrolTaskService;
    /**
     * 巡查任务表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入gdPatrolTask")
    public R<GdPatrolTaskVO> detail(GdPatrolTaskEntity gdPatrolTask) {
        GdPatrolTaskEntity detail = gdPatrolTaskService.getOne(Condition.getQueryWrapper(gdPatrolTask));
        return R.data(GdPatrolTaskWrapper.build().entityVO(detail));
    }
    /**
     * 巡查任务表 分页
     */
    // @GetMapping("/list")
    // @ApiOperationSupport(order = 2)
    // @ApiOperation(value = "分页", notes = "传入gdPatrolTask")
    // public R<IPage<GdPatrolTaskVO>> list(@ApiIgnore @RequestParam Map<String, Object> gdPatrolTask, Query query) {
    //     IPage<GdPatrolTaskEntity> pages = gdPatrolTaskService.page(Condition.getPage(query), Condition.getQueryWrapper(gdPatrolTask, GdPatrolTaskEntity.class));
    //     return R.data(GdPatrolTaskWrapper.build().pageVO(pages));
    // }
    /**
     * 巡查任务表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入gdPatrolTask")
    public R<IPage<GdPatrolTaskVO>> page(GdPatrolTaskVO gdPatrolTask, Query query) {
        IPage<GdPatrolTaskVO> pages = gdPatrolTaskService.selectGdPatrolTaskPage(Condition.getPage(query), gdPatrolTask);
        return R.data(pages);
    }
    /**
     * 巡查任务表 新增
     */
    // @PostMapping("/save")
    // @ApiOperationSupport(order = 4)
    // @ApiOperation(value = "新增", notes = "传入gdPatrolTask")
    // public R save(@Valid @RequestBody GdPatrolTaskEntity gdPatrolTask) {
    //     return R.status(gdPatrolTaskService.save(gdPatrolTask));
    // }
    /**
     * 巡查任务表 修改
     */
    // @PostMapping("/update")
    // @ApiOperationSupport(order = 5)
    // @ApiOperation(value = "修改", notes = "传入gdPatrolTask")
    // public R update(@Valid @RequestBody GdPatrolTaskEntity gdPatrolTask) {
    //     return R.status(gdPatrolTaskService.updateById(gdPatrolTask));
    // }
    /**
     * 巡查任务表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入gdPatrolTask")
    public R submit(@Valid @RequestBody GdPatrolTaskEntity gdPatrolTask) {
        return R.status(gdPatrolTaskService.saveOrUpdate(gdPatrolTask));
    }
    /**
     * 巡查任务表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(gdPatrolTaskService.deleteLogic(Func.toLongList(ids)));
    }
    /**
     * 导出数据
     */
    @GetMapping("/export-gdPatrolTask")
    @ApiOperationSupport(order = 9)
    @Ignore
    @ApiOperation(value = "导出数据", notes = "传入gdPatrolTask")
    public void exportGdPatrolTask(@ApiIgnore @RequestParam Map<String, Object> gdPatrolTask, BladeUser bladeUser, HttpServletResponse response) {
        QueryWrapper<GdPatrolTaskEntity> queryWrapper = Condition.getQueryWrapper(gdPatrolTask, GdPatrolTaskEntity.class);
        //if (!AuthUtil.isAdministrator()) {
        //    queryWrapper.lambda().eq(GdPatrolTask::getTenantId, bladeUser.getTenantId());
        //}
        queryWrapper.lambda().eq(GdPatrolTaskEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
        List<GdPatrolTaskExcel> list = gdPatrolTaskService.exportGdPatrolTask(queryWrapper);
        ExcelUtil.export(response, "巡查任务表数据" + DateUtil.time(), "巡查任务表数据表", list, GdPatrolTaskExcel.class);
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/dto/GdPatrolTaskDTO.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.sxkj.gd.patrolTask.dto;
import org.sxkj.gd.patrolTask.entity.GdPatrolTaskEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 巡查任务表 数据传输对象实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GdPatrolTaskDTO extends GdPatrolTaskEntity {
    private static final long serialVersionUID = 1L;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/entity/GdPatrolTaskEntity.java
New file
@@ -0,0 +1,91 @@
/*
 *      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.sxkj.gd.patrolTask.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tenant.mp.TenantEntity;
/**
 * 巡查任务表 实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@TableName("ja_gd_patrol_task")
@ApiModel(value = "GdPatrolTask对象", description = "巡查任务表")
@EqualsAndHashCode(callSuper = true)
public class GdPatrolTaskEntity extends BaseEntity {
    /**
     * 关联工单任务表ID
     */
    @ApiModelProperty(value = "关联工单任务表ID")
    private Long workOrderId;
    /**
     * 巡查任务名称
     */
    @ApiModelProperty(value = "巡查任务名称")
    private String patrolTaskName;
    /**
     * 巡查任务类型(巡查类/安检类等)
     */
    @ApiModelProperty(value = "巡查任务类型(巡查类/安检类等)")
    private String patrolTaskType;
    /**
     * 执行时间
     */
    @ApiModelProperty(value = "执行时间")
    private Date executeTime;
    /**
     * 巡查任务航线URL
     */
    @ApiModelProperty(value = "巡查任务航线URL")
    private String patrolRouteUrl;
    /**
     * 推荐飞手名称
     */
    @ApiModelProperty(value = "推荐飞手名称")
    private String recommendFlyerName;
    /**
     * 关联设备ID
     */
    @ApiModelProperty(value = "关联设备ID")
    private Long deviceId;
    /**
     * 任务描述
     */
    @ApiModelProperty(value = "任务描述")
    private String taskDesc;
    /**
     * 状态:0草稿、1待签收、2拒绝签收、3待审核
     */
    @ApiModelProperty(value = "状态:0草稿、1待签收、2拒绝签收、3待审核")
    private Byte taskStatus;
    /**
     * 区域编码
     */
    @ApiModelProperty(value = "区域编码")
    private String areaCode;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/excel/GdPatrolTaskExcel.java
New file
@@ -0,0 +1,111 @@
/*
 *      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.sxkj.gd.patrolTask.excel;
import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import java.io.Serializable;
/**
 * 巡查任务表 Excel实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class GdPatrolTaskExcel implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 关联工单任务表ID
     */
    @ColumnWidth(20)
    @ExcelProperty("关联工单任务表ID")
    private Long workOrderId;
    /**
     * 巡查任务名称
     */
    @ColumnWidth(20)
    @ExcelProperty("巡查任务名称")
    private String patrolTaskName;
    /**
     * 巡查任务类型(巡查类/安检类等)
     */
    @ColumnWidth(20)
    @ExcelProperty("巡查任务类型(巡查类/安检类等)")
    private String patrolTaskType;
    /**
     * 执行时间
     */
    @ColumnWidth(20)
    @ExcelProperty("执行时间")
    private Date executeTime;
    /**
     * 巡查任务航线URL
     */
    @ColumnWidth(20)
    @ExcelProperty("巡查任务航线URL")
    private String patrolRouteUrl;
    /**
     * 推荐飞手名称
     */
    @ColumnWidth(20)
    @ExcelProperty("推荐飞手名称")
    private String recommendFlyerName;
    /**
     * 关联设备ID
     */
    @ColumnWidth(20)
    @ExcelProperty("关联设备ID")
    private Long deviceId;
    /**
     * 任务描述
     */
    @ColumnWidth(20)
    @ExcelProperty("任务描述")
    private String taskDesc;
    /**
     * 状态:0草稿、1待签收、2拒绝签收、3待审核
     */
    @ColumnWidth(20)
    @ExcelProperty("状态:0草稿、1待签收、2拒绝签收、3待审核")
    private Byte taskStatus;
    /**
     * 区域编码
     */
    @ColumnWidth(20)
    @ExcelProperty("区域编码")
    private String areaCode;
    /**
     * 删除标志(0存在 1删除)
     */
    @ColumnWidth(20)
    @ExcelProperty("删除标志(0存在 1删除)")
    private Byte isDeleted;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/mapper/GdPatrolTaskMapper.java
New file
@@ -0,0 +1,54 @@
/*
 *      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.sxkj.gd.patrolTask.mapper;
import org.sxkj.gd.patrolTask.entity.GdPatrolTaskEntity;
import org.sxkj.gd.patrolTask.vo.GdPatrolTaskVO;
import org.sxkj.gd.patrolTask.excel.GdPatrolTaskExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * 巡查任务表 Mapper 接口
 *
 * @author lw
 * @since 2026-01-14
 */
public interface GdPatrolTaskMapper extends BaseMapper<GdPatrolTaskEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param gdPatrolTask
     * @return
     */
    List<GdPatrolTaskVO> selectGdPatrolTaskPage(IPage page, GdPatrolTaskVO gdPatrolTask);
    /**
     * 获取导出数据
     *
     * @param queryWrapper
     * @return
     */
    List<GdPatrolTaskExcel> exportGdPatrolTask(@Param("ew") Wrapper<GdPatrolTaskEntity> queryWrapper);
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/mapper/GdPatrolTaskMapper.xml
New file
@@ -0,0 +1,37 @@
<?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.sxkj.gd.patrolTask.mapper.GdPatrolTaskMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="gdPatrolTaskResultMap" type="org.sxkj.gd.patrolTask.entity.GdPatrolTaskEntity">
        <result column="id" property="id"/>
        <result column="work_order_id" property="workOrderId"/>
        <result column="patrol_task_name" property="patrolTaskName"/>
        <result column="patrol_task_type" property="patrolTaskType"/>
        <result column="execute_time" property="executeTime"/>
        <result column="patrol_route_url" property="patrolRouteUrl"/>
        <result column="recommend_flyer_name" property="recommendFlyerName"/>
        <result column="device_id" property="deviceId"/>
        <result column="task_desc" property="taskDesc"/>
        <result column="task_status" property="taskStatus"/>
        <result column="area_code" property="areaCode"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="selectGdPatrolTaskPage" resultMap="gdPatrolTaskResultMap">
        select * from ja_gd_patrol_task where is_deleted = 0
    </select>
    <select id="exportGdPatrolTask" resultType="org.sxkj.gd.patrolTask.excel.GdPatrolTaskExcel">
        SELECT * FROM ja_gd_patrol_task ${ew.customSqlSegment}
    </select>
</mapper>
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/service/IGdPatrolTaskService.java
New file
@@ -0,0 +1,52 @@
/*
 *      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.sxkj.gd.patrolTask.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.sxkj.gd.patrolTask.entity.GdPatrolTaskEntity;
import org.sxkj.gd.patrolTask.vo.GdPatrolTaskVO;
import org.sxkj.gd.patrolTask.excel.GdPatrolTaskExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
 * 巡查任务表 服务类
 *
 * @author lw
 * @since 2026-01-14
 */
public interface IGdPatrolTaskService extends BaseService<GdPatrolTaskEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param gdPatrolTask
     * @return
     */
    IPage<GdPatrolTaskVO> selectGdPatrolTaskPage(IPage<GdPatrolTaskVO> page, GdPatrolTaskVO gdPatrolTask);
    /**
     * 导出数据
     *
     * @param queryWrapper
     * @return
     */
    List<GdPatrolTaskExcel> exportGdPatrolTask(Wrapper<GdPatrolTaskEntity> queryWrapper);
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/service/impl/GdPatrolTaskServiceImpl.java
New file
@@ -0,0 +1,54 @@
/*
 *      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.sxkj.gd.patrolTask.service.impl;
import org.sxkj.gd.patrolTask.entity.GdPatrolTaskEntity;
import org.sxkj.gd.patrolTask.vo.GdPatrolTaskVO;
import org.sxkj.gd.patrolTask.excel.GdPatrolTaskExcel;
import org.sxkj.gd.patrolTask.mapper.GdPatrolTaskMapper;
import org.sxkj.gd.patrolTask.service.IGdPatrolTaskService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
 * 巡查任务表 服务实现类
 *
 * @author lw
 * @since 2026-01-14
 */
@Service
public class GdPatrolTaskServiceImpl extends BaseServiceImpl<GdPatrolTaskMapper, GdPatrolTaskEntity> implements IGdPatrolTaskService {
    @Override
    public IPage<GdPatrolTaskVO> selectGdPatrolTaskPage(IPage<GdPatrolTaskVO> page, GdPatrolTaskVO gdPatrolTask) {
        return page.setRecords(baseMapper.selectGdPatrolTaskPage(page, gdPatrolTask));
    }
    @Override
    public List<GdPatrolTaskExcel> exportGdPatrolTask(Wrapper<GdPatrolTaskEntity> queryWrapper) {
        List<GdPatrolTaskExcel> gdPatrolTaskList = baseMapper.exportGdPatrolTask(queryWrapper);
        //gdPatrolTaskList.forEach(gdPatrolTask -> {
        //    gdPatrolTask.setTypeName(DictCache.getValue(DictEnum.YES_NO, GdPatrolTask.getType()));
        //});
        return gdPatrolTaskList;
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/vo/GdPatrolTaskVO.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.sxkj.gd.patrolTask.vo;
import org.sxkj.gd.patrolTask.entity.GdPatrolTaskEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 巡查任务表 视图实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GdPatrolTaskVO extends GdPatrolTaskEntity {
    private static final long serialVersionUID = 1L;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/patrolTask/wrapper/GdPatrolTaskWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      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.sxkj.gd.patrolTask.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.sxkj.gd.patrolTask.entity.GdPatrolTaskEntity;
import org.sxkj.gd.patrolTask.vo.GdPatrolTaskVO;
import java.util.Objects;
/**
 * 巡查任务表 包装类,返回视图层所需的字段
 *
 * @author lw
 * @since 2026-01-14
 */
public class GdPatrolTaskWrapper extends BaseEntityWrapper<GdPatrolTaskEntity, GdPatrolTaskVO>  {
    public static GdPatrolTaskWrapper build() {
        return new GdPatrolTaskWrapper();
     }
    @Override
    public GdPatrolTaskVO entityVO(GdPatrolTaskEntity gdPatrolTask) {
        GdPatrolTaskVO gdPatrolTaskVO = Objects.requireNonNull(BeanUtil.copy(gdPatrolTask, GdPatrolTaskVO.class));
        //User createUser = UserCache.getUser(gdPatrolTask.getCreateUser());
        //User updateUser = UserCache.getUser(gdPatrolTask.getUpdateUser());
        //gdPatrolTaskVO.setCreateUserName(createUser.getName());
        //gdPatrolTaskVO.setUpdateUserName(updateUser.getName());
        return gdPatrolTaskVO;
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/controller/GdWorkOrderController.java
New file
@@ -0,0 +1,153 @@
/*
 *      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.sxkj.gd.workOrder.controller;
import com.github.xiaoymin.knife4j.annotations.Ignore;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.sxkj.gd.workOrder.entity.GdWorkOrderEntity;
import org.sxkj.gd.workOrder.vo.GdWorkOrderVO;
import org.sxkj.gd.workOrder.excel.GdWorkOrderExcel;
import org.sxkj.gd.workOrder.wrapper.GdWorkOrderWrapper;
import org.sxkj.gd.workOrder.service.IGdWorkOrderService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
 * 工单任务表 控制器
 *
 * @author lw
 * @since 2026-01-14
 */
@RestController
@AllArgsConstructor
@RequestMapping("gdWorkOrder/gdWorkOrder")
@Api(value = "工单任务表", tags = "工单任务表接口")
public class GdWorkOrderController extends BladeController {
    private final IGdWorkOrderService gdWorkOrderService;
    /**
     * 工单任务表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入gdWorkOrder")
    public R<GdWorkOrderVO> detail(GdWorkOrderEntity gdWorkOrder) {
        GdWorkOrderEntity detail = gdWorkOrderService.getOne(Condition.getQueryWrapper(gdWorkOrder));
        return R.data(GdWorkOrderWrapper.build().entityVO(detail));
    }
    /**
     * 工单任务表 分页
     */
    // @GetMapping("/list")
    // @ApiOperationSupport(order = 2)
    // @ApiOperation(value = "分页", notes = "传入gdWorkOrder")
    // public R<IPage<GdWorkOrderVO>> list(@ApiIgnore @RequestParam Map<String, Object> gdWorkOrder, Query query) {
    //     IPage<GdWorkOrderEntity> pages = gdWorkOrderService.page(Condition.getPage(query), Condition.getQueryWrapper(gdWorkOrder, GdWorkOrderEntity.class));
    //     return R.data(GdWorkOrderWrapper.build().pageVO(pages));
    // }
    /**
     * 工单任务表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入gdWorkOrder")
    public R<IPage<GdWorkOrderVO>> page(GdWorkOrderVO gdWorkOrder, Query query) {
        IPage<GdWorkOrderVO> pages = gdWorkOrderService.selectGdWorkOrderPage(Condition.getPage(query), gdWorkOrder);
        return R.data(pages);
    }
    /**
     * 工单任务表 新增
     */
    // @PostMapping("/save")
    // @ApiOperationSupport(order = 4)
    // @ApiOperation(value = "新增", notes = "传入gdWorkOrder")
    // public R save(@Valid @RequestBody GdWorkOrderEntity gdWorkOrder) {
    //     return R.status(gdWorkOrderService.save(gdWorkOrder));
    // }
    /**
     * 工单任务表 修改
     */
    // @PostMapping("/update")
    // @ApiOperationSupport(order = 5)
    // @ApiOperation(value = "修改", notes = "传入gdWorkOrder")
    // public R update(@Valid @RequestBody GdWorkOrderEntity gdWorkOrder) {
    //     return R.status(gdWorkOrderService.updateById(gdWorkOrder));
    // }
    /**
     * 工单任务表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入gdWorkOrder")
    public R submit(@Valid @RequestBody GdWorkOrderEntity gdWorkOrder) {
        return R.status(gdWorkOrderService.saveOrUpdate(gdWorkOrder));
    }
    /**
     * 工单任务表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(gdWorkOrderService.deleteLogic(Func.toLongList(ids)));
    }
    /**
     * 导出数据
     */
    @GetMapping("/export-gdWorkOrder")
    @ApiOperationSupport(order = 9)
    @ApiIgnore
    @ApiOperation(value = "导出数据", notes = "传入gdWorkOrder")
    public void exportGdWorkOrder(@ApiIgnore @RequestParam Map<String, Object> gdWorkOrder, BladeUser bladeUser, HttpServletResponse response) {
        QueryWrapper<GdWorkOrderEntity> queryWrapper = Condition.getQueryWrapper(gdWorkOrder, GdWorkOrderEntity.class);
        //if (!AuthUtil.isAdministrator()) {
        //    queryWrapper.lambda().eq(GdWorkOrder::getTenantId, bladeUser.getTenantId());
        //}
        queryWrapper.lambda().eq(GdWorkOrderEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
        List<GdWorkOrderExcel> list = gdWorkOrderService.exportGdWorkOrder(queryWrapper);
        ExcelUtil.export(response, "工单任务表数据" + DateUtil.time(), "工单任务表数据表", list, GdWorkOrderExcel.class);
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/dto/GdWorkOrderDTO.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.sxkj.gd.workOrder.dto;
import org.sxkj.gd.workOrder.entity.GdWorkOrderEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 工单任务表 数据传输对象实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GdWorkOrderDTO extends GdWorkOrderEntity {
    private static final long serialVersionUID = 1L;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/entity/GdWorkOrderEntity.java
New file
@@ -0,0 +1,96 @@
/*
 *      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.sxkj.gd.workOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tenant.mp.TenantEntity;
/**
 * 工单任务表 实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@TableName("ja_gd_work_order")
@ApiModel(value = "GdWorkOrder对象", description = "工单任务表")
@EqualsAndHashCode(callSuper = true)
public class GdWorkOrderEntity extends BaseEntity {
    /**
     * 工单名称
     */
    @ApiModelProperty(value = "工单名称")
    private String workOrderName;
    /**
     * 工单编号(唯一)
     */
    @ApiModelProperty(value = "工单编号(唯一)")
    private String workOrderCode;
    /**
     * 工单类型(巡查类/安检类等)
     */
    @ApiModelProperty(value = "工单类型(巡查类/安检类等)")
    private String workOrderType;
    /**
     * 设备负载需求(红外、喊话器、探照灯)
     */
    @ApiModelProperty(value = "设备负载需求(红外、喊话器、探照灯)")
    private String deviceLoadDemand;
    /**
     * 推荐设备ID(逗号分隔)
     */
    @ApiModelProperty(value = "推荐设备ID(逗号分隔)")
    private String recommendDeviceIds;
    /**
     * 工单状态:0草稿、10发布中_接单中、11发布中_拒绝接单、20响应中_待拆分、21响应中_申请取消、22响应中_申请修改、23响应中_已取消、30执行中_待全部完成、31执行中_协商修改、40完成待验_待全部验收、50验收通过_待结算、60结算完成_已结算
     */
    @ApiModelProperty(value = "工单状态:0草稿、10发布中_接单中、11发布中_拒绝接单、20响应中_待拆分、21响应中_申请取消、22响应中_申请修改、23响应中_已取消、30执行中_待全部完成、31执行中_协商修改、40完成待验_待全部验收、50验收通过_待结算、60结算完成_已结算")
    private Byte workOrderStatus;
    /**
     * 执行时间范围-开始
     */
    @ApiModelProperty(value = "执行时间范围-开始")
    private Date executeStartTime;
    /**
     * 执行时间范围-结束
     */
    @ApiModelProperty(value = "执行时间范围-结束")
    private Date executeEndTime;
    /**
     * 服务方(审核人)
     */
    @ApiModelProperty(value = "服务方(审核人)")
    private String serviceParty;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 区域编码
     */
    @ApiModelProperty(value = "区域编码")
    private String areaCode;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/excel/GdWorkOrderExcel.java
New file
@@ -0,0 +1,117 @@
/*
 *      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.sxkj.gd.workOrder.excel;
import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import java.io.Serializable;
/**
 * 工单任务表 Excel实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class GdWorkOrderExcel implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 工单名称
     */
    @ColumnWidth(20)
    @ExcelProperty("工单名称")
    private String workOrderName;
    /**
     * 工单编号(唯一)
     */
    @ColumnWidth(20)
    @ExcelProperty("工单编号(唯一)")
    private String workOrderCode;
    /**
     * 工单类型(巡查类/安检类等)
     */
    @ColumnWidth(20)
    @ExcelProperty("工单类型(巡查类/安检类等)")
    private String workOrderType;
    /**
     * 设备负载需求(红外、喊话器、探照灯)
     */
    @ColumnWidth(20)
    @ExcelProperty("设备负载需求(红外、喊话器、探照灯)")
    private String deviceLoadDemand;
    /**
     * 推荐设备ID(逗号分隔)
     */
    @ColumnWidth(20)
    @ExcelProperty("推荐设备ID(逗号分隔)")
    private String recommendDeviceIds;
    /**
     * 工单状态:0草稿、10发布中_接单中、11发布中_拒绝接单、20响应中_待拆分、21响应中_申请取消、22响应中_申请修改、23响应中_已取消、30执行中_待全部完成、31执行中_协商修改、40完成待验_待全部验收、50验收通过_待结算、60结算完成_已结算
     */
    @ColumnWidth(20)
    @ExcelProperty("工单状态:0草稿、10发布中_接单中、11发布中_拒绝接单、20响应中_待拆分、21响应中_申请取消、22响应中_申请修改、23响应中_已取消、30执行中_待全部完成、31执行中_协商修改、40完成待验_待全部验收、50验收通过_待结算、60结算完成_已结算")
    private Byte workOrderStatus;
    /**
     * 执行时间范围-开始
     */
    @ColumnWidth(20)
    @ExcelProperty("执行时间范围-开始")
    private Date executeStartTime;
    /**
     * 执行时间范围-结束
     */
    @ColumnWidth(20)
    @ExcelProperty("执行时间范围-结束")
    private Date executeEndTime;
    /**
     * 服务方(审核人)
     */
    @ColumnWidth(20)
    @ExcelProperty("服务方(审核人)")
    private String serviceParty;
    /**
     * 备注
     */
    @ColumnWidth(20)
    @ExcelProperty("备注")
    private String remark;
    /**
     * 区域编码
     */
    @ColumnWidth(20)
    @ExcelProperty("区域编码")
    private String areaCode;
    /**
     * 删除标志(0存在 1删除)
     */
    @ColumnWidth(20)
    @ExcelProperty("删除标志(0存在 1删除)")
    private Byte isDeleted;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/mapper/GdWorkOrderMapper.java
New file
@@ -0,0 +1,54 @@
/*
 *      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.sxkj.gd.workOrder.mapper;
import org.sxkj.gd.workOrder.entity.GdWorkOrderEntity;
import org.sxkj.gd.workOrder.vo.GdWorkOrderVO;
import org.sxkj.gd.workOrder.excel.GdWorkOrderExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * 工单任务表 Mapper 接口
 *
 * @author lw
 * @since 2026-01-14
 */
public interface GdWorkOrderMapper extends BaseMapper<GdWorkOrderEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param gdWorkOrder
     * @return
     */
    List<GdWorkOrderVO> selectGdWorkOrderPage(IPage page, GdWorkOrderVO gdWorkOrder);
    /**
     * 获取导出数据
     *
     * @param queryWrapper
     * @return
     */
    List<GdWorkOrderExcel> exportGdWorkOrder(@Param("ew") Wrapper<GdWorkOrderEntity> queryWrapper);
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/mapper/GdWorkOrderMapper.xml
New file
@@ -0,0 +1,38 @@
<?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.sxkj.gd.workOrder.mapper.GdWorkOrderMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="gdWorkOrderResultMap" type="org.sxkj.gd.workOrder.entity.GdWorkOrderEntity">
        <result column="id" property="id"/>
        <result column="work_order_name" property="workOrderName"/>
        <result column="work_order_code" property="workOrderCode"/>
        <result column="work_order_type" property="workOrderType"/>
        <result column="device_load_demand" property="deviceLoadDemand"/>
        <result column="recommend_device_ids" property="recommendDeviceIds"/>
        <result column="work_order_status" property="workOrderStatus"/>
        <result column="execute_start_time" property="executeStartTime"/>
        <result column="execute_end_time" property="executeEndTime"/>
        <result column="service_party" property="serviceParty"/>
        <result column="remark" property="remark"/>
        <result column="area_code" property="areaCode"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="selectGdWorkOrderPage" resultMap="gdWorkOrderResultMap">
        select * from ja_gd_work_order where is_deleted = 0
    </select>
    <select id="exportGdWorkOrder" resultType="org.sxkj.gd.workOrder.excel.GdWorkOrderExcel">
        SELECT * FROM ja_gd_work_order ${ew.customSqlSegment}
    </select>
</mapper>
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/service/IGdWorkOrderService.java
New file
@@ -0,0 +1,52 @@
/*
 *      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.sxkj.gd.workOrder.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.sxkj.gd.workOrder.entity.GdWorkOrderEntity;
import org.sxkj.gd.workOrder.vo.GdWorkOrderVO;
import org.sxkj.gd.workOrder.excel.GdWorkOrderExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
 * 工单任务表 服务类
 *
 * @author lw
 * @since 2026-01-14
 */
public interface IGdWorkOrderService extends BaseService<GdWorkOrderEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param gdWorkOrder
     * @return
     */
    IPage<GdWorkOrderVO> selectGdWorkOrderPage(IPage<GdWorkOrderVO> page, GdWorkOrderVO gdWorkOrder);
    /**
     * 导出数据
     *
     * @param queryWrapper
     * @return
     */
    List<GdWorkOrderExcel> exportGdWorkOrder(Wrapper<GdWorkOrderEntity> queryWrapper);
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/service/impl/GdWorkOrderServiceImpl.java
New file
@@ -0,0 +1,54 @@
/*
 *      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.sxkj.gd.workOrder.service.impl;
import org.sxkj.gd.workOrder.entity.GdWorkOrderEntity;
import org.sxkj.gd.workOrder.vo.GdWorkOrderVO;
import org.sxkj.gd.workOrder.excel.GdWorkOrderExcel;
import org.sxkj.gd.workOrder.mapper.GdWorkOrderMapper;
import org.sxkj.gd.workOrder.service.IGdWorkOrderService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
 * 工单任务表 服务实现类
 *
 * @author lw
 * @since 2026-01-14
 */
@Service
public class GdWorkOrderServiceImpl extends BaseServiceImpl<GdWorkOrderMapper, GdWorkOrderEntity> implements IGdWorkOrderService {
    @Override
    public IPage<GdWorkOrderVO> selectGdWorkOrderPage(IPage<GdWorkOrderVO> page, GdWorkOrderVO gdWorkOrder) {
        return page.setRecords(baseMapper.selectGdWorkOrderPage(page, gdWorkOrder));
    }
    @Override
    public List<GdWorkOrderExcel> exportGdWorkOrder(Wrapper<GdWorkOrderEntity> queryWrapper) {
        List<GdWorkOrderExcel> gdWorkOrderList = baseMapper.exportGdWorkOrder(queryWrapper);
        //gdWorkOrderList.forEach(gdWorkOrder -> {
        //    gdWorkOrder.setTypeName(DictCache.getValue(DictEnum.YES_NO, GdWorkOrder.getType()));
        //});
        return gdWorkOrderList;
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/vo/GdWorkOrderVO.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.sxkj.gd.workOrder.vo;
import org.sxkj.gd.workOrder.entity.GdWorkOrderEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 工单任务表 视图实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GdWorkOrderVO extends GdWorkOrderEntity {
    private static final long serialVersionUID = 1L;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/wrapper/GdWorkOrderWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      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.sxkj.gd.workOrder.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.sxkj.gd.workOrder.entity.GdWorkOrderEntity;
import org.sxkj.gd.workOrder.vo.GdWorkOrderVO;
import java.util.Objects;
/**
 * 工单任务表 包装类,返回视图层所需的字段
 *
 * @author lw
 * @since 2026-01-14
 */
public class GdWorkOrderWrapper extends BaseEntityWrapper<GdWorkOrderEntity, GdWorkOrderVO>  {
    public static GdWorkOrderWrapper build() {
        return new GdWorkOrderWrapper();
     }
    @Override
    public GdWorkOrderVO entityVO(GdWorkOrderEntity gdWorkOrder) {
        GdWorkOrderVO gdWorkOrderVO = Objects.requireNonNull(BeanUtil.copy(gdWorkOrder, GdWorkOrderVO.class));
        //User createUser = UserCache.getUser(gdWorkOrder.getCreateUser());
        //User updateUser = UserCache.getUser(gdWorkOrder.getUpdateUser());
        //gdWorkOrderVO.setCreateUserName(createUser.getName());
        //gdWorkOrderVO.setUpdateUserName(updateUser.getName());
        return gdWorkOrderVO;
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/controller/GdWorkOrderFlowController.java
New file
@@ -0,0 +1,151 @@
/*
 *      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.sxkj.gd.workOrderFlow.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.sxkj.gd.workOrderFlow.entity.GdWorkOrderFlowEntity;
import org.sxkj.gd.workOrderFlow.vo.GdWorkOrderFlowVO;
import org.sxkj.gd.workOrderFlow.excel.GdWorkOrderFlowExcel;
import org.sxkj.gd.workOrderFlow.wrapper.GdWorkOrderFlowWrapper;
import org.sxkj.gd.workOrderFlow.service.IGdWorkOrderFlowService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
 * 流程记录表 控制器
 *
 * @author lw
 * @since 2026-01-14
 */
@RestController
@AllArgsConstructor
@RequestMapping("gdWorkOrderFlow/gdWorkOrderFlow")
@Api(value = "流程记录表", tags = "流程记录表接口")
public class GdWorkOrderFlowController extends BladeController {
    private final IGdWorkOrderFlowService gdWorkOrderFlowService;
    /**
     * 流程记录表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入gdWorkOrderFlow")
    public R<GdWorkOrderFlowVO> detail(GdWorkOrderFlowEntity gdWorkOrderFlow) {
        GdWorkOrderFlowEntity detail = gdWorkOrderFlowService.getOne(Condition.getQueryWrapper(gdWorkOrderFlow));
        return R.data(GdWorkOrderFlowWrapper.build().entityVO(detail));
    }
    /**
     * 流程记录表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入gdWorkOrderFlow")
    public R<IPage<GdWorkOrderFlowVO>> list(@ApiIgnore @RequestParam Map<String, Object> gdWorkOrderFlow, Query query) {
        IPage<GdWorkOrderFlowEntity> pages = gdWorkOrderFlowService.page(Condition.getPage(query), Condition.getQueryWrapper(gdWorkOrderFlow, GdWorkOrderFlowEntity.class));
        return R.data(GdWorkOrderFlowWrapper.build().pageVO(pages));
    }
    /**
     * 流程记录表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入gdWorkOrderFlow")
    public R<IPage<GdWorkOrderFlowVO>> page(GdWorkOrderFlowVO gdWorkOrderFlow, Query query) {
        IPage<GdWorkOrderFlowVO> pages = gdWorkOrderFlowService.selectGdWorkOrderFlowPage(Condition.getPage(query), gdWorkOrderFlow);
        return R.data(pages);
    }
    /**
     * 流程记录表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入gdWorkOrderFlow")
    public R save(@Valid @RequestBody GdWorkOrderFlowEntity gdWorkOrderFlow) {
        return R.status(gdWorkOrderFlowService.save(gdWorkOrderFlow));
    }
    /**
     * 流程记录表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入gdWorkOrderFlow")
    public R update(@Valid @RequestBody GdWorkOrderFlowEntity gdWorkOrderFlow) {
        return R.status(gdWorkOrderFlowService.updateById(gdWorkOrderFlow));
    }
    /**
     * 流程记录表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入gdWorkOrderFlow")
    public R submit(@Valid @RequestBody GdWorkOrderFlowEntity gdWorkOrderFlow) {
        return R.status(gdWorkOrderFlowService.saveOrUpdate(gdWorkOrderFlow));
    }
    /**
     * 流程记录表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(gdWorkOrderFlowService.deleteLogic(Func.toLongList(ids)));
    }
    /**
     * 导出数据
     */
    @GetMapping("/export-gdWorkOrderFlow")
    @ApiOperationSupport(order = 9)
    @ApiOperation(value = "导出数据", notes = "传入gdWorkOrderFlow")
    public void exportGdWorkOrderFlow(@ApiIgnore @RequestParam Map<String, Object> gdWorkOrderFlow, BladeUser bladeUser, HttpServletResponse response) {
        QueryWrapper<GdWorkOrderFlowEntity> queryWrapper = Condition.getQueryWrapper(gdWorkOrderFlow, GdWorkOrderFlowEntity.class);
        //if (!AuthUtil.isAdministrator()) {
        //    queryWrapper.lambda().eq(GdWorkOrderFlow::getTenantId, bladeUser.getTenantId());
        //}
        queryWrapper.lambda().eq(GdWorkOrderFlowEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
        List<GdWorkOrderFlowExcel> list = gdWorkOrderFlowService.exportGdWorkOrderFlow(queryWrapper);
        ExcelUtil.export(response, "流程记录表数据" + DateUtil.time(), "流程记录表数据表", list, GdWorkOrderFlowExcel.class);
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/dto/GdWorkOrderFlowDTO.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.sxkj.gd.workOrderFlow.dto;
import org.sxkj.gd.workOrderFlow.entity.GdWorkOrderFlowEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 流程记录表 数据传输对象实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GdWorkOrderFlowDTO extends GdWorkOrderFlowEntity {
    private static final long serialVersionUID = 1L;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/entity/GdWorkOrderFlowEntity.java
New file
@@ -0,0 +1,70 @@
/*
 *      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.sxkj.gd.workOrderFlow.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tenant.mp.TenantEntity;
/**
 * 流程记录表 实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@TableName("ja_gd_work_order_flow")
@ApiModel(value = "GdWorkOrderFlow对象", description = "流程记录表")
@EqualsAndHashCode(callSuper = true)
public class GdWorkOrderFlowEntity extends BaseEntity {
    /**
     * 流转名称
     */
    @ApiModelProperty(value = "流转名称")
    private String flowName;
    /**
     * 流转描述
     */
    @ApiModelProperty(value = "流转描述")
    private String flowDesc;
    /**
     * 关联工单任务表ID/巡查任务ID
     */
    @ApiModelProperty(value = "关联工单任务表ID/巡查任务ID")
    private Long workOrderId;
    /**
     * 操作人
     */
    @ApiModelProperty(value = "操作人")
    private String operator;
    /**
     * 类型(0工单任务 1巡查任务)
     */
    @ApiModelProperty(value = "类型(0工单任务 1巡查任务)")
    private String type;
    /**
     * 区域编码
     */
    @ApiModelProperty(value = "区域编码")
    private String areaCode;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/excel/GdWorkOrderFlowExcel.java
New file
@@ -0,0 +1,86 @@
/*
 *      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.sxkj.gd.workOrderFlow.excel;
import lombok.Data;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import java.io.Serializable;
/**
 * 流程记录表 Excel实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class GdWorkOrderFlowExcel implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 流转名称
     */
    @ColumnWidth(20)
    @ExcelProperty("流转名称")
    private String flowName;
    /**
     * 流转描述
     */
    @ColumnWidth(20)
    @ExcelProperty("流转描述")
    private String flowDesc;
    /**
     * 关联工单任务表ID/巡查任务ID
     */
    @ColumnWidth(20)
    @ExcelProperty("关联工单任务表ID/巡查任务ID")
    private Long workOrderId;
    /**
     * 操作人
     */
    @ColumnWidth(20)
    @ExcelProperty("操作人")
    private String operator;
    /**
     * 类型(0工单任务 1巡查任务)
     */
    @ColumnWidth(20)
    @ExcelProperty("类型(0工单任务 1巡查任务)")
    private String type;
    /**
     * 区域编码
     */
    @ColumnWidth(20)
    @ExcelProperty("区域编码")
    private String areaCode;
    /**
     * 删除标志(0存在 1删除)
     */
    @ColumnWidth(20)
    @ExcelProperty("删除标志(0存在 1删除)")
    private Byte isDeleted;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/mapper/GdWorkOrderFlowMapper.java
New file
@@ -0,0 +1,54 @@
/*
 *      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.sxkj.gd.workOrderFlow.mapper;
import org.sxkj.gd.workOrderFlow.entity.GdWorkOrderFlowEntity;
import org.sxkj.gd.workOrderFlow.vo.GdWorkOrderFlowVO;
import org.sxkj.gd.workOrderFlow.excel.GdWorkOrderFlowExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * 流程记录表 Mapper 接口
 *
 * @author lw
 * @since 2026-01-14
 */
public interface GdWorkOrderFlowMapper extends BaseMapper<GdWorkOrderFlowEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param gdWorkOrderFlow
     * @return
     */
    List<GdWorkOrderFlowVO> selectGdWorkOrderFlowPage(IPage page, GdWorkOrderFlowVO gdWorkOrderFlow);
    /**
     * 获取导出数据
     *
     * @param queryWrapper
     * @return
     */
    List<GdWorkOrderFlowExcel> exportGdWorkOrderFlow(@Param("ew") Wrapper<GdWorkOrderFlowEntity> queryWrapper);
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/mapper/GdWorkOrderFlowMapper.xml
New file
@@ -0,0 +1,33 @@
<?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.sxkj.gd.workOrderFlow.mapper.GdWorkOrderFlowMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="gdWorkOrderFlowResultMap" type="org.sxkj.gd.workOrderFlow.entity.GdWorkOrderFlowEntity">
        <result column="id" property="id"/>
        <result column="flow_name" property="flowName"/>
        <result column="flow_desc" property="flowDesc"/>
        <result column="work_order_id" property="workOrderId"/>
        <result column="operator" property="operator"/>
        <result column="type" property="type"/>
        <result column="area_code" property="areaCode"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="selectGdWorkOrderFlowPage" resultMap="gdWorkOrderFlowResultMap">
        select * from ja_gd_work_order_flow where is_deleted = 0
    </select>
    <select id="exportGdWorkOrderFlow" resultType="org.sxkj.gd.workOrderFlow.excel.GdWorkOrderFlowExcel">
        SELECT * FROM ja_gd_work_order_flow ${ew.customSqlSegment}
    </select>
</mapper>
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/service/IGdWorkOrderFlowService.java
New file
@@ -0,0 +1,52 @@
/*
 *      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.sxkj.gd.workOrderFlow.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.sxkj.gd.workOrderFlow.entity.GdWorkOrderFlowEntity;
import org.sxkj.gd.workOrderFlow.vo.GdWorkOrderFlowVO;
import org.sxkj.gd.workOrderFlow.excel.GdWorkOrderFlowExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
 * 流程记录表 服务类
 *
 * @author lw
 * @since 2026-01-14
 */
public interface IGdWorkOrderFlowService extends BaseService<GdWorkOrderFlowEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param gdWorkOrderFlow
     * @return
     */
    IPage<GdWorkOrderFlowVO> selectGdWorkOrderFlowPage(IPage<GdWorkOrderFlowVO> page, GdWorkOrderFlowVO gdWorkOrderFlow);
    /**
     * 导出数据
     *
     * @param queryWrapper
     * @return
     */
    List<GdWorkOrderFlowExcel> exportGdWorkOrderFlow(Wrapper<GdWorkOrderFlowEntity> queryWrapper);
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/service/impl/GdWorkOrderFlowServiceImpl.java
New file
@@ -0,0 +1,54 @@
/*
 *      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.sxkj.gd.workOrderFlow.service.impl;
import org.sxkj.gd.workOrderFlow.entity.GdWorkOrderFlowEntity;
import org.sxkj.gd.workOrderFlow.vo.GdWorkOrderFlowVO;
import org.sxkj.gd.workOrderFlow.excel.GdWorkOrderFlowExcel;
import org.sxkj.gd.workOrderFlow.mapper.GdWorkOrderFlowMapper;
import org.sxkj.gd.workOrderFlow.service.IGdWorkOrderFlowService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
 * 流程记录表 服务实现类
 *
 * @author lw
 * @since 2026-01-14
 */
@Service
public class GdWorkOrderFlowServiceImpl extends BaseServiceImpl<GdWorkOrderFlowMapper, GdWorkOrderFlowEntity> implements IGdWorkOrderFlowService {
    @Override
    public IPage<GdWorkOrderFlowVO> selectGdWorkOrderFlowPage(IPage<GdWorkOrderFlowVO> page, GdWorkOrderFlowVO gdWorkOrderFlow) {
        return page.setRecords(baseMapper.selectGdWorkOrderFlowPage(page, gdWorkOrderFlow));
    }
    @Override
    public List<GdWorkOrderFlowExcel> exportGdWorkOrderFlow(Wrapper<GdWorkOrderFlowEntity> queryWrapper) {
        List<GdWorkOrderFlowExcel> gdWorkOrderFlowList = baseMapper.exportGdWorkOrderFlow(queryWrapper);
        //gdWorkOrderFlowList.forEach(gdWorkOrderFlow -> {
        //    gdWorkOrderFlow.setTypeName(DictCache.getValue(DictEnum.YES_NO, GdWorkOrderFlow.getType()));
        //});
        return gdWorkOrderFlowList;
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/vo/GdWorkOrderFlowVO.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.sxkj.gd.workOrderFlow.vo;
import org.sxkj.gd.workOrderFlow.entity.GdWorkOrderFlowEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 流程记录表 视图实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GdWorkOrderFlowVO extends GdWorkOrderFlowEntity {
    private static final long serialVersionUID = 1L;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrderFlow/wrapper/GdWorkOrderFlowWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      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.sxkj.gd.workOrderFlow.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.sxkj.gd.workOrderFlow.entity.GdWorkOrderFlowEntity;
import org.sxkj.gd.workOrderFlow.vo.GdWorkOrderFlowVO;
import java.util.Objects;
/**
 * 流程记录表 包装类,返回视图层所需的字段
 *
 * @author lw
 * @since 2026-01-14
 */
public class GdWorkOrderFlowWrapper extends BaseEntityWrapper<GdWorkOrderFlowEntity, GdWorkOrderFlowVO>  {
    public static GdWorkOrderFlowWrapper build() {
        return new GdWorkOrderFlowWrapper();
     }
    @Override
    public GdWorkOrderFlowVO entityVO(GdWorkOrderFlowEntity gdWorkOrderFlow) {
        GdWorkOrderFlowVO gdWorkOrderFlowVO = Objects.requireNonNull(BeanUtil.copy(gdWorkOrderFlow, GdWorkOrderFlowVO.class));
        //User createUser = UserCache.getUser(gdWorkOrderFlow.getCreateUser());
        //User updateUser = UserCache.getUser(gdWorkOrderFlow.getUpdateUser());
        //gdWorkOrderFlowVO.setCreateUserName(createUser.getName());
        //gdWorkOrderFlowVO.setUpdateUserName(updateUser.getName());
        return gdWorkOrderFlowVO;
    }
}