From a82a41bf64b22b9a137fc08babacfb7d28953cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98ml=E2=80=99?= Date: Tue, 8 Nov 2022 15:17:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=84=E7=BB=87=E6=9C=BA?= =?UTF-8?q?=E6=9E=84=E5=9B=BE=E8=99=9A=E6=8B=9F=E7=BB=84=E7=BB=87=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/modeexpand/VODeleteModeExpand.java | 10 ++++++---- .../formmode/organization/modeexpand/VOModeExpand.java | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/weaver/formmode/organization/modeexpand/VODeleteModeExpand.java b/src/weaver/formmode/organization/modeexpand/VODeleteModeExpand.java index 3e4a46e3..e99a02ee 100644 --- a/src/weaver/formmode/organization/modeexpand/VODeleteModeExpand.java +++ b/src/weaver/formmode/organization/modeexpand/VODeleteModeExpand.java @@ -17,7 +17,7 @@ import java.util.Map; public class VODeleteModeExpand extends AbstractModeExpandJavaCodeNew { public Map doModeExpand(Map param) { - Map result = new HashMap(); + Map result = new HashMap(); try { User user = (User) param.get("user"); int billid = -1;//数据id @@ -31,12 +31,14 @@ public class VODeleteModeExpand extends AbstractModeExpandJavaCodeNew { String billids = (String) param.get("CheckedCheckboxIds"); String[] billidsTmp = billids.split(","); String currentDate = OrganizationDateUtil.getFormatLocalDate(new java.util.Date()); + RecordSet rs = new RecordSet(); + int st = 500000000; for (String id : billidsTmp) { - RecordSet rs = new RecordSet(); - String delsql = "delete JCL_ORG_MAP where id=" + id + " and fisvitual='1'"; + int nid = Integer.parseInt(id) + st; + String delsql = "delete from JCL_ORG_MAP where id=" + nid + " 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'"; + "' where id=" + nid + " and fisvitual='1'"; rs.execute(updatesql); } } diff --git a/src/weaver/formmode/organization/modeexpand/VOModeExpand.java b/src/weaver/formmode/organization/modeexpand/VOModeExpand.java index adde8c2a..8f586888 100644 --- a/src/weaver/formmode/organization/modeexpand/VOModeExpand.java +++ b/src/weaver/formmode/organization/modeexpand/VOModeExpand.java @@ -41,6 +41,7 @@ public class VOModeExpand extends AbstractModeExpandJavaCodeNew { RecordSet recordSet = new RecordSet(); recordSet.executeQuery("select id, fid, fecid, fname, ftype, forder, fparentid, fdate from uf_jcl_org_vir where fid = '" + fid + "'"); JclOrgMap jclOrgMap = new JclOrgMap(); + int st = 500000000; if (recordSet.next()) { Integer ftype = Integer.valueOf(recordSet.getString("ftype")); jclOrgMap.setFType(ftype); @@ -50,7 +51,7 @@ public class VOModeExpand extends AbstractModeExpandJavaCodeNew { jclOrgMap.setFDateBegin(new Date(OrganizationDateUtil.stringToDate(recordSet.getString("fdate")).getTime())); jclOrgMap.setFDateEnd(new Date(OrganizationDateUtil.stringToDate("2099-12-31").getTime())); jclOrgMap.setFNumber(String.valueOf(modeid));//模块的数据编号 - jclOrgMap.setId(Integer.valueOf(recordSet.getString("id"))); + jclOrgMap.setId(Integer.valueOf(recordSet.getString("id")) + st); jclOrgMap.setFName(recordSet.getString("fname")); if (!"".equals(recordSet.getString("fparentid"))) { jclOrgMap.setFParentId(Integer.valueOf(recordSet.getString("fparentid"))); @@ -65,9 +66,10 @@ public class VOModeExpand extends AbstractModeExpandJavaCodeNew { } } } + // 编辑修改 if (iscreate.equals("2")) { RecordSet rs = new RecordSet(); - String delsql = "delete JCL_ORG_MAP where id=" + jclOrgMap.getId() + " and ftype='" + jclOrgMap.getFType() + "' and fisvitual='1' and fdatebegin='" + jclOrgMap.getFDateBegin() + "'"; + String delsql = "delete from JCL_ORG_MAP where id=" + jclOrgMap.getId() + " and ftype='" + jclOrgMap.getFType() + "' and fisvitual='1' and fdatebegin='" + jclOrgMap.getFDateBegin() + "'"; rs.execute(delsql); String updatesql = "update JCL_ORG_MAP set fdateend='" + jclOrgMap.getFDateBegin() + "' where id=" + jclOrgMap.getId() + " and ftype='" + jclOrgMap.getFType() + "' and fisvitual='1' and fdateend > '" + jclOrgMap.getFDateBegin() + "'"; rs.execute(updatesql);