大客流预警信息界面UI调整
This commit is contained in:
parent
40fc719e43
commit
dd7d5c1c6a
|
|
@ -0,0 +1,79 @@
|
|||
package com.dkl.large.utli;
|
||||
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
|
||||
import com.hikvision.artemis.sdk.config.ArtemisConfig;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class EventSubscriptionClient {
|
||||
public static String GetCameraPreviewURL() throws Exception {
|
||||
|
||||
/**
|
||||
* STEP1:设置平台参数,根据实际情况,设置host appkey appsecret 三个参数.
|
||||
*/
|
||||
ArtemisConfig config = new ArtemisConfig();
|
||||
config.host = "10.22.245.160:10443"; // 平台的ip端口
|
||||
config.appKey = "20976813"; // 密钥appkey
|
||||
config.appSecret = "KCCXzxhyTFCelIg4SRIz";// 密钥appSecret
|
||||
|
||||
/**
|
||||
* STEP2:设置OpenAPI接口的上下文
|
||||
*/
|
||||
final String ARTEMIS_PATH = "/artemis";
|
||||
|
||||
/**
|
||||
* STEP3:设置接口的URI地址
|
||||
*/
|
||||
final String previewURLsApi = ARTEMIS_PATH + "/eventService/v1/eventSubscriptionByEventTypes";
|
||||
// final String previewURLsApi = ARTEMIS_PATH + "/api/eventService/v1/eventUnSubscriptionByEventTypes";
|
||||
Map<String, String> path = new HashMap<String, String>(2) {
|
||||
{
|
||||
put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* STEP4:设置参数提交方式
|
||||
*/
|
||||
String contentType = "application/json";
|
||||
|
||||
/**
|
||||
* STEP5:组装请求参数
|
||||
*/
|
||||
//
|
||||
// jsonBody.put("expand", "streamform=rtp");
|
||||
// 构建JSON请求体
|
||||
String body = "{\n" +
|
||||
" \"eventTypes\": [\"72057594960675584\"],\n" +
|
||||
" \"subWay\": 1,\n" +
|
||||
" \"eventDest\": \"https://10.22.245.245:17000/prod-api/large/cameraAnalysis/eventRcv\",\n" +
|
||||
" \"subType\": 0\n" +
|
||||
"}";
|
||||
|
||||
// String body = "{\n" +
|
||||
// " \"eventTypes\": [\"72057594960675584\"] // 事件等级数组\n" +
|
||||
// "}\n";
|
||||
/**
|
||||
* STEP6:调用接口
|
||||
*/
|
||||
String result = ArtemisHttpUtil.doPostStringArtemis(config,path, body, null, null, contentType , null);// post请求application/json类型参数
|
||||
if(result != null) {
|
||||
JSONObject json = JSON.parseObject(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String result = GetCameraPreviewURL();
|
||||
System.out.println("result结果示例: " + result);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.dkl.large.utli;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
|
||||
import com.hikvision.artemis.sdk.config.ArtemisConfig;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class GetCameraPreviewURL {
|
||||
private static final Logger log = LoggerFactory.getLogger(GetCameraPreviewURL.class);
|
||||
public static String GetCameraPreviewURL(String unifiedCode ) throws Exception {
|
||||
|
||||
/**
|
||||
* STEP1:设置平台参数,根据实际情况,设置host appkey appsecret 三个参数.
|
||||
*/
|
||||
ArtemisConfig config = new ArtemisConfig();
|
||||
config.host = "10.22.245.160:10443"; // 平台的ip端口
|
||||
config.appKey = "20976813"; // 密钥appkey
|
||||
config.appSecret = "KCCXzxhyTFCelIg4SRIz";// 密钥appSecret
|
||||
|
||||
/**
|
||||
* STEP2:设置OpenAPI接口的上下文
|
||||
*/
|
||||
final String ARTEMIS_PATH = "/artemis";
|
||||
|
||||
/**
|
||||
* STEP3:设置接口的URI地址
|
||||
*/
|
||||
final String previewURLsApi = ARTEMIS_PATH + "/api/video/v1/cameras/previewURLs";
|
||||
Map<String, String> path = new HashMap<String, String>(2) {
|
||||
{
|
||||
put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
|
||||
}
|
||||
};
|
||||
log.info(path.toString());
|
||||
/**
|
||||
* STEP4:设置参数提交方式
|
||||
*/
|
||||
String contentType = "application/json";
|
||||
|
||||
/**
|
||||
* STEP5:组装请求参数
|
||||
*/
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
// jsonBody.put("cameraIndexCode", "61011668001310570411");
|
||||
jsonBody.put("cameraIndexCode", unifiedCode);
|
||||
jsonBody.put("streamType", 0);
|
||||
jsonBody.put("protocol", "wss");
|
||||
jsonBody.put("transmode", 1);
|
||||
// jsonBody.put("expand", "streamform=rtp");
|
||||
String body = jsonBody.toJSONString();
|
||||
/**
|
||||
* STEP6:调用接口
|
||||
*/
|
||||
String result = ArtemisHttpUtil.doPostStringArtemis(config,path, body, null, null, contentType , null);// post请求application/json类型参数
|
||||
log.info(result);
|
||||
if(result != null) {
|
||||
JSONObject json = JSON.parseObject(result);
|
||||
if("0".equals(json.getString("code"))) {
|
||||
String wsUrl = json.getJSONObject("data").getString("url");
|
||||
System.out.println("获取到的WebSocket地址:" + wsUrl);
|
||||
return wsUrl;
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String result = GetCameraPreviewURL("61011668001310570411");
|
||||
System.out.println("result结果示例: " + result);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
package com.dkl.large.utli;
|
||||
|
||||
public class ImageDownloadUtil {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package com.dkl.large.utli;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.dkl.common.config.DklConfig;
|
||||
import com.dkl.common.utils.ServletUtils;
|
||||
import com.dkl.common.utils.file.FileUploadUtils;
|
||||
import com.dkl.large.domain.KafkaMessage;
|
||||
import com.dkl.large.mapper.KafkaMessageMapper;
|
||||
import org.apache.kafka.clients.consumer.ConsumerConfig;
|
||||
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
||||
import org.apache.kafka.clients.consumer.KafkaConsumer;
|
||||
import org.apache.kafka.common.serialization.StringDeserializer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.Duration;
|
||||
import java.util.*;
|
||||
|
||||
@Component("KafkaMessageData")
|
||||
public class KafkaMessageData {
|
||||
private static final Logger log = LoggerFactory.getLogger(KafkaMessageData.class);
|
||||
@Autowired
|
||||
private KafkaMessageMapper kafkaMessageMapper;
|
||||
|
||||
public void getimage()
|
||||
{
|
||||
List<KafkaMessage> kafkaMessageList =new ArrayList<>();
|
||||
// Kafka 配置
|
||||
String bootstrapServers = "10.17.122.104:31090";
|
||||
String topic = "ifaas-tpd-scence";
|
||||
// 创建消费者配置
|
||||
Properties properties = new Properties();
|
||||
properties.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
|
||||
properties.put(ConsumerConfig.GROUP_ID_CONFIG, "kafka-message-fetcher-group");
|
||||
properties.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName());
|
||||
properties.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName());
|
||||
properties.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest"); // 从最新的消息开始读取
|
||||
|
||||
// 创建 Kafka 消费者
|
||||
KafkaConsumer<String, String> consumer = new KafkaConsumer<>(properties);
|
||||
consumer.subscribe(Collections.singletonList(topic));
|
||||
|
||||
// 获取最近5条消息
|
||||
int messageCount = 0;
|
||||
try {
|
||||
// 持续进行消息拉取,直到获取5条为止
|
||||
// 拉取消息(1秒超时)
|
||||
ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(1000));
|
||||
// 遍历处理每条消息
|
||||
records.forEach(record -> {
|
||||
String messageValue = record.value();
|
||||
System.out.println("收到 Kafka 消息: " + messageValue);
|
||||
|
||||
try {
|
||||
// 1. JSON 消息体转实体类
|
||||
KafkaMessage kafkaMessage = JSON.parseObject(messageValue, KafkaMessage.class);
|
||||
kafkaMessage.setCreateTime(new Date());
|
||||
|
||||
// 转换为 MultipartFile
|
||||
MultipartFile multipartFile = new UrlMultipartFile( kafkaMessage.getImageUrl());
|
||||
// 上传文件路径
|
||||
String filePath = DklConfig.getUploadPath();
|
||||
log.error("上传文件路径 {}", filePath);
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, multipartFile);
|
||||
log.error("fileName一次 {}", fileName);
|
||||
kafkaMessage.setImageUrl(fileName);
|
||||
//返回的地址需要处理
|
||||
kafkaMessageMapper.insertKafkaMessage(kafkaMessage);
|
||||
// kafkaMessageList.add(kafkaMessage);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
// for (ConsumerRecord<String, String> record : records) {
|
||||
// System.out.printf("Offset = %d, Key = %s, Value = %s%n", record.offset(), record.key(), record.value());
|
||||
// messageCount++;
|
||||
// if (messageCount >= 5) {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
} finally {
|
||||
consumer.close(); // 关闭消费者
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.dkl.large.utli;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
|
||||
public class UrlMultipartFile implements MultipartFile {
|
||||
|
||||
private final String name;
|
||||
private final String originalFilename;
|
||||
private final String contentType;
|
||||
private final byte[] content;
|
||||
|
||||
public UrlMultipartFile(String imageUrl) throws IOException {
|
||||
this("file", imageUrl);
|
||||
}
|
||||
|
||||
public UrlMultipartFile(String name, String imageUrl) throws IOException {
|
||||
this.name = name;
|
||||
this.originalFilename = extractFileName(imageUrl);
|
||||
this.contentType = "image/jpeg"; // 根据实际情况调整
|
||||
|
||||
// 从URL下载文件内容
|
||||
URL url = new URL(imageUrl);
|
||||
try (InputStream inputStream = url.openStream()) {
|
||||
this.content = FileCopyUtils.copyToByteArray(inputStream);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOriginalFilename() {
|
||||
return originalFilename;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return content == null || content.length == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getSize() {
|
||||
return content.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getBytes() throws IOException {
|
||||
return content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return new ByteArrayInputStream(content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transferTo(File dest) throws IOException, IllegalStateException {
|
||||
FileCopyUtils.copy(content, dest);
|
||||
}
|
||||
|
||||
private String extractFileName(String url) {
|
||||
int lastSlashIndex = url.lastIndexOf('/');
|
||||
if (lastSlashIndex != -1 && lastSlashIndex < url.length() - 1) {
|
||||
return url.substring(lastSlashIndex + 1);
|
||||
}
|
||||
return "downloaded_file.jpg";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.dkl.large.utli;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.koal.kms.sdk.ed.KmsSdkException;
|
||||
import com.dkl.common.core.domain.entity.SysDept;
|
||||
import com.dkl.common.utils.StringUtils;
|
||||
import com.dkl.large.domain.DklActivity;
|
||||
import com.dkl.large.domain.DklMonitoringPoints;
|
||||
import com.dkl.large.mapper.DklActivityMapper;
|
||||
import com.dkl.large.mapper.DklMonitoringPointsMapper;
|
||||
import com.dkl.large.service.IDklMonitoringPointsService;
|
||||
import com.dkl.system.service.ISysDeptService;
|
||||
import okhttp3.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static org.springframework.util.SerializationUtils.serialize;
|
||||
|
||||
public class jmUtil {
|
||||
// @Autowired
|
||||
// private static DklActivityMapper dklActivityMapper;
|
||||
// public static void main(String[] args) throws KmsSdkException {
|
||||
// DklActivity dklActivity = new DklActivity();
|
||||
// dklActivity.setDelFlag("0");
|
||||
// List<DklActivity> list =dklActivityMapper.selectDklActivityList(dklActivity);
|
||||
// for (DklActivity dklActivityInfo : list) {
|
||||
// String dutyPeople =null;
|
||||
// String dutyPhone=null;
|
||||
// if (StringUtils.isNotEmpty(dklActivityInfo.getDutyPeople())&&("0").equals(dklActivityInfo.getDelFlag())) {
|
||||
// dutyPeople = EnciphermentUtil.kmsDencrypt(dutyPeople);
|
||||
//
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(dklActivityInfo.getDutyPhone())&&("0").equals(dklActivityInfo.getDelFlag())) {
|
||||
// dutyPhone = EnciphermentUtil.kmsDencrypt(dutyPhone);
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(dklActivityInfo.getSigenCode())&&("0").equals(dklActivityInfo.getDelFlag())) {
|
||||
// byte[] bytes = serialize(dutyPeople+","+dutyPhone);
|
||||
// String isor = EnciphermentUtil.kmsSign(bytes);
|
||||
// dklActivityInfo.setSigenCode(isor);
|
||||
// dklActivityMapper.updateDklActivity(dklActivityInfo);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
package com.dkl.large.utli;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.dkl.common.core.domain.entity.SysDept;
|
||||
import com.dkl.common.utils.StringUtils;
|
||||
import okhttp3.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
|
||||
public class jsonUtil {
|
||||
|
||||
public static void main(String[] args) {
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
|
||||
// 构建请求体
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
// RequestBody body = RequestBody.create(mediaType, "{\n" +
|
||||
// " \"jsonObject\": {\n" +
|
||||
// " \"zbxh\": \"12081501\"\n" +
|
||||
// " },\n" +
|
||||
// " \"method\": \"GET\",\n" +
|
||||
// " \"pageNum\": 1,\n" +
|
||||
// " \"pageSize\": 100,\n" +
|
||||
// " \"path\": \"/edataservice/api/sjzb\",\n" +
|
||||
// " \"secret\": \"d156b5aacb301f6c27416c5fb1eb347f4ae5abd92381ee32129fa04740c369dd\",\n" +
|
||||
// " \"sortType\": \"desc\"\n" +
|
||||
// "}");
|
||||
|
||||
RequestBody body = RequestBody.create(mediaType, "{\n" +
|
||||
" \"jsonObject\" : {\n" +
|
||||
// " \"jcsj\" : \"2025-10-24\"\n" +
|
||||
" },\n" +
|
||||
" \"method\" : \"GET\",\n" +
|
||||
" \"pageNum\" : 1,\n" +
|
||||
" \"pageSize\" : 100,\n" +
|
||||
" \"path\" : \"/edataservice/api/qycnqs\",\n" +
|
||||
" \"secret\" : \"a9a87a9968429ad186b4ec901c5285198c0d3cbc675bfb207387faae0c71eec2\",\n" +
|
||||
" \"sortParam\" : \"\",\n" +
|
||||
" \"sortType\" : \"desc\"\n" +
|
||||
"}");
|
||||
|
||||
|
||||
// 构建请求
|
||||
Request request = new Request.Builder()
|
||||
.url("http://10.22.245.216:29999/jeecg-data-service/edataservice/api/")
|
||||
.post(body)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.build();
|
||||
|
||||
// 执行请求并处理响应
|
||||
try (Response response = client.newCall(request).execute()) {
|
||||
// System.out.println("Response Code: " + response.code());
|
||||
// System.out.println("Response Body: " + response.body().string());
|
||||
String jsonString = response.body().string();
|
||||
System.out.println(jsonString);
|
||||
// 创建ObjectMapper实例
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
public void getDeptAll() throws IOException {
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
|
||||
// 构建请求体
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, "{\n" +
|
||||
" \"jsonObject\": {\n" +
|
||||
" \"key\": \"value\"\n" +
|
||||
" },\n" +
|
||||
" \"method\": \"GET\",\n" +
|
||||
" \"pageNum\": 1,\n" +
|
||||
" \"pageSize\": 1000000,\n" +
|
||||
" \"path\": \"/edataservice/api/zzjgxx\",\n" +
|
||||
" \"secret\": \"7231958b69385ff66a1900584a72c0b85dbc0b602d54ec7a23f9ccdeeb17018c\",\n" +
|
||||
" \"sortParam\": \"zzjgdm\",\n" +
|
||||
" \"sortType\": \"ASC\"\n" +
|
||||
"}");
|
||||
|
||||
// 构建请求
|
||||
Request request = new Request.Builder()
|
||||
.url("http://10.22.245.216:29999/jeecg-data-service/edataservice/api/")
|
||||
.post(body)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.build();
|
||||
|
||||
// 执行请求并处理响应
|
||||
try (Response response = client.newCall(request).execute()) {
|
||||
// System.out.println("Response Code: " + response.code());
|
||||
// System.out.println("Response Body: " + response.body().string());
|
||||
String jsonString = response.body().string();
|
||||
// 创建ObjectMapper实例
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
// 解析JSON字符串为JsonNode对象
|
||||
JsonNode rootNode = objectMapper.readTree(jsonString);
|
||||
|
||||
// 获取code字段的值
|
||||
String code = rootNode.get("code").asText();
|
||||
System.out.println("Code: " + code);
|
||||
|
||||
// 获取success字段的值
|
||||
boolean success = rootNode.get("success").asBoolean();
|
||||
System.out.println("Success: " + success);
|
||||
|
||||
// 获取data字段的值(是一个数组)
|
||||
JsonNode dataNode = rootNode.get("result");
|
||||
JsonNode dataList= dataNode.get("records");
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
<?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="com.dkl.large.mapper.DklWarningInformationProcessMapper">
|
||||
|
||||
<resultMap type="DklWarningInformationProcess" id="DklWarningInformationProcessResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="warningSigns" column="warning_signs" />
|
||||
<result property="delegatePersonnel" column="delegate_personnel" />
|
||||
<result property="delegationTime" column="delegation_time" />
|
||||
<result property="delegationDept" column="delegation_dept" />
|
||||
<result property="disposalMeasures" column="disposal_measures" />
|
||||
<result property="disposalResults" column="disposal_results" />
|
||||
<result property="disposalStatus" column="disposal_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="handleId" column="handle_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDklWarningInformationProcessVo">
|
||||
select id, warning_signs, delegate_personnel, delegation_time, delegation_dept, disposal_measures, disposal_results, disposal_status, create_by, create_time, update_by, update_time, del_flag, handle_id from dkl_warning_information_process
|
||||
</sql>
|
||||
|
||||
<select id="selectDklWarningInformationProcessList" parameterType="DklWarningInformationProcess" resultMap="DklWarningInformationProcessResult">
|
||||
<include refid="selectDklWarningInformationProcessVo"/>
|
||||
<where>
|
||||
<if test="warningSigns != null and warningSigns != ''"> and warning_signs = #{warningSigns}</if>
|
||||
<if test="delegatePersonnel != null "> and delegate_personnel = #{delegatePersonnel}</if>
|
||||
<if test="delegationTime != null "> and delegation_time = #{delegationTime}</if>
|
||||
<if test="delegationDept != null "> and delegation_dept = #{delegationDept}</if>
|
||||
<if test="disposalMeasures != null and disposalMeasures != ''"> and disposal_measures = #{disposalMeasures}</if>
|
||||
<if test="disposalResults != null and disposalResults != ''"> and disposal_results = #{disposalResults}</if>
|
||||
<if test="disposalStatus != null and disposalStatus != ''"> and disposal_status = #{disposalStatus}</if>
|
||||
<if test="handleId != null "> and handle_id = #{handleId}</if>
|
||||
</where>
|
||||
ORDER BY create_time
|
||||
</select>
|
||||
|
||||
<select id="selectDklWarningInformationProcessById" parameterType="Long" resultMap="DklWarningInformationProcessResult">
|
||||
<include refid="selectDklWarningInformationProcessVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDklWarningInformationProcess" parameterType="DklWarningInformationProcess">
|
||||
insert into dkl_warning_information_process
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="warningSigns != null">warning_signs,</if>
|
||||
<if test="delegatePersonnel != null">delegate_personnel,</if>
|
||||
<if test="delegationTime != null">delegation_time,</if>
|
||||
<if test="delegationDept != null">delegation_dept,</if>
|
||||
<if test="disposalMeasures != null">disposal_measures,</if>
|
||||
<if test="disposalResults != null">disposal_results,</if>
|
||||
<if test="disposalStatus != null">disposal_status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="handleId != null">handle_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="warningSigns != null">#{warningSigns},</if>
|
||||
<if test="delegatePersonnel != null">#{delegatePersonnel},</if>
|
||||
<if test="delegationTime != null">#{delegationTime},</if>
|
||||
<if test="delegationDept != null">#{delegationDept},</if>
|
||||
<if test="disposalMeasures != null">#{disposalMeasures},</if>
|
||||
<if test="disposalResults != null">#{disposalResults},</if>
|
||||
<if test="disposalStatus != null">#{disposalStatus},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="handleId != null">#{handleId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDklWarningInformationProcess" parameterType="DklWarningInformationProcess">
|
||||
update dkl_warning_information_process
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warningSigns != null">warning_signs = #{warningSigns},</if>
|
||||
<if test="delegatePersonnel != null">delegate_personnel = #{delegatePersonnel},</if>
|
||||
<if test="delegationTime != null">delegation_time = #{delegationTime},</if>
|
||||
<if test="delegationDept != null">delegation_dept = #{delegationDept},</if>
|
||||
<if test="disposalMeasures != null">disposal_measures = #{disposalMeasures},</if>
|
||||
<if test="disposalResults != null">disposal_results = #{disposalResults},</if>
|
||||
<if test="disposalStatus != null">disposal_status = #{disposalStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="handleId != null">handle_id = #{handleId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDklWarningInformationProcessById" parameterType="Long">
|
||||
delete from dkl_warning_information_process where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDklWarningInformationProcessByIds" parameterType="String">
|
||||
delete from dkl_warning_information_process where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue