diff --git a/src/com/engine/organization/entity/department/param/DeptSearchParam.java b/src/com/engine/organization/entity/department/param/DeptSearchParam.java
index bb4b005e..93b53094 100644
--- a/src/com/engine/organization/entity/department/param/DeptSearchParam.java
+++ b/src/com/engine/organization/entity/department/param/DeptSearchParam.java
@@ -31,4 +31,5 @@ public class DeptSearchParam extends BaseQueryParam {
private String uuid;
private Double showOrder;
private Integer showOrderOfTree;
+ private Boolean forbiddenTag;
}
diff --git a/src/com/engine/organization/entity/job/bo/JobBO.java b/src/com/engine/organization/entity/job/bo/JobBO.java
index d07e88e4..433031ab 100644
--- a/src/com/engine/organization/entity/job/bo/JobBO.java
+++ b/src/com/engine/organization/entity/job/bo/JobBO.java
@@ -5,7 +5,9 @@ import com.engine.organization.entity.job.param.JobSearchParam;
import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.job.vo.SingleJobTreeVO;
import com.engine.organization.entity.searchtree.SearchTree;
+import com.engine.organization.mapper.job.JobMapper;
import com.engine.organization.transmethod.JobTransMethod;
+import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.collections.CollectionUtils;
import weaver.hrm.job.JobTitlesComInfo;
@@ -157,4 +159,11 @@ public class JobBO {
public static String getJobTitleNameByEcJobTitle(String ecJobTitle) {
return new JobTitlesComInfo().getJobTitlesname(ecJobTitle);
}
+
+ public static JobPO getEcJobTitleByJobId(Long jobId) {
+ if (null == jobId) {
+ return null;
+ }
+ return MapperProxyFactory.getProxy(JobMapper.class).getJobById(jobId);
+ }
}
diff --git a/src/com/engine/organization/mapper/comp/CompMapper.xml b/src/com/engine/organization/mapper/comp/CompMapper.xml
index 67392d6c..d93c8a52 100644
--- a/src/com/engine/organization/mapper/comp/CompMapper.xml
+++ b/src/com/engine/organization/mapper/comp/CompMapper.xml
@@ -215,16 +215,19 @@
- and ifnull(canceled,0)=
- #{CompanyPO.canceled}
+
+ and ifnull(canceled,0)= #{CompanyPO.canceled}
+
- and nvl(canceled,0)=
- #{CompanyPO.canceled}
+
+ and nvl(canceled,0)= #{CompanyPO.canceled}
+
- and isnull(canceled,0)=
- #{CompanyPO.canceled}
+
+ and isnull(canceled,0)= #{CompanyPO.canceled}
+
\ No newline at end of file
diff --git a/src/com/engine/organization/mapper/department/DepartmentMapper.xml b/src/com/engine/organization/mapper/department/DepartmentMapper.xml
index 28ab23da..50803f0d 100644
--- a/src/com/engine/organization/mapper/department/DepartmentMapper.xml
+++ b/src/com/engine/organization/mapper/department/DepartmentMapper.xml
@@ -182,16 +182,19 @@
- and ifnull(canceled,0)=
- #{departmentPO.canceled}
+
+ and ifnull(canceled,0)= #{departmentPO.canceled}
+
- and nvl(canceled,0)=
- #{departmentPO.canceled}
+
+ and nvl(canceled,0)= #{departmentPO.canceled}
+
- and isnull(canceled,0)=
- #{departmentPO.canceled}
+
+ and isnull(canceled,0)= #{departmentPO.canceled}
+
\ No newline at end of file
diff --git a/src/com/engine/organization/mapper/job/JobMapper.xml b/src/com/engine/organization/mapper/job/JobMapper.xml
index 041e1e43..054165da 100644
--- a/src/com/engine/organization/mapper/job/JobMapper.xml
+++ b/src/com/engine/organization/mapper/job/JobMapper.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java
index c5d607ba..24a91fba 100644
--- a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java
+++ b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java
@@ -182,10 +182,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
@Override
public int updateForbiddenTagById(DeptSearchParam params) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
- DepartmentPO departmentPO = DepartmentPO.builder().id(params.getId()).canceled(params.getCanceled() ? 0 : 1).build();
+ DepartmentPO departmentPO = DepartmentPO.builder().id(params.getId()).canceled(params.getForbiddenTag() ? 0 : 1).build();
Map map = new HashMap<>();
- map.put("id", departmentPO.getId());
- map.put("forbiddenTag", departmentPO.getCanceled());
+ map.put("id", Util.null2String(departmentPO.getId()));
+ map.put("forbiddenTag", Util.null2String(departmentPO.getCanceled()));
new OrganizationSyncEc(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.CANCELED, map).sync();
return 1;
}
diff --git a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java
index 71c521a1..c83f6b63 100644
--- a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java
+++ b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java
@@ -462,8 +462,14 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
}
Long jobTitle = params.getJobTitle();
if (null != jobTitle) {
- // TODO BUG修复
- sqlWhere += " AND t.jobtitle = '" + jobTitle + "'";
+ JobPO ecJobTitleByJobId = JobBO.getEcJobTitleByJobId(jobTitle);
+ if (null != ecJobTitleByJobId) {
+ sqlWhere += " AND t.subcompanyid1 = '" + ecJobTitleByJobId.getEcCompany() + "'";
+ sqlWhere += " AND t.departmentid = '" + ecJobTitleByJobId.getEcDepartment() + "'";
+ sqlWhere += " AND t.jobtitle = '" + ecJobTitleByJobId.getEcJobTitle() + "'";
+ } else {
+ sqlWhere = " where 1 = 2 ";
+ }
}
// 分权查询
diff --git a/src/com/engine/organization/service/impl/JobServiceImpl.java b/src/com/engine/organization/service/impl/JobServiceImpl.java
index 37320e58..6450f6f0 100644
--- a/src/com/engine/organization/service/impl/JobServiceImpl.java
+++ b/src/com/engine/organization/service/impl/JobServiceImpl.java
@@ -499,8 +499,16 @@ public class JobServiceImpl extends Service implements JobService {
@Override
public Map getHrmListByJobId(Long jobId) {
OrganizationWeaTable table = new OrganizationWeaTable<>(user, EmployeeTableVO.class);
- // TODO BUG修复
- table.setSqlwhere(" where jobtitle = '" + jobId + "' and status<4");
+ String sqlWhere = " where 1=1 ";
+ JobPO ecJobTitleByJobId = JobBO.getEcJobTitleByJobId(jobId);
+ if (null != ecJobTitleByJobId) {
+ sqlWhere += " AND t.subcompanyid1 = '" + ecJobTitleByJobId.getEcCompany() + "'";
+ sqlWhere += " AND t.departmentid = '" + ecJobTitleByJobId.getEcDepartment() + "'";
+ sqlWhere += " AND t.jobtitle = '" + ecJobTitleByJobId.getEcJobTitle() + "'";
+ } else {
+ sqlWhere = " where 1 = 2 ";
+ }
+ table.setSqlwhere(sqlWhere + " and status<4");
WeaResultMsg result = new WeaResultMsg(false);
result.putAll(table.makeDataResult());
result.success();