From d760367a95af1489332c9839bab751ca9bd27895 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Fri, 8 Jul 2022 14:07:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/organization/service/impl/JobServiceImpl.java | 8 ++++---- .../organization/service/impl/PostInfoServiceImpl.java | 9 +++++++-- .../organization/transmethod/LogViewTransMethod.java | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/com/engine/organization/service/impl/JobServiceImpl.java b/src/com/engine/organization/service/impl/JobServiceImpl.java index f21c1d16..1cf4ee1f 100644 --- a/src/com/engine/organization/service/impl/JobServiceImpl.java +++ b/src/com/engine/organization/service/impl/JobServiceImpl.java @@ -310,8 +310,8 @@ public class JobServiceImpl extends Service implements JobService { params.put("is_key", null == searchParam.getIsKey() ? 0 : searchParam.getIsKey()); // TODO 处理ec表关联关系 - DepartmentPO departmentPO = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(searchParam.getParentDept()); - params.put("parent_comp", departmentPO.getParentComp()); + //DepartmentPO departmentPO = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(searchParam.getParentDept()); + //params.put("parent_comp", departmentPO.getParentComp()); if (StringUtils.isBlank(params.get("show_order").toString())) { int maxShowOrder = getJobMapper().getMaxShowOrder(); params.put("show_order", maxShowOrder + 1); @@ -350,8 +350,8 @@ public class JobServiceImpl extends Service implements JobService { // 更新主表数据 params.put("is_key", searchParam.getIsKey()); // TODO 处理ec表关联关系 - DepartmentPO departmentPO = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(searchParam.getParentDept()); - params.put("parent_comp", departmentPO.getParentComp()); + //DepartmentPO departmentPO = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(searchParam.getParentDept()); + //params.put("parent_comp", departmentPO.getParentComp()); getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOB, params, "", searchParam.getId()); // 更新主表拓展表 getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOBEXT, params, groupId, searchParam.getId()); diff --git a/src/com/engine/organization/service/impl/PostInfoServiceImpl.java b/src/com/engine/organization/service/impl/PostInfoServiceImpl.java index e5e8f9e3..227a34e9 100644 --- a/src/com/engine/organization/service/impl/PostInfoServiceImpl.java +++ b/src/com/engine/organization/service/impl/PostInfoServiceImpl.java @@ -22,7 +22,6 @@ import com.engine.organization.util.db.DBType; import com.engine.organization.util.db.MapperProxyFactory; import org.apache.commons.lang3.StringUtils; import weaver.conn.RecordSet; -import weaver.general.StringUtil; import weaver.general.Util; import java.util.*; @@ -143,7 +142,8 @@ public class PostInfoServiceImpl extends Service implements PostInfoService { // 编辑状态下赋值操作 String id = Util.null2String(params.get("id")); - if (!StringUtil.isEmpty(id)) { + String planId = Util.null2String(params.get("planId")); + if (StringUtils.isNotBlank(id)) { PostInfoPO postInfoPO = getPostInfoMapper().getPostInfoByID(Integer.parseInt(id)); OrganizationAssert.notNull(postInfoPO, "选择的数据不存在,或数据已删除"); @@ -161,6 +161,11 @@ public class PostInfoServiceImpl extends Service implements PostInfoService { postIdBrowser.setBrowserConditionParam(browserBean); // 编辑状态下,编号只读 // noItem.setViewAttr(1); + }else if(StringUtils.isNotBlank(planId)){ + BrowserBean browserBean = postIdBrowser.getBrowserConditionParam(); + List> maps = getPostMapper().listPostsByIds(DeleteParam.builder().ids(planId).build().getIds()); + browserBean.setReplaceDatas(maps); + postIdBrowser.setBrowserConditionParam(browserBean); } selectItems.add(noItem); diff --git a/src/com/engine/organization/transmethod/LogViewTransMethod.java b/src/com/engine/organization/transmethod/LogViewTransMethod.java index 1bc6d2b2..dbb2befa 100644 --- a/src/com/engine/organization/transmethod/LogViewTransMethod.java +++ b/src/com/engine/organization/transmethod/LogViewTransMethod.java @@ -44,7 +44,7 @@ public class LogViewTransMethod { public String getDateTimeFormat(String dateTime) { if (StringUtils.isNotBlank(dateTime)) { - dateTime = dateTime.substring(0, dateTime.length() - 2); + dateTime = dateTime.substring(0,19); } return dateTime; } From 15a819a272dda0956eb18899d9f3813645fa714c Mon Sep 17 00:00:00 2001 From: dxfeng Date: Mon, 11 Jul 2022 09:14:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A1=A8=E7=BB=93=E6=9E=84=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/表结构SQL/MySQL.sql | 3 +- docs/表结构SQL/Oracle.sql | 3 +- docs/表结构SQL/SqlServer.sql | 3 +- .../webservice/CustomBrowserService.java | 18 ++++++ .../webservice/CustomBrowserServiceImpl.java | 62 +++++++++++++++++++ 5 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 src/com/engine/organization/webservice/CustomBrowserService.java create mode 100644 src/com/engine/organization/webservice/CustomBrowserServiceImpl.java diff --git a/docs/表结构SQL/MySQL.sql b/docs/表结构SQL/MySQL.sql index dc8c5cb0..e07ea392 100644 --- a/docs/表结构SQL/MySQL.sql +++ b/docs/表结构SQL/MySQL.sql @@ -483,7 +483,7 @@ CREATE TABLE HR_LOG ( operator_name varchar(100) NULL, create_time date NULL, operate_type int NULL, - params_str varchar(100) NULL, + params_str varchar(2000) NULL, client_ip varchar(100) NULL, method_name varchar(100) NULL, delete_type int NULL, @@ -491,5 +491,6 @@ CREATE TABLE HR_LOG ( operate_module_name varchar(100) NULL, operate_module int NULL, message varchar(2000) NULL, + value varchar(100) NULL, CONSTRAINT HR_LOG_PK PRIMARY KEY (id) ); diff --git a/docs/表结构SQL/Oracle.sql b/docs/表结构SQL/Oracle.sql index 6447cf72..600b39f1 100644 --- a/docs/表结构SQL/Oracle.sql +++ b/docs/表结构SQL/Oracle.sql @@ -452,7 +452,7 @@ CREATE TABLE HR_LOG ( OPERATOR_NAME NVARCHAR2(100) NULL, CREATE_TIME DATE NULL, OPERATE_TYPE NUMBER NULL, - PARAMS_STR NVARCHAR2(100) NULL, + PARAMS_STR NVARCHAR2(2000) NULL, CLIENT_IP NVARCHAR2(100) NULL, METHOD_NAME NVARCHAR2(100) NULL, DELETE_TYPE NUMBER NULL, @@ -460,5 +460,6 @@ CREATE TABLE HR_LOG ( OPERATE_MODULE_NAME NVARCHAR2(100) NULL, OPERATE_MODULE NUMBER NULL, MESSAGE NVARCHAR2(2000) NULL, + VALUE NVARCHAR2(100) NULL, CONSTRAINT HR_LOG_PK PRIMARY KEY (ID) ); \ No newline at end of file diff --git a/docs/表结构SQL/SqlServer.sql b/docs/表结构SQL/SqlServer.sql index 41a3c07a..04c850ba 100644 --- a/docs/表结构SQL/SqlServer.sql +++ b/docs/表结构SQL/SqlServer.sql @@ -451,7 +451,7 @@ CREATE TABLE HR_LOG ( operator_name varchar(100) NULL, create_time datetime NULL, operate_type int NULL, - params_str varchar(100) NULL, + params_str varchar(2000) NULL, client_ip varchar(100) NULL, method_name varchar(100) NULL, delete_type int NULL, @@ -459,5 +459,6 @@ CREATE TABLE HR_LOG ( operate_module_name varchar(100) NULL, operate_module int NULL, message varchar(2000) NULL, + value varchar(100) NULL, CONSTRAINT HR_LOG_PK PRIMARY KEY (id) ); \ No newline at end of file diff --git a/src/com/engine/organization/webservice/CustomBrowserService.java b/src/com/engine/organization/webservice/CustomBrowserService.java new file mode 100644 index 00000000..e666a3a4 --- /dev/null +++ b/src/com/engine/organization/webservice/CustomBrowserService.java @@ -0,0 +1,18 @@ +package com.engine.organization.webservice; + + +import javax.jws.WebMethod; +import javax.jws.WebService; + + +@WebService +public interface CustomBrowserService { + + + @WebMethod( + operationName = "getCompTreeList", + action = "com.engine.organization.webservice.CustomBrowserService.getCompTreeList" + ) + //List getCompTreeList(); + String getCompTreeList(String a,String b); +} diff --git a/src/com/engine/organization/webservice/CustomBrowserServiceImpl.java b/src/com/engine/organization/webservice/CustomBrowserServiceImpl.java new file mode 100644 index 00000000..70aeb170 --- /dev/null +++ b/src/com/engine/organization/webservice/CustomBrowserServiceImpl.java @@ -0,0 +1,62 @@ +package com.engine.organization.webservice; + +import com.engine.organization.entity.company.po.CompPO; +import com.engine.organization.mapper.comp.CompMapper; +import com.engine.organization.util.db.MapperProxyFactory; +import org.apache.commons.collections4.CollectionUtils; + +import java.util.List; +import java.util.Map; + + +public class CustomBrowserServiceImpl implements CustomBrowserService { + private CompMapper getCompMapper() { + return MapperProxyFactory.getProxy(CompMapper.class); + } + + //@Override + //public List getCompTreeList() { + // // 获取所有启用数据 + // List allList = getCompMapper().list("").stream().filter(item -> 0 == item.getForbiddenTag()).collect(Collectors.toList()); + // + // List parentList = allList.stream().filter(item -> (null == item.getParentCompany() || 0 == item.getParentCompany())).collect(Collectors.toList()); + // Map> compMap = allList.stream().filter(item -> (null != item.getParentCompany() && 0 != item.getParentCompany())).collect(Collectors.groupingBy(CompPO::getParentCompany)); + // List returnList = new ArrayList<>(); + // dealChildren(parentList, returnList, compMap); + // + // return returnList; + //} + @Override + public String getCompTreeList(String a, String b) { + StringBuilder sb = new StringBuilder(); + sb.append("\n" + + "\n" + + "\n" + + "A【" + a + "】\n" + + "\n" + + "测试ADAD\n" + + "\n" + + "\n" + + "B【" + b + "】\n" + + "测试噜啦啦啦\n" + + "\n" + + "\n" + + "C\n" + + "过年回家喽\n" + + "\n" + + ""); + + return sb.toString(); + } + + + private void dealChildren(List parentList, List returnList, Map> compMap) { + if (CollectionUtils.isEmpty(parentList)) { + return; + } + for (CompPO compPO : parentList) { + returnList.add(compPO); + dealChildren(compMap.get(compPO.getId()), returnList, compMap); + } + } +} From 7ecd58d27b315308ebb96fd591e94b8fc45b3184 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Mon, 11 Jul 2022 10:01:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=A0=E9=99=A4webService?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webservice/CustomBrowserService.java | 18 ------ .../webservice/CustomBrowserServiceImpl.java | 62 ------------------- 2 files changed, 80 deletions(-) delete mode 100644 src/com/engine/organization/webservice/CustomBrowserService.java delete mode 100644 src/com/engine/organization/webservice/CustomBrowserServiceImpl.java diff --git a/src/com/engine/organization/webservice/CustomBrowserService.java b/src/com/engine/organization/webservice/CustomBrowserService.java deleted file mode 100644 index e666a3a4..00000000 --- a/src/com/engine/organization/webservice/CustomBrowserService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.engine.organization.webservice; - - -import javax.jws.WebMethod; -import javax.jws.WebService; - - -@WebService -public interface CustomBrowserService { - - - @WebMethod( - operationName = "getCompTreeList", - action = "com.engine.organization.webservice.CustomBrowserService.getCompTreeList" - ) - //List getCompTreeList(); - String getCompTreeList(String a,String b); -} diff --git a/src/com/engine/organization/webservice/CustomBrowserServiceImpl.java b/src/com/engine/organization/webservice/CustomBrowserServiceImpl.java deleted file mode 100644 index 70aeb170..00000000 --- a/src/com/engine/organization/webservice/CustomBrowserServiceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.engine.organization.webservice; - -import com.engine.organization.entity.company.po.CompPO; -import com.engine.organization.mapper.comp.CompMapper; -import com.engine.organization.util.db.MapperProxyFactory; -import org.apache.commons.collections4.CollectionUtils; - -import java.util.List; -import java.util.Map; - - -public class CustomBrowserServiceImpl implements CustomBrowserService { - private CompMapper getCompMapper() { - return MapperProxyFactory.getProxy(CompMapper.class); - } - - //@Override - //public List getCompTreeList() { - // // 获取所有启用数据 - // List allList = getCompMapper().list("").stream().filter(item -> 0 == item.getForbiddenTag()).collect(Collectors.toList()); - // - // List parentList = allList.stream().filter(item -> (null == item.getParentCompany() || 0 == item.getParentCompany())).collect(Collectors.toList()); - // Map> compMap = allList.stream().filter(item -> (null != item.getParentCompany() && 0 != item.getParentCompany())).collect(Collectors.groupingBy(CompPO::getParentCompany)); - // List returnList = new ArrayList<>(); - // dealChildren(parentList, returnList, compMap); - // - // return returnList; - //} - @Override - public String getCompTreeList(String a, String b) { - StringBuilder sb = new StringBuilder(); - sb.append("\n" + - "\n" + - "\n" + - "A【" + a + "】\n" + - "\n" + - "测试ADAD\n" + - "\n" + - "\n" + - "B【" + b + "】\n" + - "测试噜啦啦啦\n" + - "\n" + - "\n" + - "C\n" + - "过年回家喽\n" + - "\n" + - ""); - - return sb.toString(); - } - - - private void dealChildren(List parentList, List returnList, Map> compMap) { - if (CollectionUtils.isEmpty(parentList)) { - return; - } - for (CompPO compPO : parentList) { - returnList.add(compPO); - dealChildren(compMap.get(compPO.getId()), returnList, compMap); - } - } -}