BUG修复
This commit is contained in:
parent
c49abcf77f
commit
fe668c37e7
|
|
@ -63,7 +63,8 @@ public class JobBrowserService extends BrowserService {
|
|||
searchTreeParams.setId(idArray[1]);
|
||||
Map<String, Object> searchTree = new JobServiceImpl().getSearchTree(searchTreeParams);
|
||||
List<TreeNode> datas = (List<TreeNode>) searchTree.get("datas");
|
||||
nodeData.addAll(datas.get(0).getSubs());
|
||||
TreeNode treeNode = datas.stream().filter(item -> idArray[1].equals(item.getId())).findFirst().orElse(new TreeNode());
|
||||
nodeData.addAll(treeNode.getSubs());
|
||||
}
|
||||
}
|
||||
List<CusBrowserTree> cusBrowserTrees = CusBowserTreeBO.convertSearchTreeToBorwserTree(nodeData);
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ public class JobBO {
|
|||
Map<Long, List<JobListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentJob() && 0 != item.getParentJob()).collect(Collectors.groupingBy(JobListDTO::getParentJob));
|
||||
// 处理被引用数据
|
||||
List<String> usedIds = MapperProxyFactory.getProxy(JobMapper.class).listUsedId();
|
||||
// 兼容不同类型
|
||||
usedIds.addAll(MapperProxyFactory.getProxy(JobMapper.class).getCusJobIds());
|
||||
List<String> collect = Arrays.stream(String.join(",", usedIds).split(",")).collect(Collectors.toList());
|
||||
return dtoList.stream().peek(e -> {
|
||||
List<JobListDTO> childList = collects.get(e.getId());
|
||||
|
|
|
|||
|
|
@ -136,6 +136,14 @@ public interface JobMapper {
|
|||
*/
|
||||
List<String> listUsedId();
|
||||
|
||||
/**
|
||||
* EC人员使用的聚才林岗位
|
||||
* @return
|
||||
*/
|
||||
List<String> getCusJobIds();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取最大排序
|
||||
*
|
||||
|
|
|
|||
|
|
@ -540,6 +540,12 @@
|
|||
and t.id != #{id}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getCusJobIds" resultType="java.lang.String">
|
||||
SELECT FIELD100002
|
||||
FROM CUS_FIELDDATA
|
||||
WHERE SCOPE = 'HrmCustomFieldByInfoType'
|
||||
AND SCOPEID = -1
|
||||
</select>
|
||||
|
||||
<sql id="nullparentJob">
|
||||
and ifnull(parent_job,0) =
|
||||
|
|
|
|||
|
|
@ -815,7 +815,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
saveImportDetailLog(historyDetailPO);
|
||||
continue nextRow;
|
||||
}
|
||||
if (StringUtils.isNotBlank(cellValue) && StringUtils.isBlank(Util.null2String(reallyValue)) && !"parent_comp".equals(infoPO.getFieldName())) {
|
||||
if (StringUtils.isNotBlank(cellValue) && StringUtils.isBlank(Util.null2String(reallyValue)) && !"ec_company".equals(infoPO.getFieldName())) {
|
||||
historyDetailPO.setOperateDetail(infoPO.getFieldNameDesc() + "数据转换失败,未找到对应数据");
|
||||
historyDetailPO.setStatus("0");
|
||||
saveImportDetailLog(historyDetailPO);
|
||||
|
|
|
|||
|
|
@ -539,11 +539,11 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
|
||||
// 人员信息变动,更新分部、部门、岗位
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate("SELECT ID FROM CUS_FIELDDATA WHERE SCOPEID =-1 AND FIELD100002 = ?", jobById.getId());
|
||||
rs.execute("SELECT ID FROM CUS_FIELDDATA WHERE SCOPE = 'HrmCustomFieldByInfoType' AND SCOPEID =-1 AND FIELD100002 = '" + jobById.getId() + "'");
|
||||
while (rs.next()) {
|
||||
long userId = Long.parseLong(Util.null2String(rs.getString("ID")));
|
||||
// 更新岗位 、岗位更新触发器
|
||||
rs.executeUpdate("update CUS_FIELDDATA set FIELD100002 = ? where SCOPEID =-1 and id = ", targetJob.getId(), userId);
|
||||
rs.executeUpdate("update CUS_FIELDDATA set FIELD100002 = ? where SCOPE = 'HrmCustomFieldByInfoType' AND SCOPEID =-1 and id = ?", targetJob.getId(), userId);
|
||||
CusFieldDataTrigger.run(userId);
|
||||
// 更新人员组织架构图
|
||||
}
|
||||
|
|
@ -569,13 +569,14 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
job.setParentDept(parentDepartment);
|
||||
job.setEcDepartment(ecDepartment);
|
||||
job.setParentJob(parentJob);
|
||||
getJobMapper().updateBaseJob(job);
|
||||
// 更新人员信息
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate("SELECT ID FROM CUS_FIELDDATA WHERE SCOPEID =-1 AND FIELD100002 = ?", job.getId());
|
||||
rs.execute("SELECT ID FROM CUS_FIELDDATA WHERE SCOPE = 'HrmCustomFieldByInfoType' AND SCOPEID =-1 AND FIELD100002 = '" + job.getId() + "'");
|
||||
while (rs.next()) {
|
||||
long userId = Long.parseLong(Util.null2String(rs.getString("ID")));
|
||||
// 更新人员分部、部门
|
||||
rs.executeUpdate("UPDATE HRMRESOURCE SET SUBCOMPANYID1 = ? , DEPARTMENTID = ? WHERE ID =? ", ecCompany, ecDepartment, userId);
|
||||
// rs.executeUpdate("UPDATE HRMRESOURCE SET SUBCOMPANYID1 = ? , DEPARTMENTID = ? WHERE ID =? ", ecCompany, ecDepartment, userId);
|
||||
// 更新人员组织架构图
|
||||
CusFieldDataTrigger.run(userId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue