From 236f80305991d3517c84e70b2645a80a52ad1294 Mon Sep 17 00:00:00 2001
From: wangwh <2397901735@qq.com>
Date: Mon, 28 Oct 2024 14:42:57 +0800
Subject: [PATCH] fix: 1、添加日志记录; 2、修改请求网格系统待办接口的传参objId值为本系统caseId; 3、添加办理中时联合处置申请的网格待办。
---
dyh-service/dyh-utils/src/main/java/cn/huge/module/disp/utils/DispIdUtils.java | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 103 insertions(+), 0 deletions(-)
diff --git a/dyh-service/dyh-utils/src/main/java/cn/huge/module/disp/utils/DispIdUtils.java b/dyh-service/dyh-utils/src/main/java/cn/huge/module/disp/utils/DispIdUtils.java
new file mode 100644
index 0000000..aa7b99b
--- /dev/null
+++ b/dyh-service/dyh-utils/src/main/java/cn/huge/module/disp/utils/DispIdUtils.java
@@ -0,0 +1,103 @@
+package cn.huge.module.disp.utils;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * @title: 公共ID生成工具
+ * @description: 公共ID生成工具
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2021-11-05 16:51:48
+ * @version: 1.0.0
+ */
+public class DispIdUtils {
+
+ /**
+ * 时间Id统计常量
+ */
+ private static int COUNT_NUM = 1000;
+
+ /**
+ * 时间Id统计常量,常量前缀
+ */
+ private static int SIGN_COUNT_NUM = 1000;
+
+ /**
+ * 时间Id统计常量,常量后缀
+ */
+ private static int COUNT_NUM_SIGN = 1000;
+
+ /**
+ * 获取时间Id,后四位常量
+ * @return String
+ */
+ public synchronized static String getNewTimeId(){
+ String timeId = getNowTime() + (COUNT_NUM++);
+ if(COUNT_NUM > 9999){
+ COUNT_NUM = 1000;
+ }
+ timeId=timeId.substring(2, timeId.length());
+ return timeId;
+ }
+
+ /**
+ * 获取时间Id,常量前缀
+ * @param sign 常量前缀
+ * @return String
+ */
+ public synchronized static String getSignNewTimeId(String sign){
+ String timeId = getNowTime() + sign + (SIGN_COUNT_NUM++);
+ if(SIGN_COUNT_NUM > 9999){
+ SIGN_COUNT_NUM = 1000;
+ }
+ timeId=timeId.substring(2, timeId.length());
+ return timeId;
+ }
+
+ /**
+ * 获取带有后缀的时间Id,常量后缀
+ * @param sign 常量后缀
+ * @return String
+ */
+ public synchronized static String getNewTimeIdSign(String sign){
+ String timeId = getNowTime() + (COUNT_NUM_SIGN++) + sign;
+ if(COUNT_NUM_SIGN > 9999){
+ COUNT_NUM_SIGN = 1000;
+ }
+ timeId=timeId.substring(2, timeId.length());
+ return timeId;
+ }
+
+ /**
+ * 获取时间Id,后四位常量
+ * @return String
+ */
+ public synchronized static String getNowTime(){
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+ String nowTime = sdf.format(new Date());
+ return nowTime;
+ }
+}
+/**
+ * -------------------_ooOoo_-------------------
+ * ------------------o8888888o------------------
+ * ------------------88" . "88------------------
+ * ------------------(| -_- |)------------------
+ * ------------------O\ = /O------------------
+ * ---------------____/`---'\____---------------
+ * -------------.' \\| |// `.-------------
+ * ------------/ \\||| : |||// \------------
+ * -----------/ _||||| -:- |||||- \-----------
+ * -----------| | \\\ - /// | |-----------
+ * -----------| \_| ''\---/'' | |-----------
+ * -----------\ .-\__ `-` ___/-. /-----------
+ * ---------___`. .' /--.--\ `. . __----------
+ * ------."" '< `.___\_<|>_/___.' >'"".-------
+ * -----| | : `- \`.;`\ _ /`;.`/ - ` : | |-----
+ * -----\ \ `-. \_ __\ /__ _/ .-` / /-----
+ * ======`-.____`-.___\_____/___.-`____.-'======
+ * -------------------`=---='
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ * ---------佛祖保佑---hugeinfo---永无BUG----------
+ */
\ No newline at end of file
--
Gitblit v1.8.0