组织透视图虚拟组织修复

pull/39/head
‘ml’ 3 years ago
parent 9b36018c9a
commit 52f9e756e6

@ -1,10 +1,6 @@
package weaver.formmode.customjavacode.modeexpand; package weaver.formmode.organization.modeexpand;
import com.alibaba.fastjson.JSONObject;
import com.engine.organization.entity.map.JclOrgMap;
import com.engine.organization.mapper.jclorgmap.JclOrgMapper;
import com.engine.organization.util.OrganizationDateUtil; import com.engine.organization.util.OrganizationDateUtil;
import com.engine.organization.util.db.MapperProxyFactory;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew; import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
import weaver.general.Util; import weaver.general.Util;
@ -38,10 +34,10 @@ public class VODeleteModeExpand extends AbstractModeExpandJavaCodeNew {
for (String id : billidsTmp) { for (String id : billidsTmp) {
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
rs.executeQuery("select id, fid, fecid, fname, ftype, forder, fparentid, fdate from uf_jcl_org_vir where id ='" + id + "'"); 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()) { if (rs.next()) {
String ftype = rs.getString("ftype"); String ftype = rs.getString("ftype");
String fdate = rs.getString("fdate"); String fdate = rs.getString("fdate");
RecordSet recordSet = new RecordSet();
String delsql = "delete JCL_ORG_MAP where id=" + id + " and ftype='" + ftype + "' and fisvitual='1' and fdatebegin='" + fdate + "'"; String delsql = "delete JCL_ORG_MAP where id=" + id + " and ftype='" + ftype + "' and fisvitual='1' and fdatebegin='" + fdate + "'";
recordSet.execute(delsql); recordSet.execute(delsql);
String updatesql = "update JCL_ORG_MAP set fdateend=' " + new Date(OrganizationDateUtil.stringToDate(currentDate).getTime()) + String updatesql = "update JCL_ORG_MAP set fdateend=' " + new Date(OrganizationDateUtil.stringToDate(currentDate).getTime()) +

@ -1,4 +1,4 @@
package weaver.formmode.customjavacode.modeexpand; package weaver.formmode.organization.modeexpand;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.engine.organization.entity.map.JclOrgMap; import com.engine.organization.entity.map.JclOrgMap;
@ -11,6 +11,7 @@ import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
import java.sql.Date; import java.sql.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
import weaver.soa.workflow.request.RequestInfo; import weaver.soa.workflow.request.RequestInfo;
@ -51,7 +52,9 @@ public class VOModeExpand extends AbstractModeExpandJavaCodeNew {
jclOrgMap.setFNumber(String.valueOf(modeid));//模块的数据编号 jclOrgMap.setFNumber(String.valueOf(modeid));//模块的数据编号
jclOrgMap.setId(Integer.valueOf(recordSet.getString("id"))); jclOrgMap.setId(Integer.valueOf(recordSet.getString("id")));
jclOrgMap.setFName(recordSet.getString("fname")); jclOrgMap.setFName(recordSet.getString("fname"));
if (!"".equals(recordSet.getString("fparentid"))) {
jclOrgMap.setFParentId(Integer.valueOf(recordSet.getString("fparentid"))); jclOrgMap.setFParentId(Integer.valueOf(recordSet.getString("fparentid")));
}
if ("1".equals(recordSet.getString("ftype"))) { if ("1".equals(recordSet.getString("ftype"))) {
jclOrgMap.setFParentId(0); jclOrgMap.setFParentId(0);
} else if ("4".equals(recordSet.getString("ftype"))) { } else if ("4".equals(recordSet.getString("ftype"))) {
@ -93,6 +96,4 @@ public class VOModeExpand extends AbstractModeExpandJavaCodeNew {
} }
return field; return field;
} }
} }
Loading…
Cancel
Save