From 37d3ff1aedc987481bde25c9c1b752121fb30ab8 Mon Sep 17 00:00:00 2001 From: wsm <2746563060@qq.com> Date: Tue, 4 Aug 2026 10:55:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(fixcontact):=20=E6=96=B0=E5=A2=9E=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=E7=8A=B6=E6=80=81=E7=BB=9F=E8=AE=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FixedContact20260730Controller.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/jeecg-module-supervision/src/main/java/org/jeecg/modules/bg/fixcontact/controller/FixedContact20260730Controller.java b/jeecg-module-supervision/src/main/java/org/jeecg/modules/bg/fixcontact/controller/FixedContact20260730Controller.java index 99a5432..da6e4b1 100644 --- a/jeecg-module-supervision/src/main/java/org/jeecg/modules/bg/fixcontact/controller/FixedContact20260730Controller.java +++ b/jeecg-module-supervision/src/main/java/org/jeecg/modules/bg/fixcontact/controller/FixedContact20260730Controller.java @@ -60,6 +60,36 @@ public class FixedContact20260730Controller extends JeecgController> statusStats(FixedContact20260730 fixedContact20260730, HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(fixedContact20260730, req.getParameterMap()); + List list = fixedContact20260730Service.list(queryWrapper); + int notStarted = 0, inProgress = 0, overdue = 0, completed = 0; + java.time.LocalDate today = java.time.LocalDate.now(); + for (FixedContact20260730 item : list) { + BpmStatus bpmStatus = BpmStatus.fromCode(item.getBpmStatus()); + if (bpmStatus == BpmStatus.NOT_START) { + notStarted++; + } else if (bpmStatus == BpmStatus.SUPERVISING) { + inProgress++; + // 流程截止时间取联系时间,督办中且已过联系时间的记为逾期 + if (item.getContactTime() != null + && item.getContactTime().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDate().isBefore(today)) { + overdue++; + } + } else if (bpmStatus == BpmStatus.FINISH) { + completed++; + } + } + Map result = new java.util.LinkedHashMap<>(); + result.put("notStarted", notStarted); + result.put("inProgress", inProgress); + result.put("overdue", overdue); + result.put("completed", completed); + return Result.OK(result); + } + @AutoLog(value = "定点联系单-添加") @Operation(summary = "定点联系单-添加") @RequiresPermissions("bg.fixcontact:fixed_contact_20260730:add")