From b9ff329cebf72dc58670a74d3d3f3a65a4a15a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98ml=E2=80=99?= Date: Mon, 7 Nov 2022 09:54:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E7=BB=84=E7=BB=87(=E5=BB=BA?= =?UTF-8?q?=E6=A8=A1)=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modeexpand/VODeleteModeExpand.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/weaver/formmode/organization/modeexpand/VODeleteModeExpand.java b/src/weaver/formmode/organization/modeexpand/VODeleteModeExpand.java index d0f44db7..3e4a46e3 100644 --- a/src/weaver/formmode/organization/modeexpand/VODeleteModeExpand.java +++ b/src/weaver/formmode/organization/modeexpand/VODeleteModeExpand.java @@ -28,22 +28,16 @@ public class VODeleteModeExpand extends AbstractModeExpandJavaCodeNew { modeid = Util.getIntValue(requestInfo.getWorkflowid()); if (billid > 0 && modeid > 0) { //------请在下面编写业务逻辑代码------ - String billids = (String) param.get("billids"); + String billids = (String) param.get("CheckedCheckboxIds"); String[] billidsTmp = billids.split(","); String currentDate = OrganizationDateUtil.getFormatLocalDate(new java.util.Date()); for (String id : billidsTmp) { RecordSet rs = new RecordSet(); - rs.executeQuery("select id, fid, fecid, fname, ftype, forder, fparentid, fdate from uf_jcl_org_vir where id ='" + id + "'"); - RecordSet recordSet = new RecordSet(); - if (rs.next()) { - String ftype = rs.getString("ftype"); - String fdate = rs.getString("fdate"); - String delsql = "delete JCL_ORG_MAP where id=" + id + " and ftype='" + ftype + "' and fisvitual='1' and fdatebegin='" + fdate + "'"; - recordSet.execute(delsql); - String updatesql = "update JCL_ORG_MAP set fdateend=' " + new Date(OrganizationDateUtil.stringToDate(currentDate).getTime()) + - "' where id=" + id + " and ftype='" + ftype + "' and fisvitual='1' and fdateend > '" +fdate + "'"; - recordSet.execute(updatesql); - } + String delsql = "delete JCL_ORG_MAP where id=" + id + " and fisvitual='1'"; + rs.execute(delsql); + String updatesql = "update JCL_ORG_MAP set fdateend='" + new Date(OrganizationDateUtil.stringToDate(currentDate).getTime()) + + "' where id=" + id + " and fisvitual='1'"; + rs.execute(updatesql); } } }