From c079f5711f43b62773c89a921bf3c1852f126caf Mon Sep 17 00:00:00 2001
From: lijiazhuo <13787924+lijiazhuosky@user.noreply.gitee.com>
Date: Mon, 19 Jan 2026 14:34:15 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 5 ++
.../sso/controller/ZhiAnTePiLiuCheng.java | 77 +++++++++++++++++++
src/main/resources/logback-spring.xml | 39 ++++++++++
3 files changed, 121 insertions(+)
create mode 100644 src/main/java/com/example/sso/controller/ZhiAnTePiLiuCheng.java
create mode 100644 src/main/resources/logback-spring.xml
diff --git a/pom.xml b/pom.xml
index 325a986..c4876a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,6 +54,11 @@
fastjson
1.2.45
+
+ org.projectlombok
+ lombok
+ true
+
diff --git a/src/main/java/com/example/sso/controller/ZhiAnTePiLiuCheng.java b/src/main/java/com/example/sso/controller/ZhiAnTePiLiuCheng.java
new file mode 100644
index 0000000..a6a341a
--- /dev/null
+++ b/src/main/java/com/example/sso/controller/ZhiAnTePiLiuCheng.java
@@ -0,0 +1,77 @@
+package com.example.sso.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.example.sso.util.V5utils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@Slf4j
+public class ZhiAnTePiLiuCheng {
+ //治安特批申请
+ @PostMapping("/zhiantepi")
+ public String tuisong(@RequestBody JSONObject datass) {
+
+ log.info("数据 " + datass.toJSONString());
+
+ JSONObject jsonObject = datass.getJSONObject("data");
+
+ log.info("治安特批申请" + jsonObject.toJSONString());
+ String zxscjg = jsonObject.getString("zxscjg");
+
+ String id = jsonObject.getString("_id");
+ if (zxscjg.equals("通过") || zxscjg.equals("慎用")) {
+ log.info("我要推送啦 " + id);
+ JSONObject jsonObject4 = new JSONObject();
+ jsonObject4.put("instance_id", id);
+ jsonObject4.put("tasks_type", 1);
+ String jsonString1 = jsonObject4.toJSONString();
+
+ log.info("擦金好像 " + jsonString1);
+ String selectliucheng = V5utils.selectliucheng(jsonString1);
+ JSONObject jsonObject5 = JSON.parseObject(selectliucheng);
+ JSONArray jsonArray1 = jsonObject5.getJSONArray("tasks");
+ log.info("数组 " + jsonArray1);
+
+ for (Object o1 : jsonArray1) {
+ JSONObject jsonObject6 = (JSONObject) o1;
+ String title = jsonObject6.getString("title");
+
+ String task_id = jsonObject6.getString("task_id");
+ Integer status = jsonObject6.getInteger("status");
+
+
+ JSONObject object = jsonObject6.getJSONObject("assignee");
+ log.info("我是username " + object);
+ String username = object.getString("username");
+
+ JSONObject jsonObject7 = new JSONObject();
+ jsonObject7.put("username", username);
+ jsonObject7.put("instance_id", id);
+ jsonObject7.put("task_id", task_id);
+
+ String jsonString2 = jsonObject7.toJSONString();
+
+
+ if(title.equals("分司确认")) {
+ log.info("提交 " + jsonString2);
+ String comment = V5utils.comment(jsonString2);
+ log.info(" 结果 " + comment);
+ }
+ // break;
+
+
+ }
+
+
+ }
+
+
+ return "";
+ }
+
+}
diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml
new file mode 100644
index 0000000..c57a06f
--- /dev/null
+++ b/src/main/resources/logback-spring.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+ ${LOG_PATH}/${LOG_FILE}.log
+
+
+
+
+ ${LOG_PATH}/${LOG_FILE}.%d{yyyy-MM-dd}.log
+
+ ${MAX_HISTORY}
+
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+ true
+
+
+
+
+
+
+
\ No newline at end of file