From 9febd250183d51455dfe8cdb17eb4969e64cb2f9 Mon Sep 17 00:00:00 2001 From: fang <123456> Date: Wed, 2 Jul 2025 17:49:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E8=8A=82=E5=B7=B2=E5=8A=9E=E5=8F=91?= =?UTF-8?q?=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../servicehandler/BacklogServiceHandle.java | 79 +++++++------------ 1 file changed, 30 insertions(+), 49 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java index 05354c8..a9ac761 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java @@ -72,7 +72,7 @@ public class BacklogServiceHandle extends AbstractServiceHandler { // 发送首节的已办 sendToDo(ctx); } catch (Exception e) { - logger.info("获得缓存失败,发送首节的已办失败:" + e.getMessage()); + logger.info("###获得缓存失败,发送首节的已办失败:" + e.getMessage()+"ctx.getBusinessKey:"+ctx.getBusinessKey()); } } /* //几个待办 @@ -135,6 +135,7 @@ public class BacklogServiceHandle extends AbstractServiceHandler { * @param ctx 信息 */ private void sendToDo(MessageContext ctx) { + logger.info("###进入首节已办推送方法"); String accountId = System.getProperty("backlog-accountid"); Object shkd_type = SystemParamServiceHelper.getPublicParameter("shkd_type"); StringBuilder cwbSql1 = new StringBuilder(); @@ -217,9 +218,11 @@ public class BacklogServiceHandle extends AbstractServiceHandler { cwbSql1.append(" and b.FDELETEREASON ='first_usertask_skip"); cwbSql1.append(" and b.FENDTIME is not null and d.FENDTIME is not null"); cwbSql1.append(" ORDER BY b.FMODIFYDATE,b.FID"); + logger.info("###开始第一个节点已办数据拼接结束"); + logger.info("###查询首节节点数据-开始"); DataSet cwbAmount1 = DB.queryDataSet(this.getClass().getName(), DBRoute.of("sys"), cwbSql1.toString(), new Object[]{ctx.getBusinessKey()}); Iterator iterator = cwbAmount1.iterator(); - logger.info("开始第一个节点已办数据拼接"); + logger.info("###查询首节节点数据-结束"); try { while (iterator.hasNext()) { Row next = iterator.next(); @@ -288,62 +291,40 @@ public class BacklogServiceHandle extends AbstractServiceHandler { Object shkd_cache = SystemParamServiceHelper.getPublicParameter("shkd_cache"); Integer z = 0; if (Objects.equals(shkd_type, "0")) { - //旧 eoss 环境 - boolean b = CreateToDoHandler.get_CreateToDoHandler().sendCreateToDo(form.toString(), title, next.getLong("fid").toString(), userName, next.getString("fbillno")); - if(ObjectUtils.isEmpty(shkd_cache)){ + //旧 eoss 环境 待办 + CreateToDoHandler.get_CreateToDoHandler().sendCreateToDo(form.toString(), title, next.getLong("fid").toString(), userName, next.getString("fbillno")); + //旧 eoss 环境 已办 + DealToDoHandler.get_DealToDoHandler().sendDealToDo(next.getLong("fid"), userName, next.getString("fbillno")); + if (ObjectUtils.isEmpty(shkd_cache)) { z = 604800; - }else{ + } else { z = Integer.valueOf(shkd_cache.toString()); } - cache.put(ctx.getBusinessKey(),String.valueOf(b),z); + cache.put(ctx.getBusinessKey(), "true", z); } else if (Objects.equals(shkd_type, "1")) { - //新 eoss 环境 - boolean b = CreateToDoHandler.get_CreateToDoHandler().sendCreateToDoNew(form.toString(), title, next.getLong("fid").toString(), userName, next.getString("fbillno")); - if(ObjectUtils.isEmpty(shkd_cache)){ - z = 604800; - }else{ - z = Integer.valueOf(shkd_cache.toString()); - } - cache.put(ctx.getBusinessKey(),String.valueOf(b),z); - } else if (Objects.equals(shkd_type, "2")) { - //二套环境 - boolean b = CreateToDoHandler.get_CreateToDoHandler().sendCreateToDo(form.toString(), title, next.getLong("fid").toString(), userName, next.getString("fbillno")); + //新 eoss 环境 待办 CreateToDoHandler.get_CreateToDoHandler().sendCreateToDoNew(form.toString(), title, next.getLong("fid").toString(), userName, next.getString("fbillno")); - if(ObjectUtils.isEmpty(shkd_cache)){ - z = 604800; - }else{ - z = Integer.valueOf(shkd_cache.toString()); - } - cache.put(ctx.getBusinessKey(),String.valueOf(b),z); - } - if (Objects.equals(shkd_type, "0")) { - //旧 eoss 环境 - boolean b = DealToDoHandler.get_DealToDoHandler().sendDealToDo(next.getLong("fid"), userName, next.getString("fbillno")); - if(ObjectUtils.isEmpty(shkd_cache)){ - z = 604800; - }else{ - z = Integer.valueOf(shkd_cache.toString()); - } - cache.put(ctx.getBusinessKey(),String.valueOf(b),z); - } else if (Objects.equals(shkd_type, "1")) { - //新 eoss 环境 - boolean b = DealToDoHandler.get_DealToDoHandler().sendDealToDoNew(next.getLong("fid"), userName, next.getString("fbillno")); - if(ObjectUtils.isEmpty(shkd_cache)){ - z = 604800; - }else{ - z = Integer.valueOf(shkd_cache.toString()); - } - cache.put(ctx.getBusinessKey(),String.valueOf(b),z); - } else if (Objects.equals(shkd_type, "2")) { - //二套环境 - boolean b = DealToDoHandler.get_DealToDoHandler().sendDealToDo(next.getLong("fid"), userName, next.getString("fbillno")); + //新 eoss 环境 已办 DealToDoHandler.get_DealToDoHandler().sendDealToDoNew(next.getLong("fid"), userName, next.getString("fbillno")); - if(ObjectUtils.isEmpty(shkd_cache)){ + if (ObjectUtils.isEmpty(shkd_cache)) { z = 604800; - }else{ + } else { z = Integer.valueOf(shkd_cache.toString()); } - cache.put(ctx.getBusinessKey(),String.valueOf(b),z); + cache.put(ctx.getBusinessKey(), "true", z); + } else if (Objects.equals(shkd_type, "2")) { + //二套环境 待办 + CreateToDoHandler.get_CreateToDoHandler().sendCreateToDo(form.toString(), title, next.getLong("fid").toString(), userName, next.getString("fbillno")); + CreateToDoHandler.get_CreateToDoHandler().sendCreateToDoNew(form.toString(), title, next.getLong("fid").toString(), userName, next.getString("fbillno")); + //二套环境 已办 + DealToDoHandler.get_DealToDoHandler().sendDealToDo(next.getLong("fid"), userName, next.getString("fbillno")); + DealToDoHandler.get_DealToDoHandler().sendDealToDoNew(next.getLong("fid"), userName, next.getString("fbillno")); + if (ObjectUtils.isEmpty(shkd_cache)) { + z = 604800; + } else { + z = Integer.valueOf(shkd_cache.toString()); + } + cache.put(ctx.getBusinessKey(), "true", z); } } } catch (Exception e) {