From cdb2e3a30d1b3b246bb62310926a3e2d2c70ac2c Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Tue, 20 Jan 2026 21:42:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
drone-service/drone-desk/pom.xml | 59 +
drone-service/drone-desk/src/main/java/org/sxkj/desk/DeskApplication.java | 40 +
drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/LeaveMapper.java | 29
drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/feign/INoticeClient.java | 49 +
drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/DashBoardController.java | 207 ++++++
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/param/GdClueEventRejectParam.java | 17
drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/LeaveMapper.xml | 6
drone-service/drone-desk/src/main/resources/application-test.yml | 10
drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/NoticeMapper.xml | 54 +
drone-service/drone-desk/src/main/resources/application-dev.yml | 11
drone-service-api/drone-desk-api/pom.xml | 16
drone-service-api/pom.xml | 1
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdClueEventServiceImpl.java | 96 +++
drone-service/drone-desk/src/main/java/org/sxkj/desk/service/impl/LeaveServiceImpl.java | 81 ++
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/excel/GdClueEventExcel.java | 31
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/excel/GdTaskResultExcel.java | 12
drone-ops/drone-flow/pom.xml | 7
drone-ops/drone-flow/src/main/java/org/sxkj/flow/FlowApplication.java | 4
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdTaskResultMapper.xml | 18
drone-ops/pom.xml | 2
drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/NoticeController.java | 150 +++++
drone-service/drone-desk/src/main/java/org/sxkj/desk/service/ILeaveService.java | 37 +
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdTaskResultEntity.java | 13
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/IGdClueEventService.java | 26
drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/LeaveController.java | 66 ++
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdTaskResultController.java | 52 +
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdClueEventController.java | 82 +-
drone-service/drone-desk/src/main/java/org/sxkj/desk/feign/NoticeClient.java | 54 +
drone-service/drone-desk/src/main/java/org/sxkj/desk/service/INoticeService.java | 39 +
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdClueEventEntity.java | 24
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/param/GdClueEventDistributeParam.java | 59 +
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.java | 9
drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/entity/Notice.java | 64 ++
drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/NoticeMapper.java | 50 +
drone-service/drone-desk/src/main/resources/application-prod.yml | 10
drone-service/pom.xml | 24
drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/vo/GdSupplyDemandAuditAttachmentVO.java | 3
drone-service/drone-desk/src/main/java/org/sxkj/desk/entity/ProcessLeave.java | 67 ++
drone-service/drone-desk/src/main/java/org/sxkj/desk/service/impl/NoticeServiceImpl.java | 43 +
drone-service/drone-desk/Dockerfile | 15
drone-ops-api/drone-flow-api/pom.xml | 11
drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/vo/NoticeVO.java | 23
drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/mapper/GdSupplyDemandAuditAttachmentMapper.xml | 4
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/vo/GdClueEventVO.java | 7
drone-service/drone-desk/src/main/java/org/sxkj/desk/wrapper/NoticeWrapper.java | 64 ++
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml | 47 +
46 files changed, 1,679 insertions(+), 114 deletions(-)
diff --git a/drone-ops-api/drone-flow-api/pom.xml b/drone-ops-api/drone-flow-api/pom.xml
index 6e873af..0fbb9ee 100644
--- a/drone-ops-api/drone-flow-api/pom.xml
+++ b/drone-ops-api/drone-flow-api/pom.xml
@@ -13,4 +13,15 @@
<name>${project.artifactId}</name>
<packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>blade-starter-cache</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>drone-common</artifactId>
+ </dependency>
+ </dependencies>
+
</project>
diff --git a/drone-ops/drone-flow/pom.xml b/drone-ops/drone-flow/pom.xml
index e99e06a..9df3757 100644
--- a/drone-ops/drone-flow/pom.xml
+++ b/drone-ops/drone-flow/pom.xml
@@ -44,10 +44,11 @@
<artifactId>blade-core-auto</artifactId>
<scope>provided</scope>
</dependency>
-
+
<dependency>
<groupId>org.springblade</groupId>
<artifactId>drone-flow-api</artifactId>
+ <version>${revision}</version>
</dependency>
<!-- 工作流 -->
<dependency>
@@ -59,6 +60,10 @@
<artifactId>blade-core-test</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>drone-system-api</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/drone-ops/drone-flow/src/main/java/org/sxkj/flow/FlowApplication.java b/drone-ops/drone-flow/src/main/java/org/sxkj/flow/FlowApplication.java
index cfb8055..b1efabb 100644
--- a/drone-ops/drone-flow/src/main/java/org/sxkj/flow/FlowApplication.java
+++ b/drone-ops/drone-flow/src/main/java/org/sxkj/flow/FlowApplication.java
@@ -16,9 +16,11 @@
*/
package org.sxkj.flow;
+import org.mybatis.spring.annotation.MapperScan;
import org.springblade.core.cloud.client.BladeCloudApplication;
import org.springblade.core.launch.BladeApplication;
import org.springblade.core.launch.constant.AppConstant;
+import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* Flowable启动器
@@ -27,6 +29,8 @@
*/
//@SeataCloudApplication
@BladeCloudApplication
+@EnableFeignClients({"org.sxkj","com.dji.sample"})
+@MapperScan({"org.springblade.**.mapper.**","org.sxkj.**.mapper.**"})
public class FlowApplication {
public static void main(String[] args) {
diff --git a/drone-ops/pom.xml b/drone-ops/pom.xml
index 5d9cf2a..f58fc63 100644
--- a/drone-ops/pom.xml
+++ b/drone-ops/pom.xml
@@ -16,7 +16,7 @@
<modules>
<module>drone-admin</module>
<module>drone-develop</module>
-<!-- <module>drone-flow</module>-->
+ <module>drone-flow</module>
<module>drone-job</module>
<module>drone-log</module>
<module>drone-report</module>
diff --git a/drone-service-api/drone-desk-api/pom.xml b/drone-service-api/drone-desk-api/pom.xml
new file mode 100644
index 0000000..800e040
--- /dev/null
+++ b/drone-service-api/drone-desk-api/pom.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>drone-service-api</artifactId>
+ <groupId>org.springblade</groupId>
+ <version>${revision}</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>drone-desk-api</artifactId>
+ <name>${project.artifactId}</name>
+ <packaging>jar</packaging>
+
+</project>
diff --git a/drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/entity/Notice.java b/drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/entity/Notice.java
new file mode 100644
index 0000000..12e70c5
--- /dev/null
+++ b/drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/entity/Notice.java
@@ -0,0 +1,64 @@
+/*
+ * 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.desk.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.tenant.mp.TenantEntity;
+
+import java.util.Date;
+
+/**
+ * 实体类
+ *
+ * @author Chill
+ */
+@Data
+@TableName("blade_notice")
+@EqualsAndHashCode(callSuper = true)
+public class Notice extends TenantEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 标题
+ */
+ @ApiModelProperty(value = "标题")
+ private String title;
+
+ /**
+ * 通知类型
+ */
+ @ApiModelProperty(value = "通知类型")
+ private Integer category;
+
+ /**
+ * 发布日期
+ */
+ @ApiModelProperty(value = "发布日期")
+ private Date releaseTime;
+
+ /**
+ * 内容
+ */
+ @ApiModelProperty(value = "内容")
+ private String content;
+
+
+}
diff --git a/drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/feign/INoticeClient.java b/drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/feign/INoticeClient.java
new file mode 100644
index 0000000..8a85de6
--- /dev/null
+++ b/drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/feign/INoticeClient.java
@@ -0,0 +1,49 @@
+/*
+ * 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.desk.feign;
+
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.mp.support.BladePage;
+import org.sxkj.desk.entity.Notice;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * Notice Feign接口类
+ *
+ * @author Chill
+ */
+@FeignClient(
+ value = AppConstant.APPLICATION_DESK_NAME
+)
+public interface INoticeClient {
+
+ String API_PREFIX = "/client";
+ String TOP = API_PREFIX + "/top";
+
+ /**
+ * 获取notice列表
+ *
+ * @param current
+ * @param size
+ * @return
+ */
+ @GetMapping(TOP)
+ BladePage<Notice> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
+
+}
diff --git a/drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/vo/NoticeVO.java b/drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/vo/NoticeVO.java
new file mode 100644
index 0000000..52e1ff4
--- /dev/null
+++ b/drone-service-api/drone-desk-api/src/main/java/org/sxkj/desk/vo/NoticeVO.java
@@ -0,0 +1,23 @@
+package org.sxkj.desk.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.sxkj.desk.entity.Notice;
+
+/**
+ * 通知公告视图类
+ *
+ * @author Chill
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class NoticeVO extends Notice {
+
+ @ApiModelProperty(value = "通知类型名")
+ private String categoryName;
+
+ @ApiModelProperty(value = "租户编号")
+ private String tenantId;
+
+}
diff --git a/drone-service-api/pom.xml b/drone-service-api/pom.xml
index 9e26d8a..adf5a4b 100644
--- a/drone-service-api/pom.xml
+++ b/drone-service-api/pom.xml
@@ -15,6 +15,7 @@
<description>BladeX 微服务API集合</description>
<modules>
+ <module>drone-desk-api</module>
<module>drone-dict-api</module>
<module>drone-odm-api</module>
<module>drone-py-tools-api</module>
diff --git a/drone-service/drone-desk/Dockerfile b/drone-service/drone-desk/Dockerfile
new file mode 100644
index 0000000..2efbdfc
--- /dev/null
+++ b/drone-service/drone-desk/Dockerfile
@@ -0,0 +1,15 @@
+FROM bladex/alpine-java:openjdk8-openj9_cn_slim
+
+MAINTAINER bladejava@qq.com
+
+RUN mkdir -p /blade/desk
+
+WORKDIR /blade/desk
+
+EXPOSE 8105
+
+ADD ./target/blade-desk.jar ./app.jar
+
+ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
+
+CMD ["--spring.profiles.active=test"]
diff --git a/drone-service/drone-desk/pom.xml b/drone-service/drone-desk/pom.xml
new file mode 100644
index 0000000..f7b78d7
--- /dev/null
+++ b/drone-service/drone-desk/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.springblade</groupId>
+ <artifactId>drone-service</artifactId>
+ <version>${revision}</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>drone-desk</artifactId>
+ <name>${project.artifactId}</name>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>blade-starter-swagger</artifactId>
+ </dependency>
+ <!--Oss-->
+ <dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>blade-starter-oss</artifactId>
+ </dependency>
+ <!--MinIO-->
+ <dependency>
+ <groupId>io.minio</groupId>
+ <artifactId>minio</artifactId>
+ </dependency>
+ <!--QiNiu-->
+ <dependency>
+ <groupId>com.qiniu</groupId>
+ <artifactId>qiniu-java-sdk</artifactId>
+ </dependency>
+ <!--<dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>blade-starter-transaction</artifactId>
+ </dependency>-->
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <skip>${docker.fabric.skip}</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/DeskApplication.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/DeskApplication.java
new file mode 100644
index 0000000..c8593d8
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/DeskApplication.java
@@ -0,0 +1,40 @@
+/*
+ * 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.desk;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springblade.core.cloud.client.BladeCloudApplication;
+import org.springblade.core.launch.BladeApplication;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+/**
+ * Desk启动器
+ *
+ * @author Chill
+ */
+@BladeCloudApplication
+@EnableFeignClients({"org.sxkj","org.springblade","com.dji.sample"})
+@MapperScan({"org.springblade.**.mapper.**","org.sxkj.**.mapper.**"})
+public class DeskApplication {
+
+ public static void main(String[] args) {
+ BladeApplication.run(AppConstant.APPLICATION_DESK_NAME, DeskApplication.class, args);
+ }
+
+}
+
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/DashBoardController.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/DashBoardController.java
new file mode 100644
index 0000000..82f6371
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/DashBoardController.java
@@ -0,0 +1,207 @@
+package org.sxkj.desk.controller;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springblade.core.tenant.annotation.NonDS;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.support.Kv;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 首页
+ *
+ * @author Chill
+ */
+@NonDS
+@RestController
+@AllArgsConstructor
+@Api(value = "首页接口", tags = "首页接口")
+public class DashBoardController {
+
+ /**
+ * 活跃用户
+ */
+ @GetMapping("/dashboard/activities")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "活跃用户", notes = "活跃用户")
+ public R activities() {
+ List<Map<String, Object>> list = new ArrayList<>();
+
+ Map<String, Object> map1 = new HashMap<>(16);
+ map1.put("id", "trend-1");
+ map1.put("updatedAt", "2019-01-01");
+ map1.put("user", Kv.create().set("name", "曲丽丽").set("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"));
+ map1.put("group", Kv.create().set("name", "高逼格设计天团").set("link", "http://github.com/"));
+ map1.put("project", Kv.create().set("name", "六月迭代").set("link", "http://github.com/"));
+ map1.put("template", "在 @{group} 新建项目 @{project}");
+ list.add(map1);
+
+ Map<String, Object> map2 = new HashMap<>(16);
+ map2.put("id", "trend-2");
+ map2.put("updatedAt", "2019-01-01");
+ map2.put("user", Kv.create().set("name", "付小小").set("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"));
+ map2.put("group", Kv.create().set("name", "高逼格设计天团").set("link", "http://github.com/"));
+ map2.put("project", Kv.create().set("name", "七月月迭代").set("link", "http://github.com/"));
+ map2.put("template", "在 @{group} 新建项目 @{project}");
+ list.add(map2);
+
+ return R.data(list);
+ }
+
+ /**
+ * 用户信息
+ */
+ @GetMapping("/dashboard/info")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "用户信息", notes = "用户信息")
+ public R info() {
+ Map<String, Object> map = new HashMap<>(16);
+ map.put("id", "trend-1");
+ map.put("updatedAt", "2019-01-01");
+ map.put("user", Kv.create().set("name", "曲丽丽").set("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"));
+ map.put("group", Kv.create().set("name", "高逼格设计天团").set("link", "http://github.com/"));
+ map.put("project", Kv.create().set("name", "六月迭代").set("link", "http://github.com/"));
+ map.put("template", "在 @{group} 新建项目 @{project}");
+ return R.data(map);
+ }
+
+ /**
+ * 签名信息
+ */
+ @PostMapping("/dashboard/sign")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "签名信息", notes = "签名信息")
+ public R sign() {
+ Map<String, Object> map = new HashMap<>(16);
+ map.put("user", Kv.create().set("name", "曲丽丽").set("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"));
+ return R.data(map);
+ }
+
+ /**
+ * 获取消息
+ */
+ @GetMapping("/notice/notices")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "消息", notes = "消息")
+ public R notices() {
+ List<Map<String, String>> list = new ArrayList<>();
+ Map<String, String> map1 = new HashMap<>(16);
+ map1.put("logo", "https://spring.io/img/homepage/icon-spring-framework.svg");
+ map1.put("title", "SpringBoot");
+ map1.put("description", "现在的web项目几乎都会用到spring框架,而要使用spring难免需要配置大量的xml配置文件,而 springboot的出现解 决了这一问题,一个项目甚至不用部署到服务器上直接开跑,真像springboot所说:“just run”。");
+ map1.put("member", "Chill");
+ map1.put("href", "http://spring.io/projects/spring-boot");
+ list.add(map1);
+
+ Map<String, String> map2 = new HashMap<>(16);
+ map2.put("logo", "https://spring.io/img/homepage/icon-spring-cloud.svg");
+ map2.put("title", "SpringCloud");
+ map2.put("description", "SpringCloud是基于SpringBoot的一整套实现微服务的框架。他提供了微服务开发所需的配置管理、服务发现、断路器、智能路由、微代理、控制总线、全局锁、决策竞选、分布式会话和集群状态管理等组件。");
+ map2.put("member", "Chill");
+ map2.put("href", "http://spring.io/projects/spring-cloud");
+ list.add(map2);
+
+ Map<String, String> map3 = new HashMap<>(16);
+ map3.put("logo", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1546359961068&di=05ff9406e6675ca9a58a525a7e7950b9&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D575314515%2C4268715674%26fm%3D214%26gp%3D0.jpg");
+ map3.put("title", "Mybatis");
+ map3.put("description", "MyBatis 是一款优秀的持久层框架,它支持定制化 SQL、存储过程以及高级映射。MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集。MyBatis 可以使用简单的 XML 或注解来配置和映射原生信息,将接口和 Java 的 POJOs(Plain Old Java Objects,普通的 Java对象)映射成数据库中的记录。");
+ map3.put("member", "Chill");
+ map3.put("href", "http://www.mybatis.org/mybatis-3/getting-started.html");
+ list.add(map3);
+
+ Map<String, String> map4 = new HashMap<>(16);
+ map4.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png");
+ map4.put("title", "React");
+ map4.put("description", "React 起源于 Facebook 的内部项目,因为该公司对市场上所有 JavaScript MVC 框架,都不满意,就决定自己写一套,用来架设Instagram 的网站。做出来以后,发现这套东西很好用,就在2013年5月开源了。");
+ map4.put("member", "Chill");
+ map4.put("href", "https://reactjs.org/");
+ list.add(map4);
+
+ Map<String, String> map5 = new HashMap<>(16);
+ map5.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png");
+ map5.put("title", "Ant Design");
+ map5.put("description", "蚂蚁金服体验技术部经过大量的项目实践和总结,沉淀出设计语言 Ant Design,这可不单纯只是设计原则、控件规范和视觉尺寸,还配套有前端代码实现方案。也就是说采用Ant Design后,UI设计和前端界面研发可同步完成,效率大大提升。");
+ map5.put("member", "Chill");
+ map5.put("href", "https://ant.design/docs/spec/introduce-cn");
+ list.add(map5);
+
+ Map<String, String> map6 = new HashMap<>(16);
+ map6.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png");
+ map6.put("title", "Ant Design Pro");
+ map6.put("description", "Ant Design Pro 是一个企业级开箱即用的中后台前端/设计解决方案。符合阿里追求的'敏捷的前端+强大的中台'的思想。");
+ map6.put("member", "Chill");
+ map6.put("href", "https://pro.ant.design");
+ list.add(map6);
+
+ return R.data(list);
+ }
+
+ /**
+ * 获取我的消息
+ */
+ @GetMapping("/notice/my-notices")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "消息", notes = "消息")
+ public R myNotices() {
+ List<Map<String, String>> list = new ArrayList<>();
+ Map<String, String> map1 = new HashMap<>(16);
+ map1.put("id", "000000001");
+ map1.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png");
+ map1.put("title", "你收到了 14 份新周报");
+ map1.put("datetime", "2018-08-09");
+ map1.put("type", "notification");
+ list.add(map1);
+
+ Map<String, String> map2 = new HashMap<>(16);
+ map2.put("id", "000000002");
+ map2.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png");
+ map2.put("title", "你推荐的 曲妮妮 已通过第三轮面试");
+ map2.put("datetime", "2018-08-08");
+ map2.put("type", "notification");
+ list.add(map2);
+
+
+ Map<String, String> map3 = new HashMap<>(16);
+ map3.put("id", "000000003");
+ map3.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg");
+ map3.put("title", "曲丽丽 评论了你");
+ map3.put("description", "描述信息描述信息描述信息");
+ map3.put("datetime", "2018-08-07");
+ map3.put("type", "message");
+ map3.put("clickClose", "true");
+ list.add(map3);
+
+
+ Map<String, String> map4 = new HashMap<>(16);
+ map4.put("id", "000000004");
+ map4.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg");
+ map4.put("title", "朱偏右 回复了你");
+ map4.put("description", "这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像");
+ map4.put("type", "message");
+ map4.put("datetime", "2018-08-07");
+ map4.put("clickClose", "true");
+ list.add(map4);
+
+
+ Map<String, String> map5 = new HashMap<>(16);
+ map5.put("id", "000000005");
+ map5.put("title", "任务名称");
+ map5.put("description", "任务需要在 2018-01-12 20:00 前启动");
+ map5.put("extra", "未开始");
+ map5.put("status", "todo");
+ map5.put("type", "event");
+ list.add(map5);
+
+ return R.data(list);
+ }
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/LeaveController.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/LeaveController.java
new file mode 100644
index 0000000..7378b7a
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/LeaveController.java
@@ -0,0 +1,66 @@
+/*
+ * 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.desk.controller;
+
+import lombok.AllArgsConstructor;
+import org.sxkj.common.cache.CacheNames;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.tenant.annotation.NonDS;
+import org.springblade.core.tool.api.R;
+import org.sxkj.desk.entity.ProcessLeave;
+import org.sxkj.desk.service.ILeaveService;
+import org.sxkj.system.cache.UserCache;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+/**
+ * 控制器
+ *
+ * @author Chill
+ */
+@NonDS
+@ApiIgnore
+@RestController
+@RequestMapping("/process/leave")
+@AllArgsConstructor
+public class LeaveController extends BladeController implements CacheNames {
+
+ private final ILeaveService leaveService;
+
+ /**
+ * 详情
+ *
+ * @param businessId 主键
+ */
+ @GetMapping("detail")
+ public R<ProcessLeave> detail(Long businessId) {
+ ProcessLeave detail = leaveService.getById(businessId);
+ detail.getFlow().setAssigneeName(UserCache.getUser(detail.getCreateUser()).getName());
+ return R.data(detail);
+ }
+
+ /**
+ * 新增或修改
+ *
+ * @param leave 请假信息
+ */
+ @PostMapping("start-process")
+ public R startProcess(@RequestBody ProcessLeave leave) {
+ return R.status(leaveService.startProcess(leave));
+ }
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/NoticeController.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/NoticeController.java
new file mode 100644
index 0000000..eb353a8
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/controller/NoticeController.java
@@ -0,0 +1,150 @@
+/*
+ * 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.desk.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.*;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tenant.annotation.TenantDS;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.sxkj.desk.entity.Notice;
+import org.sxkj.desk.feign.INoticeClient;
+import org.sxkj.desk.service.INoticeService;
+import org.sxkj.desk.vo.NoticeVO;
+import org.sxkj.desk.wrapper.NoticeWrapper;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.Map;
+
+/**
+ * 控制器
+ *
+ * @author Chill
+ */
+@TenantDS
+@RestController
+@RequestMapping("notice")
+@AllArgsConstructor
+@Api(value = "用户博客", tags = "博客接口")
+public class NoticeController extends BladeController {
+
+ private final INoticeService noticeService;
+
+ private final INoticeClient noticeClient;
+
+ /**
+ * 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入notice")
+ public R<NoticeVO> detail(Notice notice) {
+ Notice detail = noticeService.getOne(Condition.getQueryWrapper(notice));
+ return R.data(NoticeWrapper.build().entityVO(detail));
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/list")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"),
+ @ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string")
+ })
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入notice")
+ public R<IPage<NoticeVO>> list(@ApiIgnore @RequestParam Map<String, Object> notice, Query query) {
+ NoticeWrapper.build().noticeQuery(notice);
+ IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class));
+ return R.data(NoticeWrapper.build().pageVO(pages));
+ }
+
+ /**
+ * 多表联合查询自定义分页
+ */
+ @GetMapping("/page")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"),
+ @ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string")
+ })
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入notice")
+ public R<IPage<NoticeVO>> page(@ApiIgnore NoticeVO notice, Query query) {
+ IPage<NoticeVO> pages = noticeService.selectNoticePage(Condition.getPage(query), notice);
+ return R.data(pages);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入notice")
+ public R save(@RequestBody Notice notice) {
+ return R.status(noticeService.save(notice));
+ }
+
+ /**
+ * 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入notice")
+ public R update(@RequestBody Notice notice) {
+ return R.status(noticeService.updateById(notice));
+ }
+
+ /**
+ * 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入notice")
+ public R submit(@RequestBody Notice notice) {
+ return R.status(noticeService.saveOrUpdate(notice));
+ }
+
+ /**
+ * 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入notice")
+ public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+ boolean temp = noticeService.deleteLogic(Func.toLongList(ids));
+ return R.status(temp);
+ }
+
+ /**
+ * 远程调用分页接口
+ */
+ @GetMapping("/top")
+ @ApiOperationSupport(order = 8)
+ @ApiOperation(value = "分页远程调用", notes = "传入current,size")
+ public R<BladePage<Notice>> top(@ApiParam(value = "当前页") @RequestParam Integer current, @ApiParam(value = "每页显示条数") @RequestParam Integer size) {
+ BladePage<Notice> page = noticeClient.top(current, size);
+ return R.data(page);
+ }
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/entity/ProcessLeave.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/entity/ProcessLeave.java
new file mode 100644
index 0000000..98fe7e8
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/entity/ProcessLeave.java
@@ -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.sxkj.desk.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.sxkj.flow.core.entity.FlowEntity;
+
+import java.util.Date;
+
+/**
+ * 请假流程实体类
+ *
+ * @author Chill
+ */
+@Data
+@TableName("blade_process_leave")
+@EqualsAndHashCode(callSuper = true)
+public class ProcessLeave extends FlowEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 流程定义id
+ */
+ private String processDefinitionId;
+ /**
+ * 流程实例id
+ */
+ private String processInstanceId;
+ /**
+ * 请假开始时间
+ */
+ private Date startTime;
+ /**
+ * 请假结束时间
+ */
+ private Date endTime;
+ /**
+ * 请假理由
+ */
+ private String reason;
+ /**
+ * 审批人
+ */
+ private String taskUser;
+ /**
+ * 流程申请时间
+ */
+ private Date applyTime;
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/feign/NoticeClient.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/feign/NoticeClient.java
new file mode 100644
index 0000000..532d127
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/feign/NoticeClient.java
@@ -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.desk.feign;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import lombok.AllArgsConstructor;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tenant.annotation.NonDS;
+import org.sxkj.desk.entity.Notice;
+import org.sxkj.desk.service.INoticeService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
+
+/**
+ * Notice Feign
+ *
+ * @author Chill
+ */
+@NonDS
+@ApiIgnore()
+@RestController
+@AllArgsConstructor
+public class NoticeClient implements INoticeClient {
+
+ private final INoticeService service;
+
+ @Override
+ @GetMapping(TOP)
+ public BladePage<Notice> top(Integer current, Integer size) {
+ Query query = new Query();
+ query.setCurrent(current);
+ query.setSize(size);
+ IPage<Notice> page = service.page(Condition.getPage(query));
+ return BladePage.of(page);
+ }
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/LeaveMapper.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/LeaveMapper.java
new file mode 100644
index 0000000..9268b38
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/LeaveMapper.java
@@ -0,0 +1,29 @@
+/*
+ * 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.desk.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.sxkj.desk.entity.ProcessLeave;
+
+/**
+ * Mapper 接口
+ *
+ * @author Chill
+ */
+public interface LeaveMapper extends BaseMapper<ProcessLeave> {
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/LeaveMapper.xml b/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/LeaveMapper.xml
new file mode 100644
index 0000000..d0a6c62
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/LeaveMapper.xml
@@ -0,0 +1,6 @@
+<?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.desk.mapper.LeaveMapper">
+
+
+</mapper>
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/NoticeMapper.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/NoticeMapper.java
new file mode 100644
index 0000000..042f101
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/NoticeMapper.java
@@ -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.desk.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.sxkj.desk.entity.Notice;
+import org.sxkj.desk.vo.NoticeVO;
+
+import java.util.List;
+
+/**
+ * Mapper 接口
+ *
+ * @author Chill
+ */
+public interface NoticeMapper extends BaseMapper<Notice> {
+
+ /**
+ * 前N条数据
+ *
+ * @param number 数量
+ * @return List<Notice>
+ */
+ List<Notice> topList(Integer number);
+
+ /**
+ * 自定义分页
+ *
+ * @param page 分页
+ * @param notice 实体
+ * @return List<NoticeVO>
+ */
+ List<NoticeVO> selectNoticePage(IPage page, NoticeVO notice);
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/NoticeMapper.xml b/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/NoticeMapper.xml
new file mode 100644
index 0000000..ab4d5b3
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/mapper/NoticeMapper.xml
@@ -0,0 +1,54 @@
+<?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.desk.mapper.NoticeMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="noticeResultMap" type="org.sxkj.desk.entity.Notice">
+ <result column="id" property="id"/>
+ <result column="create_user" property="createUser"/>
+ <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"/>
+ <result column="release_time" property="releaseTime"/>
+ <result column="title" property="title"/>
+ <result column="content" property="content"/>
+ </resultMap>
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="noticeVOResultMap" type="org.sxkj.desk.vo.NoticeVO">
+ <result column="id" property="id"/>
+ <result column="create_user" property="createUser"/>
+ <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"/>
+ <result column="release_time" property="releaseTime"/>
+ <result column="title" property="title"/>
+ <result column="content" property="content"/>
+ </resultMap>
+
+ <select id="topList" resultMap="noticeResultMap">
+ select * from blade_notice limit #{number}
+ </select>
+
+ <select id="selectNoticePage" resultMap="noticeVOResultMap">
+ SELECT
+ n.*,
+ d.dict_value AS categoryName
+ FROM
+ blade_notice n
+ LEFT JOIN ( SELECT * FROM blade_dict WHERE CODE = 'notice' ) d ON n.category = d.dict_key
+ WHERE
+ n.is_deleted = 0 and n.tenant_id = #{notice.tenantId}
+ <if test="notice.title!=null">
+ and n.title like concat(concat('%', #{notice.title}), '%')
+ </if>
+ <if test="notice.category!=null">
+ and n.category = #{notice.category}
+ </if>
+ </select>
+
+</mapper>
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/ILeaveService.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/ILeaveService.java
new file mode 100644
index 0000000..a167cf0
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/ILeaveService.java
@@ -0,0 +1,37 @@
+/*
+ * 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.desk.service;
+
+import org.springblade.core.mp.base.BaseService;
+import org.sxkj.desk.entity.ProcessLeave;
+
+/**
+ * 服务类
+ *
+ * @author Chill
+ */
+public interface ILeaveService extends BaseService<ProcessLeave> {
+
+ /**
+ * 开启流程
+ *
+ * @param leave 请假实体
+ * @return boolean
+ */
+ boolean startProcess(ProcessLeave leave);
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/INoticeService.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/INoticeService.java
new file mode 100644
index 0000000..33abf93
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/INoticeService.java
@@ -0,0 +1,39 @@
+/*
+ * 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.desk.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.sxkj.desk.entity.Notice;
+import org.sxkj.desk.vo.NoticeVO;
+
+/**
+ * 服务类
+ *
+ * @author Chill
+ */
+public interface INoticeService extends BaseService<Notice> {
+
+ /**
+ * 自定义分页
+ * @param page
+ * @param notice
+ * @return
+ */
+ IPage<NoticeVO> selectNoticePage(IPage<NoticeVO> page, NoticeVO notice);
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/impl/LeaveServiceImpl.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/impl/LeaveServiceImpl.java
new file mode 100644
index 0000000..80adcad
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/impl/LeaveServiceImpl.java
@@ -0,0 +1,81 @@
+/*
+ * 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.desk.service.impl;
+
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.support.Kv;
+import org.springblade.core.tool.utils.DateUtil;
+import org.springblade.core.tool.utils.Func;
+import org.sxkj.desk.entity.ProcessLeave;
+import org.sxkj.desk.mapper.LeaveMapper;
+import org.sxkj.desk.service.ILeaveService;
+import org.sxkj.flow.core.constant.ProcessConstant;
+import org.sxkj.flow.core.entity.BladeFlow;
+import org.sxkj.flow.core.feign.IFlowClient;
+import org.sxkj.flow.core.utils.FlowUtil;
+import org.sxkj.flow.core.utils.TaskUtil;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 服务实现类
+ *
+ * @author Chill
+ */
+@Slf4j
+@Service
+@AllArgsConstructor
+public class LeaveServiceImpl extends BaseServiceImpl<LeaveMapper, ProcessLeave> implements ILeaveService {
+
+ private final IFlowClient flowClient;
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ // @GlobalTransactional
+ public boolean startProcess(ProcessLeave leave) {
+ String businessTable = FlowUtil.getBusinessTable(ProcessConstant.LEAVE_KEY);
+ if (Func.isEmpty(leave.getId())) {
+ // 保存leave
+ leave.setApplyTime(DateUtil.now());
+ save(leave);
+ // 启动流程
+ Kv variables = Kv.create()
+ .set(ProcessConstant.TASK_VARIABLE_CREATE_USER, AuthUtil.getUserName())
+ .set("taskUser", TaskUtil.getTaskUser(leave.getTaskUser()))
+ .set("days", DateUtil.between(leave.getStartTime(), leave.getEndTime()).toDays());
+ R<BladeFlow> result = flowClient.startProcessInstanceById(leave.getProcessDefinitionId(), FlowUtil.getBusinessKey(businessTable, String.valueOf(leave.getId())), variables);
+ if (result.isSuccess()) {
+ log.debug("流程已启动,流程ID:" + result.getData().getProcessInstanceId());
+ // 返回流程id写入leave
+ leave.setProcessInstanceId(result.getData().getProcessInstanceId());
+ updateById(leave);
+ } else {
+ throw new ServiceException("开启流程失败");
+ }
+ } else {
+
+ updateById(leave);
+ }
+ return true;
+ }
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/impl/NoticeServiceImpl.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/impl/NoticeServiceImpl.java
new file mode 100644
index 0000000..42f8bb3
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/service/impl/NoticeServiceImpl.java
@@ -0,0 +1,43 @@
+/*
+ * 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.desk.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.sxkj.desk.entity.Notice;
+import org.sxkj.desk.mapper.NoticeMapper;
+import org.sxkj.desk.service.INoticeService;
+import org.sxkj.desk.vo.NoticeVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * 服务实现类
+ *
+ * @author Chill
+ */
+@Service
+public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> implements INoticeService {
+
+ @Override
+ public IPage<NoticeVO> selectNoticePage(IPage<NoticeVO> page, NoticeVO notice) {
+ // 若不使用mybatis-plus自带的分页方法,则不会自动带入tenantId,所以我们需要自行注入
+ notice.setTenantId(AuthUtil.getTenantId());
+ return page.setRecords(baseMapper.selectNoticePage(page, notice));
+ }
+
+}
diff --git a/drone-service/drone-desk/src/main/java/org/sxkj/desk/wrapper/NoticeWrapper.java b/drone-service/drone-desk/src/main/java/org/sxkj/desk/wrapper/NoticeWrapper.java
new file mode 100644
index 0000000..0714a1e
--- /dev/null
+++ b/drone-service/drone-desk/src/main/java/org/sxkj/desk/wrapper/NoticeWrapper.java
@@ -0,0 +1,64 @@
+/*
+ * 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.desk.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.Func;
+import org.sxkj.desk.entity.Notice;
+import org.sxkj.desk.vo.NoticeVO;
+import org.sxkj.system.cache.DictCache;
+import org.sxkj.system.enums.DictEnum;
+
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * Notice包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class NoticeWrapper extends BaseEntityWrapper<Notice, NoticeVO> {
+
+ public static NoticeWrapper build() {
+ return new NoticeWrapper();
+ }
+
+ @Override
+ public NoticeVO entityVO(Notice notice) {
+ NoticeVO noticeVO = Objects.requireNonNull(BeanUtil.copy(notice, NoticeVO.class));
+ String dictValue = DictCache.getValue(DictEnum.NOTICE, noticeVO.getCategory());
+ noticeVO.setCategoryName(dictValue);
+ return noticeVO;
+ }
+
+ /**
+ * 查询条件处理
+ */
+ public void noticeQuery(Map<String, Object> notice) {
+ // 此场景仅在 pg数据库 map类型传参的情况下需要处理,entity传参已经包含数据类型,则无需关心
+ // 针对 pg数据库 int类型字段查询需要强转的处理示例
+ String searchKey = "category";
+ if (Func.isNotEmpty(notice.get(searchKey))) {
+ // 数据库字段为int类型,设置"="查询,具体查询参数请见 @org.springblade.core.mp.support.SqlKeyword
+ notice.put(searchKey.concat("_equal"), Func.toInt(notice.get(searchKey)));
+ // 默认"like"查询,pg数据库 场景会报错,所以将其删除
+ notice.remove(searchKey);
+ }
+ }
+
+}
diff --git a/drone-service/drone-desk/src/main/resources/application-dev.yml b/drone-service/drone-desk/src/main/resources/application-dev.yml
new file mode 100644
index 0000000..2a4cb8c
--- /dev/null
+++ b/drone-service/drone-desk/src/main/resources/application-dev.yml
@@ -0,0 +1,11 @@
+#服务器端口
+server:
+ port: 8105
+
+#数据源配置
+spring:
+ datasource:
+ url: ${blade.datasource.dev.url}
+ username: ${blade.datasource.dev.username}
+ password: ${blade.datasource.dev.password}
+
diff --git a/drone-service/drone-desk/src/main/resources/application-prod.yml b/drone-service/drone-desk/src/main/resources/application-prod.yml
new file mode 100644
index 0000000..08082e2
--- /dev/null
+++ b/drone-service/drone-desk/src/main/resources/application-prod.yml
@@ -0,0 +1,10 @@
+#服务器端口
+server:
+ port: 8105
+
+#数据源配置
+spring:
+ datasource:
+ url: ${blade.datasource.prod.url}
+ username: ${blade.datasource.prod.username}
+ password: ${blade.datasource.prod.password}
diff --git a/drone-service/drone-desk/src/main/resources/application-test.yml b/drone-service/drone-desk/src/main/resources/application-test.yml
new file mode 100644
index 0000000..a40a289
--- /dev/null
+++ b/drone-service/drone-desk/src/main/resources/application-test.yml
@@ -0,0 +1,10 @@
+#服务器端口
+server:
+ port: 8105
+
+#数据源配置
+spring:
+ datasource:
+ url: ${blade.datasource.test.url}
+ username: ${blade.datasource.test.username}
+ password: ${blade.datasource.test.password}
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/mapper/GdSupplyDemandAuditAttachmentMapper.xml b/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/mapper/GdSupplyDemandAuditAttachmentMapper.xml
index 96f6d58..0e1e0d2 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/mapper/GdSupplyDemandAuditAttachmentMapper.xml
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/mapper/GdSupplyDemandAuditAttachmentMapper.xml
@@ -20,6 +20,7 @@
<resultMap id="gdSupplyDemandAuditAttachmentVOResultMap" type="org.sxkj.gd.orderdata.vo.GdSupplyDemandAuditAttachmentVO" extends="gdSupplyDemandAuditAttachmentResultMap">
<result column="file_url" property="fileUrl"/>
<result column="file_size" property="fileSize"/>
+ <result column="file_original_name" property="fileOriginalName"/>
</resultMap>
@@ -50,7 +51,8 @@
select
audit_attachment.*,
attach.link as file_url,
- round(attach.attach_size / 1024 / 1024, 2) as file_size
+ round(attach.attach_size / 1024 / 1024, 2) as file_size,
+ attach.original_name as file_original_name
from ja_gd_supply_demand_audit_attachment audit_attachment
left join blade_attach attach on attach.id = audit_attachment.attach_id and attach.is_deleted = 0
<where>
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/vo/GdSupplyDemandAuditAttachmentVO.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/vo/GdSupplyDemandAuditAttachmentVO.java
index 64d55dd..95088ea 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/vo/GdSupplyDemandAuditAttachmentVO.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/vo/GdSupplyDemandAuditAttachmentVO.java
@@ -40,4 +40,7 @@
@ApiModelProperty(value = "文件大小(MB)")
private BigDecimal fileSize;
+ @ApiModelProperty(value = "附件原名")
+ private String fileOriginalName;
+
}
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdClueEventController.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdClueEventController.java
index 8c60fd6..cdc07d6 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdClueEventController.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdClueEventController.java
@@ -32,6 +32,7 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.sxkj.gd.workorder.entity.GdClueEventEntity;
+import org.sxkj.gd.workorder.param.GdClueEventRejectParam;
import org.sxkj.gd.workorder.vo.GdClueEventVO;
import org.sxkj.gd.workorder.excel.GdClueEventExcel;
import org.sxkj.gd.workorder.wrapper.GdClueEventWrapper;
@@ -76,8 +77,10 @@
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入gdClueEvent")
public R<IPage<GdClueEventVO>> list(@ApiIgnore @RequestParam Map<String, Object> gdClueEvent, Query query) {
- IPage<GdClueEventEntity> pages = gdClueEventService.page(Condition.getPage(query), Condition.getQueryWrapper(gdClueEvent, GdClueEventEntity.class));
- return R.data(GdClueEventWrapper.build().pageVO(pages));
+ QueryWrapper<GdClueEventEntity> queryWrapper = Condition.getQueryWrapper(gdClueEvent, GdClueEventEntity.class);
+ queryWrapper.lambda().eq(GdClueEventEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
+ IPage<GdClueEventVO> pages = gdClueEventService.selectGdClueEventList(Condition.getPage(query), queryWrapper);
+ return R.data(pages);
}
/**
@@ -90,26 +93,26 @@
IPage<GdClueEventVO> pages = gdClueEventService.selectGdClueEventPage(Condition.getPage(query), gdClueEvent);
return R.data(pages);
}
-
- /**
- * 事件表(线索事件) 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入gdClueEvent")
- public R save(@Valid @RequestBody GdClueEventEntity gdClueEvent) {
- return R.status(gdClueEventService.save(gdClueEvent));
- }
-
- /**
- * 事件表(线索事件) 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入gdClueEvent")
- public R update(@Valid @RequestBody GdClueEventEntity gdClueEvent) {
- return R.status(gdClueEventService.updateById(gdClueEvent));
- }
+//
+// /**
+// * 事件表(线索事件) 新增
+// */
+// @PostMapping("/save")
+// @ApiOperationSupport(order = 4)
+// @ApiOperation(value = "新增", notes = "传入gdClueEvent")
+// public R save(@Valid @RequestBody GdClueEventEntity gdClueEvent) {
+// return R.status(gdClueEventService.save(gdClueEvent));
+// }
+//
+// /**
+// * 事件表(线索事件) 修改
+// */
+// @PostMapping("/update")
+// @ApiOperationSupport(order = 5)
+// @ApiOperation(value = "修改", notes = "传入gdClueEvent")
+// public R update(@Valid @RequestBody GdClueEventEntity gdClueEvent) {
+// return R.status(gdClueEventService.updateById(gdClueEvent));
+// }
/**
* 事件表(线索事件) 新增或修改
@@ -131,21 +134,30 @@
return R.status(gdClueEventService.deleteLogic(Func.toLongList(ids)));
}
-
/**
- * 导出数据
+ * 事件驳回
*/
- @GetMapping("/export-gdClueEvent")
- @ApiOperationSupport(order = 9)
- @ApiOperation(value = "导出数据", notes = "传入gdClueEvent")
- public void exportGdClueEvent(@ApiIgnore @RequestParam Map<String, Object> gdClueEvent, BladeUser bladeUser, HttpServletResponse response) {
- QueryWrapper<GdClueEventEntity> queryWrapper = Condition.getQueryWrapper(gdClueEvent, GdClueEventEntity.class);
- //if (!AuthUtil.isAdministrator()) {
- // queryWrapper.lambda().eq(GdClueEvent::getTenantId, bladeUser.getTenantId());
- //}
- queryWrapper.lambda().eq(GdClueEventEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
- List<GdClueEventExcel> list = gdClueEventService.exportGdClueEvent(queryWrapper);
- ExcelUtil.export(response, "事件表(线索事件)数据" + DateUtil.time(), "事件表(线索事件)数据表", list, GdClueEventExcel.class);
+ @PostMapping("/reject")
+ @ApiOperationSupport(order = 8)
+ @ApiOperation(value = "驳回", notes = "传入事件ID")
+ public R reject(@Valid @RequestBody GdClueEventRejectParam rejectParam) {
+ return R.status(gdClueEventService.rejectClueEvent(rejectParam));
}
+// /**
+// * 导出数据
+// */
+// @GetMapping("/export-gdClueEvent")
+// @ApiOperationSupport(order = 9)
+// @ApiOperation(value = "导出数据", notes = "传入gdClueEvent")
+// public void exportGdClueEvent(@ApiIgnore @RequestParam Map<String, Object> gdClueEvent, BladeUser bladeUser, HttpServletResponse response) {
+// QueryWrapper<GdClueEventEntity> queryWrapper = Condition.getQueryWrapper(gdClueEvent, GdClueEventEntity.class);
+// //if (!AuthUtil.isAdministrator()) {
+// // queryWrapper.lambda().eq(GdClueEvent::getTenantId, bladeUser.getTenantId());
+// //}
+// queryWrapper.lambda().eq(GdClueEventEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
+// List<GdClueEventExcel> list = gdClueEventService.exportGdClueEvent(queryWrapper);
+// ExcelUtil.export(response, "事件表(线索事件)数据" + DateUtil.time(), "事件表(线索事件)数据表", list, GdClueEventExcel.class);
+// }
+
}
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdTaskResultController.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdTaskResultController.java
index 7d37858..fa6fc63 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdTaskResultController.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdTaskResultController.java
@@ -35,6 +35,8 @@
import org.sxkj.gd.workorder.vo.GdTaskResultVO;
import org.sxkj.gd.workorder.excel.GdTaskResultExcel;
import org.sxkj.gd.workorder.wrapper.GdTaskResultWrapper;
+import org.sxkj.gd.workorder.param.GdClueEventDistributeParam;
+import org.sxkj.gd.workorder.service.IGdClueEventService;
import org.sxkj.gd.workorder.service.IGdTaskResultService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
@@ -58,6 +60,7 @@
public class GdTaskResultController extends BladeController {
private final IGdTaskResultService gdTaskResultService;
+ private final IGdClueEventService gdClueEventService;
/**
* 成果表 详情
@@ -99,26 +102,26 @@
IPage<GdTaskResultVO> pages = gdTaskResultService.selectGdTaskResultPage(Condition.getPage(query), gdTaskResult);
return R.data(pages);
}
-
- /**
- * 成果表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入gdTaskResult")
- public R save(@Valid @RequestBody GdTaskResultEntity gdTaskResult) {
- return R.status(gdTaskResultService.save(gdTaskResult));
- }
-
- /**
- * 成果表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入gdTaskResult")
- public R update(@Valid @RequestBody GdTaskResultEntity gdTaskResult) {
- return R.status(gdTaskResultService.updateById(gdTaskResult));
- }
+//
+// /**
+// * 成果表 新增
+// */
+// @PostMapping("/save")
+// @ApiOperationSupport(order = 4)
+// @ApiOperation(value = "新增", notes = "传入gdTaskResult")
+// public R save(@Valid @RequestBody GdTaskResultEntity gdTaskResult) {
+// return R.status(gdTaskResultService.save(gdTaskResult));
+// }
+//
+// /**
+// * 成果表 修改
+// */
+// @PostMapping("/update")
+// @ApiOperationSupport(order = 5)
+// @ApiOperation(value = "修改", notes = "传入gdTaskResult")
+// public R update(@Valid @RequestBody GdTaskResultEntity gdTaskResult) {
+// return R.status(gdTaskResultService.updateById(gdTaskResult));
+// }
/**
* 成果表 新增或修改
@@ -140,6 +143,15 @@
return R.status(gdTaskResultService.deleteLogic(Func.toLongList(ids)));
}
+ /**
+ * 成果分发事件
+ */
+ @PostMapping("/distribute")
+ @ApiOperationSupport(order = 8)
+ @ApiOperation(value = "分发事件", notes = "传入分发参数")
+ public R distribute(@Valid @RequestBody GdClueEventDistributeParam distributeParam) {
+ return R.status(gdClueEventService.distributeClueEvent(distributeParam));
+ }
/**
* 导出数据
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdClueEventEntity.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdClueEventEntity.java
index 182dd76..3602ba0 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdClueEventEntity.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdClueEventEntity.java
@@ -23,8 +23,6 @@
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
-import java.util.Date;
-
/**
* 事件表(线索事件) 实体类
*
@@ -51,27 +49,27 @@
* 工单处置人
*/
@ApiModelProperty(value = "工单处置人")
- private String disposeUser;
+ private Long disposeUser;
/**
* 处置部门
*/
@ApiModelProperty(value = "处置部门")
- private String disposeDept;
+ private Long disposeDept;
/**
- * 分发时间
+ * 经度
*/
- @ApiModelProperty(value = "分发时间")
- private Date distributeTime;
+ @ApiModelProperty(value = "经度")
+ private Double longitude;
/**
- * 工单位置(经纬度)
+ * 纬度
*/
- @ApiModelProperty(value = "工单位置(经纬度)")
- private byte[] workOrderLocation;
+ @ApiModelProperty(value = "纬度")
+ private Double latitude;
/**
- * 状态:0未知、1已分发、2已驳回
+ * 状态:0未分发、1已分发、2已驳回
*/
- @ApiModelProperty(value = "状态:0未知、1已分发、2已驳回")
- private Byte eventStatus;
+ @ApiModelProperty(value = "状态:0未分发、1已分发、2已驳回")
+ private Integer eventStatus;
/**
* 区域编码
*/
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdTaskResultEntity.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdTaskResultEntity.java
index 5fdb2d1..4f592e7 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdTaskResultEntity.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdTaskResultEntity.java
@@ -63,15 +63,20 @@
@ApiModelProperty(value = "照片数据(JSON格式)")
private String photoData;
/**
- * 位置(经纬度)
+ * 经度
*/
- @ApiModelProperty(value = "位置(经纬度)")
- private byte[] location;
+ @ApiModelProperty(value = "经度")
+ private Double longitude;
+ /**
+ * 纬度
+ */
+ @ApiModelProperty(value = "纬度")
+ private Double latitude;
/**
* 分发事件状态:0未分发、1已分发、2已驳回
*/
@ApiModelProperty(value = "分发事件状态:0未分发、1已分发、2已驳回")
- private Byte distributeStatus;
+ private Integer distributeStatus;
/**
* 区域编码
*/
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/excel/GdClueEventExcel.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/excel/GdClueEventExcel.java
index 405dc61..aa4fe02 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/excel/GdClueEventExcel.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/excel/GdClueEventExcel.java
@@ -24,7 +24,6 @@
import lombok.Data;
import java.io.Serializable;
-import java.util.Date;
/**
@@ -66,35 +65,23 @@
@ExcelProperty("处置部门")
private String disposeDept;
/**
- * 分发人员
+ * 经度
*/
@ColumnWidth(20)
- @ExcelProperty("分发人员")
- private String distributeUser;
+ @ExcelProperty("经度")
+ private Double longitude;
/**
- * 分发部门
+ * 纬度
*/
@ColumnWidth(20)
- @ExcelProperty("分发部门")
- private String distributeDept;
+ @ExcelProperty("纬度")
+ private Double latitude;
/**
- * 分发时间
+ * 状态:0未分发、1已分发、2已驳回
*/
@ColumnWidth(20)
- @ExcelProperty("分发时间")
- private Date distributeTime;
- /**
- * 工单位置(经纬度)
- */
- @ColumnWidth(20)
- @ExcelProperty("工单位置(经纬度)")
- private byte[] workOrderLocation;
- /**
- * 状态:0未知、1已分发、2已驳回
- */
- @ColumnWidth(20)
- @ExcelProperty("状态:0未知、1已分发、2已驳回")
- private Byte eventStatus;
+ @ExcelProperty("状态:0未分发、1已分发、2已驳回")
+ private Integer eventStatus;
/**
* 区域编码
*/
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/excel/GdTaskResultExcel.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/excel/GdTaskResultExcel.java
index e804d5c..2020b25 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/excel/GdTaskResultExcel.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/excel/GdTaskResultExcel.java
@@ -72,11 +72,17 @@
@ExcelProperty("照片数据(JSON格式)")
private String photoData;
/**
- * 位置(经纬度)
+ * 经度
*/
@ColumnWidth(20)
- @ExcelProperty("位置(经纬度)")
- private byte[] location;
+ @ExcelProperty("经度")
+ private Double longitude;
+ /**
+ * 纬度
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("纬度")
+ private Double latitude;
/**
* 分发事件状态:0未分发、1已分发、2已驳回
*/
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.java
index abd149b..7963093 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.java
@@ -42,6 +42,15 @@
*/
List<GdClueEventVO> selectGdClueEventPage(IPage page, GdClueEventVO gdClueEvent);
+ /**
+ * 列表查询
+ *
+ * @param page
+ * @param queryWrapper
+ * @return
+ */
+ List<GdClueEventVO> selectGdClueEventList(IPage page, @Param("ew") Wrapper<GdClueEventEntity> queryWrapper);
+
/**
* 获取导出数据
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml
index 0127f83..250bcbc 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml
@@ -9,8 +9,8 @@
<result column="work_order_id" property="workOrderId"/>
<result column="dispose_user" property="disposeUser"/>
<result column="dispose_dept" property="disposeDept"/>
- <result column="distribute_time" property="distributeTime"/>
- <result column="work_order_location" property="workOrderLocation"/>
+ <result column="longitude" property="longitude"/>
+ <result column="latitude" property="latitude"/>
<result column="event_status" property="eventStatus"/>
<result column="area_code" property="areaCode"/>
<result column="create_user" property="createUser"/>
@@ -22,13 +22,54 @@
<result column="is_deleted" property="isDeleted"/>
</resultMap>
+ <resultMap id="gdClueEventVoResultMap" type="org.sxkj.gd.workorder.vo.GdClueEventVO">
+ <result column="id" property="id"/>
+ <result column="result_id" property="resultId"/>
+ <result column="work_order_id" property="workOrderId"/>
+ <result column="dispose_user" property="disposeUser"/>
+ <result column="dispose_dept" property="disposeDept"/>
+ <result column="dispose_user_name" property="disposeUserName"/>
+ <result column="dispose_dept_name" property="disposeDeptName"/>
+ <result column="longitude" property="longitude"/>
+ <result column="latitude" property="latitude"/>
+ <result column="event_status" property="eventStatus"/>
+ <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>
+
+ <resultMap id="gdClueEventExcelResultMap" type="org.sxkj.gd.workorder.excel.GdClueEventExcel">
+ <result column="result_id" property="resultId"/>
+ <result column="work_order_id" property="workOrderId"/>
+ <result column="dispose_user" property="disposeUser"/>
+ <result column="dispose_dept" property="disposeDept"/>
+ <result column="longitude" property="longitude"/>
+ <result column="latitude" property="latitude"/>
+ <result column="event_status" property="eventStatus"/>
+ <result column="area_code" property="areaCode"/>
+ <result column="is_deleted" property="isDeleted"/>
+ </resultMap>
<select id="selectGdClueEventPage" resultMap="gdClueEventResultMap">
select * from ja_gd_clue_event where is_deleted = 0
</select>
+ <select id="selectGdClueEventList" resultMap="gdClueEventVoResultMap">
+ select ce.*,
+ ifnull(bu.real_name, bu.name) as dispose_user_name,
+ bd.dept_name as dispose_dept_name
+ from (select * from ja_gd_clue_event ${ew.customSqlSegment}) ce
+ left join blade_user bu on bu.id = ce.dispose_user and bu.is_deleted = 0
+ left join blade_dept bd on bd.id = ce.dispose_dept and bd.is_deleted = 0
+ </select>
- <select id="exportGdClueEvent" resultType="org.sxkj.gd.workorder.excel.GdClueEventExcel">
+
+ <select id="exportGdClueEvent" resultMap="gdClueEventExcelResultMap">
SELECT * FROM ja_gd_clue_event ${ew.customSqlSegment}
</select>
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdTaskResultMapper.xml b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdTaskResultMapper.xml
index f854a7d..36fe70d 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdTaskResultMapper.xml
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdTaskResultMapper.xml
@@ -10,7 +10,8 @@
<result column="result_url" property="resultUrl"/>
<result column="shoot_time" property="shootTime"/>
<result column="photo_data" property="photoData"/>
- <result column="location" property="location"/>
+ <result column="longitude" property="longitude"/>
+ <result column="latitude" property="latitude"/>
<result column="distribute_status" property="distributeStatus"/>
<result column="area_code" property="areaCode"/>
<result column="create_user" property="createUser"/>
@@ -22,6 +23,19 @@
<result column="is_deleted" property="isDeleted"/>
<result column="distribute_user_name" property="distributeUserName"/>
<result column="distribute_dept_name" property="distributeDeptName"/>
+ </resultMap>
+
+ <resultMap id="gdTaskResultExcelResultMap" type="org.sxkj.gd.workorder.excel.GdTaskResultExcel">
+ <result column="patrol_task_id" property="patrolTaskId"/>
+ <result column="result_code" property="resultCode"/>
+ <result column="result_url" property="resultUrl"/>
+ <result column="shoot_time" property="shootTime"/>
+ <result column="photo_data" property="photoData"/>
+ <result column="longitude" property="longitude"/>
+ <result column="latitude" property="latitude"/>
+ <result column="distribute_status" property="distributeStatus"/>
+ <result column="area_code" property="areaCode"/>
+ <result column="is_deleted" property="isDeleted"/>
</resultMap>
@@ -42,7 +56,7 @@
</select>
- <select id="exportGdTaskResult" resultType="org.sxkj.gd.workorder.excel.GdTaskResultExcel">
+ <select id="exportGdTaskResult" resultMap="gdTaskResultExcelResultMap">
SELECT * FROM ja_gd_task_result ${ew.customSqlSegment}
</select>
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/param/GdClueEventDistributeParam.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/param/GdClueEventDistributeParam.java
new file mode 100644
index 0000000..017f055
--- /dev/null
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/param/GdClueEventDistributeParam.java
@@ -0,0 +1,59 @@
+package org.sxkj.gd.workorder.param;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+@Data
+public class GdClueEventDistributeParam {
+
+ /**
+ * 成果ID
+ */
+ @ApiModelProperty(value = "成果ID", required = true)
+ @NotNull(message = "成果ID不能为空")
+ private Long resultId;
+
+ /**
+ * 工单任务ID
+ */
+ @ApiModelProperty(value = "工单任务ID", required = true)
+ @NotNull(message = "工单任务ID不能为空")
+ private Long workOrderId;
+
+ /**
+ * 工单处置人
+ */
+ @ApiModelProperty(value = "工单处置人", required = true)
+ @NotBlank(message = "工单处置人不能为空")
+ private Long disposeUser;
+
+ /**
+ * 处置部门
+ */
+ @ApiModelProperty(value = "处置部门", required = true)
+ @NotBlank(message = "处置部门不能为空")
+ private Long disposeDept;
+
+ /**
+ * 经度
+ */
+ @ApiModelProperty(value = "经度", required = true)
+ @NotNull(message = "经度不能为空")
+ private Double longitude;
+
+ /**
+ * 纬度
+ */
+ @ApiModelProperty(value = "纬度", required = true)
+ @NotNull(message = "纬度不能为空")
+ private Double latitude;
+
+ /**
+ * 区域编码
+ */
+ @ApiModelProperty(value = "区域编码")
+ private String areaCode;
+}
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/param/GdClueEventRejectParam.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/param/GdClueEventRejectParam.java
new file mode 100644
index 0000000..05a1004
--- /dev/null
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/param/GdClueEventRejectParam.java
@@ -0,0 +1,17 @@
+package org.sxkj.gd.workorder.param;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class GdClueEventRejectParam {
+
+ /**
+ * 事件ID
+ */
+ @ApiModelProperty(value = "事件ID", required = true)
+ @NotNull(message = "事件ID不能为空")
+ private Long eventId;
+}
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/IGdClueEventService.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/IGdClueEventService.java
index 51786ca..db91143 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/IGdClueEventService.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/IGdClueEventService.java
@@ -18,6 +18,8 @@
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.sxkj.gd.workorder.entity.GdClueEventEntity;
+import org.sxkj.gd.workorder.param.GdClueEventDistributeParam;
+import org.sxkj.gd.workorder.param.GdClueEventRejectParam;
import org.sxkj.gd.workorder.vo.GdClueEventVO;
import org.sxkj.gd.workorder.excel.GdClueEventExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -40,6 +42,30 @@
*/
IPage<GdClueEventVO> selectGdClueEventPage(IPage<GdClueEventVO> page, GdClueEventVO gdClueEvent);
+ /**
+ * 列表查询
+ *
+ * @param page
+ * @param queryWrapper
+ * @return
+ */
+ IPage<GdClueEventVO> selectGdClueEventList(IPage<GdClueEventVO> page, Wrapper<GdClueEventEntity> queryWrapper);
+
+ /**
+ * 分发事件
+ *
+ * @param distributeParam
+ * @return
+ */
+ boolean distributeClueEvent(GdClueEventDistributeParam distributeParam);
+
+ /**
+ * 驳回事件
+ *
+ * @param rejectParam
+ * @return
+ */
+ boolean rejectClueEvent(GdClueEventRejectParam rejectParam);
/**
* 导出数据
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdClueEventServiceImpl.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdClueEventServiceImpl.java
index 8192bee..52e3614 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdClueEventServiceImpl.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdClueEventServiceImpl.java
@@ -16,15 +16,25 @@
*/
package org.sxkj.gd.workorder.service.impl;
-import org.sxkj.gd.workorder.entity.GdClueEventEntity;
-import org.sxkj.gd.workorder.vo.GdClueEventVO;
-import org.sxkj.gd.workorder.excel.GdClueEventExcel;
-import org.sxkj.gd.workorder.mapper.GdClueEventMapper;
-import org.sxkj.gd.workorder.service.IGdClueEventService;
-import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import lombok.AllArgsConstructor;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.utils.StringUtil;
+import org.sxkj.gd.workorder.entity.GdClueEventEntity;
+import org.sxkj.gd.workorder.entity.GdTaskResultEntity;
+import org.sxkj.gd.workorder.excel.GdClueEventExcel;
+import org.sxkj.gd.workorder.mapper.GdClueEventMapper;
+import org.sxkj.gd.workorder.param.GdClueEventDistributeParam;
+import org.sxkj.gd.workorder.param.GdClueEventRejectParam;
+import org.sxkj.gd.workorder.service.IGdClueEventService;
+import org.sxkj.gd.workorder.service.IGdTaskResultService;
+import org.sxkj.gd.workorder.vo.GdClueEventVO;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import org.springblade.core.mp.base.BaseServiceImpl;
+
+import java.util.Date;
import java.util.List;
/**
@@ -34,13 +44,87 @@
* @since 2026-01-14
*/
@Service
+@AllArgsConstructor
public class GdClueEventServiceImpl extends BaseServiceImpl<GdClueEventMapper, GdClueEventEntity> implements IGdClueEventService {
+
+ private final IGdTaskResultService gdTaskResultService;
@Override
public IPage<GdClueEventVO> selectGdClueEventPage(IPage<GdClueEventVO> page, GdClueEventVO gdClueEvent) {
return page.setRecords(baseMapper.selectGdClueEventPage(page, gdClueEvent));
}
+ @Override
+ public IPage<GdClueEventVO> selectGdClueEventList(IPage<GdClueEventVO> page, Wrapper<GdClueEventEntity> queryWrapper) {
+ return page.setRecords(baseMapper.selectGdClueEventList(page, queryWrapper));
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public boolean distributeClueEvent(GdClueEventDistributeParam distributeParam) {
+ GdTaskResultEntity taskResult = gdTaskResultService.getById(distributeParam.getResultId());
+ if (taskResult == null || (taskResult.getIsDeleted() != null && taskResult.getIsDeleted() != 0)) {
+ throw new RuntimeException("成果不存在");
+ }
+ if (taskResult.getDistributeStatus() != null && taskResult.getDistributeStatus() == 1) {
+ throw new RuntimeException("成果已分发,无法再次分发");
+ }
+ GdClueEventEntity clueEvent = new GdClueEventEntity();
+ clueEvent.setResultId(distributeParam.getResultId());
+ clueEvent.setWorkOrderId(distributeParam.getWorkOrderId());
+ clueEvent.setDisposeUser(distributeParam.getDisposeUser());
+ clueEvent.setDisposeDept(distributeParam.getDisposeDept());
+ clueEvent.setLongitude(distributeParam.getLongitude());
+ clueEvent.setLatitude(distributeParam.getLatitude());
+ clueEvent.setEventStatus(1);
+ if (StringUtil.isBlank(distributeParam.getAreaCode())) {
+ clueEvent.setAreaCode(taskResult.getAreaCode());
+ } else {
+ clueEvent.setAreaCode(distributeParam.getAreaCode());
+ }
+ clueEvent.setCreateUser(AuthUtil.getUserId());
+ clueEvent.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
+ clueEvent.setCreateTime(new Date());
+ if (!save(clueEvent)) {
+ throw new RuntimeException("事件分发失败");
+ }
+ taskResult.setDistributeStatus(1);
+ taskResult.setUpdateUser(AuthUtil.getUserId());
+ taskResult.setUpdateTime(new Date());
+ if (!gdTaskResultService.updateById(taskResult)) {
+ throw new RuntimeException("成果状态更新失败");
+ }
+ return true;
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public boolean rejectClueEvent(GdClueEventRejectParam rejectParam) {
+ GdClueEventEntity clueEvent = getById(rejectParam.getEventId());
+ if (clueEvent == null || (clueEvent.getIsDeleted() != null && clueEvent.getIsDeleted() != 0)) {
+ throw new RuntimeException("事件不存在");
+ }
+ if (clueEvent.getEventStatus() == null || clueEvent.getEventStatus() != 1) {
+ throw new RuntimeException("事件当前状态无法驳回");
+ }
+ clueEvent.setEventStatus(2);
+ clueEvent.setUpdateUser(AuthUtil.getUserId());
+ clueEvent.setUpdateTime(new Date());
+ if (!updateById(clueEvent)) {
+ throw new RuntimeException("事件驳回失败");
+ }
+ GdTaskResultEntity taskResult = gdTaskResultService.getById(clueEvent.getResultId());
+ if (taskResult == null || (taskResult.getIsDeleted() != null && taskResult.getIsDeleted() != 0)) {
+ throw new RuntimeException("成果不存在");
+ }
+ taskResult.setDistributeStatus(2);
+ taskResult.setUpdateUser(AuthUtil.getUserId());
+ taskResult.setUpdateTime(new Date());
+ if (!gdTaskResultService.updateById(taskResult)) {
+ throw new RuntimeException("成果状态更新失败");
+ }
+ return true;
+ }
@Override
public List<GdClueEventExcel> exportGdClueEvent(Wrapper<GdClueEventEntity> queryWrapper) {
diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/vo/GdClueEventVO.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/vo/GdClueEventVO.java
index 3105a8c..8dd38f5 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/vo/GdClueEventVO.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/vo/GdClueEventVO.java
@@ -16,6 +16,7 @@
*/
package org.sxkj.gd.workorder.vo;
+import io.swagger.annotations.ApiModelProperty;
import org.sxkj.gd.workorder.entity.GdClueEventEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -31,4 +32,10 @@
public class GdClueEventVO extends GdClueEventEntity {
private static final long serialVersionUID = 1L;
+ @ApiModelProperty(value = "处置人姓名")
+ private String disposeUserName;
+
+ @ApiModelProperty(value = "处置部门名称")
+ private String disposeDeptName;
+
}
diff --git a/drone-service/pom.xml b/drone-service/pom.xml
index 58f0cad..7adafab 100644
--- a/drone-service/pom.xml
+++ b/drone-service/pom.xml
@@ -17,12 +17,17 @@
<description>BladeX 微服务集合</description>
<modules>
+ <module>drone-desk</module>
<module>drone-fw</module>
<module>drone-gd</module>
<module>drone-system</module>
</modules>
<dependencies>
+ <dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>blade-core-boot</artifactId>
+ </dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>drone-common</artifactId>
@@ -54,15 +59,28 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>drone-odm-api</artifactId>
- <version>3.4.0.RELEASE</version>
+ <version>${revision}</version>
</dependency>
-
+ <dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>drone-system-api</artifactId>
+ <version>${revision}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>drone-flow-api</artifactId>
+ <version>${revision}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>drone-desk-api</artifactId>
+ <version>${revision}</version>
+ </dependency>
<dependency>
<groupId>io.nats</groupId>
<artifactId>jnats</artifactId>
<version>2.11.2</version>
</dependency>
-
</dependencies>
</project>
--
Gitblit v1.9.3