虚拟组织(建模)删除接口优化

pull/43/head
‘ml’ 3 years ago
parent 6c15f7fc3c
commit b9ff329ceb

@ -28,22 +28,16 @@ public class VODeleteModeExpand extends AbstractModeExpandJavaCodeNew {
modeid = Util.getIntValue(requestInfo.getWorkflowid()); modeid = Util.getIntValue(requestInfo.getWorkflowid());
if (billid > 0 && modeid > 0) { if (billid > 0 && modeid > 0) {
//------请在下面编写业务逻辑代码------ //------请在下面编写业务逻辑代码------
String billids = (String) param.get("billids"); String billids = (String) param.get("CheckedCheckboxIds");
String[] billidsTmp = billids.split(","); String[] billidsTmp = billids.split(",");
String currentDate = OrganizationDateUtil.getFormatLocalDate(new java.util.Date()); String currentDate = OrganizationDateUtil.getFormatLocalDate(new java.util.Date());
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 + "'"); String delsql = "delete JCL_ORG_MAP where id=" + id + " and fisvitual='1'";
RecordSet recordSet = new RecordSet(); rs.execute(delsql);
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()) + 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 + "'"; "' where id=" + id + " and fisvitual='1'";
recordSet.execute(updatesql); rs.execute(updatesql);
}
} }
} }
} }

Loading…
Cancel
Save