修复组织机构图虚拟组织不显示
This commit is contained in:
parent
a5295a68cf
commit
a82a41bf64
|
|
@ -17,7 +17,7 @@ import java.util.Map;
|
|||
public class VODeleteModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
Map<String, String> result = new HashMap<String, String>();
|
||||
Map<String, String> 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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue