BUG修复

pull/235/MERGE^2
dxfeng 3 years ago
parent 5c66744468
commit 8e385537da

@ -9,6 +9,7 @@ import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import weaver.crm.Maint.SectorInfoComInfo; import weaver.crm.Maint.SectorInfoComInfo;
import weaver.general.StringUtil; import weaver.general.StringUtil;
import weaver.general.Util;
import weaver.hrm.resource.ResourceComInfo; import weaver.hrm.resource.ResourceComInfo;
import java.util.*; import java.util.*;
@ -36,8 +37,8 @@ public class CompBO {
.parentCompany(e.getParentCompany()) .parentCompany(e.getParentCompany())
.parentCompName(null == poMaps.get(e.getParentCompany()) ? "" : poMaps.get(e.getParentCompany()).getCompName()) .parentCompName(null == poMaps.get(e.getParentCompany()) ? "" : poMaps.get(e.getParentCompany()).getCompName())
.orgCode(e.getOrgCode()) .orgCode(e.getOrgCode())
.industry(new SectorInfoComInfo().getSectorInfoname(e.getIndustry() + "")) .industry(new SectorInfoComInfo().getSectorInfoname(Util.null2String(e.getIndustry())))
.compPrincipal(getUserNameById(e.getCompPrincipal() + "")) .compPrincipal(getUserNameById( Util.null2String(e.getCompPrincipal())))
.showOrder(e.getShowOrder()) .showOrder(e.getShowOrder())
.forbiddenTag(e.getForbiddenTag()) .forbiddenTag(e.getForbiddenTag())
.build()).collect(Collectors.toList()); .build()).collect(Collectors.toList());
@ -53,7 +54,7 @@ public class CompBO {
e.setChildren(childList); e.setChildren(childList);
e.setIsUsed(1); e.setIsUsed(1);
} else { } else {
if (collect.contains(e.getId() + "")) { if (collect.contains(Util.null2String(e.getId()))) {
e.setIsUsed(1); e.setIsUsed(1);
} else { } else {
e.setIsUsed(0); e.setIsUsed(0);

@ -10,6 +10,7 @@ import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.mapper.employee.EmployeeMapper; import com.engine.organization.mapper.employee.EmployeeMapper;
import com.engine.organization.util.db.MapperProxyFactory; import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import weaver.general.Util;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -50,7 +51,7 @@ public class DepartmentBO {
e.setChildren(childList); e.setChildren(childList);
e.setIsUsed(1); e.setIsUsed(1);
} else { } else {
if (collect.contains(e.getId() + "")) { if (collect.contains(Util.null2String(e.getId()))) {
e.setIsUsed(1); e.setIsUsed(1);
} else { } else {
e.setIsUsed(0); e.setIsUsed(0);

@ -188,7 +188,7 @@ public class ExtendInfoBO {
fieldItem.setLabel(""); fieldItem.setLabel("");
} }
fieldItem.setType(getFieldHtmlType(extendInfoPO.getControlType() + "")); fieldItem.setType(getFieldHtmlType(Util.null2String(extendInfoPO.getControlType())));
fieldItem.setKey(extendInfoPO.getFieldName()); fieldItem.setKey(extendInfoPO.getFieldName());
// 查看操作 全部设置为只读 // 查看操作 全部设置为只读
if (1 == viewAttr) { if (1 == viewAttr) {
@ -320,7 +320,7 @@ public class ExtendInfoBO {
} }
default: default:
if (detailtype.equals("161") || detailtype.equals("162") || detailtype.equals("256") || detailtype.equals("257")) { if (detailtype.equals("161") || detailtype.equals("162") || detailtype.equals("256") || detailtype.equals("257")) {
BrowserBean browserbean = new BrowserBean(detailtype + ""); BrowserBean browserbean = new BrowserBean( Util.null2String(detailtype));
BrowserInitUtil browserInitUtil = new BrowserInitUtil(); BrowserInitUtil browserInitUtil = new BrowserInitUtil();
String fielddbtype = customValue; String fielddbtype = customValue;
if (!customValue.startsWith("browser.")) { if (!customValue.startsWith("browser.")) {
@ -435,7 +435,7 @@ public class ExtendInfoBO {
detailtype = "1"; detailtype = "1";
} }
searchConditionItem.setKey(Util.null2String(fieldvalue)); searchConditionItem.setKey(Util.null2String(fieldvalue));
searchConditionItem.setValue(fieldvalue + ""); searchConditionItem.setValue(Util.null2String(fieldvalue));
searchConditionItem.setDetailtype(Util.getIntValue(detailtype, 3)); searchConditionItem.setDetailtype(Util.getIntValue(detailtype, 3));
break; break;
case "6": //附件 case "6": //附件

@ -110,7 +110,7 @@ public class JobBO {
e.setChildren(childList); e.setChildren(childList);
e.setIsUsed(1); e.setIsUsed(1);
} else { } else {
if (collect.contains(e.getId() + "")) { if (collect.contains(Util.null2String(e.getId()))) {
e.setIsUsed(1); e.setIsUsed(1);
} else { } else {
e.setIsUsed(0); e.setIsUsed(0);

@ -3,6 +3,7 @@ package com.engine.organization.entity.staff.bo;
import com.engine.organization.entity.staff.param.StaffSearchParam; import com.engine.organization.entity.staff.param.StaffSearchParam;
import com.engine.organization.entity.staff.po.StaffPO; import com.engine.organization.entity.staff.po.StaffPO;
import com.engine.organization.transmethod.StaffTransMethod; import com.engine.organization.transmethod.StaffTransMethod;
import weaver.general.Util;
import java.util.Date; import java.util.Date;
@ -45,7 +46,7 @@ public class StaffBO {
String sb = "编制数:" + parseNull(staffPO.getStaffNum()) + String sb = "编制数:" + parseNull(staffPO.getStaffNum()) +
",在编数:" + parseNull(staffPO.getPermanentNum()) + ",在编数:" + parseNull(staffPO.getPermanentNum()) +
",冻结数:" + parseNull(staffPO.getFreezeNum()) + ",冻结数:" + parseNull(staffPO.getFreezeNum()) +
",缺编状态:" + StaffTransMethod.getLackSpan(staffPO.getLackStatus() + ""); ",缺编状态:" + StaffTransMethod.getLackSpan(Util.null2String(staffPO.getLackStatus()));
staffPO.setStaffDesc(sb); staffPO.setStaffDesc(sb);
} }

@ -370,7 +370,7 @@ public class CompServiceImpl extends Service implements CompService {
OrganizationAssert.isFalse(disableIds.contains(targetCompanyId), "请勿选择当前分部本身及其子分部"); OrganizationAssert.isFalse(disableIds.contains(targetCompanyId), "请勿选择当前分部本身及其子分部");
CompPO compPO = getCompMapper().listById(companyId); CompPO compPO = getCompMapper().listById(companyId);
compPO.setEcCompany(targetCompanyId); compPO.setEcCompany(targetCompanyId);
CompPO jclCompanyId = EcHrmRelationUtil.getJclCompanyId(targetCompanyId + ""); CompPO jclCompanyId = EcHrmRelationUtil.getJclCompanyId(Util.null2String(targetCompanyId));
if (null != jclCompanyId) { if (null != jclCompanyId) {
compPO.setParentCompany(jclCompanyId.getId()); compPO.setParentCompany(jclCompanyId.getId());
} else { } else {

@ -238,7 +238,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
params.put("parent_dept", jclDepartmentId.getId()); params.put("parent_dept", jclDepartmentId.getId());
// 部门不为空,自动指定所属分部 // 部门不为空,自动指定所属分部
params.put("parent_comp", jclDepartmentId.getParentComp()); params.put("parent_comp", jclDepartmentId.getParentComp());
params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(jclDepartmentId.getParentComp() + "")); params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(Util.null2String(jclDepartmentId.getParentComp())));
} }
} }
@ -293,7 +293,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
params.put("parent_dept", jclDepartmentId.getId()); params.put("parent_dept", jclDepartmentId.getId());
// 部门不为空,自动指定所属分部 // 部门不为空,自动指定所属分部
params.put("parent_comp", jclDepartmentId.getParentComp()); params.put("parent_comp", jclDepartmentId.getParentComp());
params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(jclDepartmentId.getParentComp() + "")); params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(Util.null2String(jclDepartmentId.getParentComp())));
} }
} else { } else {
@ -558,7 +558,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
HasRightUtil.hasRight(user, RIGHT_NAME, false); HasRightUtil.hasRight(user, RIGHT_NAME, false);
// 被合并部门 // 被合并部门
Long ecParamDepartment = mergeParam.getDepartment(); Long ecParamDepartment = mergeParam.getDepartment();
DepartmentPO targetDepartment = EcHrmRelationUtil.getJclDepartmentId(ecParamDepartment + ""); DepartmentPO targetDepartment = EcHrmRelationUtil.getJclDepartmentId( Util.null2String(ecParamDepartment));
// 断言判断 // 断言判断
OrganizationAssert.isFalse(null == targetDepartment, "被合并部门数据有误,暂时无法合并"); OrganizationAssert.isFalse(null == targetDepartment, "被合并部门数据有误,暂时无法合并");
@ -668,11 +668,11 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
Long company = moveParam.getCompany(); Long company = moveParam.getCompany();
OrganizationAssert.notNull(company, "请选择要转移到的分部"); OrganizationAssert.notNull(company, "请选择要转移到的分部");
deptById.setEcCompany(company); deptById.setEcCompany(company);
deptById.setParentComp(Objects.requireNonNull(EcHrmRelationUtil.getJclCompanyId(company + "")).getId()); deptById.setParentComp(Objects.requireNonNull(EcHrmRelationUtil.getJclCompanyId( Util.null2String(company))).getId());
deptById.setParentDept(null); deptById.setParentDept(null);
} else if ("1".equals(moveParam.getMoveType())) { } else if ("1".equals(moveParam.getMoveType())) {
Long department = moveParam.getDepartment(); Long department = moveParam.getDepartment();
Long departmentId = Objects.requireNonNull(EcHrmRelationUtil.getJclDepartmentId(department + "")).getId(); Long departmentId = Objects.requireNonNull(EcHrmRelationUtil.getJclDepartmentId( Util.null2String(department))).getId();
OrganizationAssert.notNull(departmentId, "请选择要转移到的部门"); OrganizationAssert.notNull(departmentId, "请选择要转移到的部门");
List<DepartmentPO> deptListByPId = getDepartmentMapper().getDeptListByPId(moveParam.getId()); List<DepartmentPO> deptListByPId = getDepartmentMapper().getDeptListByPId(moveParam.getId());
Set<Long> disableIds = new HashSet<>(); Set<Long> disableIds = new HashSet<>();

@ -144,7 +144,7 @@ public class ExtServiceImpl extends Service implements ExtService {
for (Map.Entry<Long, List<ExtendInfoPO>> entry : groupMap.entrySet()) { for (Map.Entry<Long, List<ExtendInfoPO>> entry : groupMap.entrySet()) {
Map<String, Object> tableMap = new HashMap<>(); Map<String, Object> tableMap = new HashMap<>();
tableMap.put("hide", false); tableMap.put("hide", false);
tableMap.put("tabname", getExtendGroupMapper().getGroupNameById(entry.getKey() + "")); tableMap.put("tabname", getExtendGroupMapper().getGroupNameById(Util.null2String(entry.getKey())));
Map<String, Object> tabinfoMap = new HashMap<>(); Map<String, Object> tabinfoMap = new HashMap<>();
tabinfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, entry.getValue(), viewAttr, showLabel)); tabinfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, entry.getValue(), viewAttr, showLabel));
tabinfoMap.put("rownum", "rownum" + entry.getKey()); tabinfoMap.put("rownum", "rownum" + entry.getKey());

@ -367,9 +367,9 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
recordInfo.put("fieldname", fieldName); recordInfo.put("fieldname", fieldName);
recordInfo.put("fieldType", fieldType); recordInfo.put("fieldType", fieldType);
recordInfo.put("fieldTypeObj", fieldTypeObj); recordInfo.put("fieldTypeObj", fieldTypeObj);
recordInfo.put("enable", extendInfoPO.getIsenable() + ""); recordInfo.put("enable", Util.null2String(extendInfoPO.getIsenable()));
recordInfo.put("required", extendInfoPO.getIsrequired() + ""); recordInfo.put("required", Util.null2String(extendInfoPO.getIsrequired()));
recordInfo.put("isModify", extendInfoPO.getEditShow() + ""); recordInfo.put("isModify", Util.null2String(extendInfoPO.getEditShow()));
recordInfo.put("viewAttr", isUsed || isSysField ? 1 : 2); recordInfo.put("viewAttr", isUsed || isSysField ? 1 : 2);
recordInfo.put("key", "" + showOrder); recordInfo.put("key", "" + showOrder);
recordInfo.put("fieldidrowKey", fieldIdRowKey); recordInfo.put("fieldidrowKey", fieldIdRowKey);

@ -1085,9 +1085,9 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
} }
map.put("parent_comp", parentCompanyId); map.put("parent_comp", parentCompanyId);
map.put("parent_dept", parentDepartmentId); map.put("parent_dept", parentDepartmentId);
map.put("ec_company", EcHrmRelationUtil.getEcCompanyId(parentCompanyId + "")); map.put("ec_company", EcHrmRelationUtil.getEcCompanyId( Util.null2String(parentCompanyId)));
if (null != parentDepartmentId) { if (null != parentDepartmentId) {
map.put("ec_department", EcHrmRelationUtil.getEcDepartmentId(parentDepartmentId + "")); map.put("ec_department", EcHrmRelationUtil.getEcDepartmentId(Util.null2String(parentDepartmentId)));
} }
map.put("parent_job", parentJobId); map.put("parent_job", parentJobId);
jobName = split[split.length - 1]; jobName = split[split.length - 1];

@ -347,11 +347,11 @@ public class JobServiceImpl extends Service implements JobService {
params.put("is_key", null == searchParam.getIsKey() ? 0 : searchParam.getIsKey()); params.put("is_key", null == searchParam.getIsKey() ? 0 : searchParam.getIsKey());
Long ecDepartment = searchParam.getEcDepartment(); Long ecDepartment = searchParam.getEcDepartment();
DepartmentPO jclDepartment = EcHrmRelationUtil.getJclDepartmentId(ecDepartment + ""); DepartmentPO jclDepartment = EcHrmRelationUtil.getJclDepartmentId(Util.null2String(ecDepartment));
params.put("parent_dept", jclDepartment.getId()); params.put("parent_dept", jclDepartment.getId());
params.put("parent_comp", jclDepartment.getParentComp()); params.put("parent_comp", jclDepartment.getParentComp());
if (null != jclDepartment.getParentComp()) { if (null != jclDepartment.getParentComp()) {
params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(jclDepartment.getParentComp() + "")); params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(Util.null2String(jclDepartment.getParentComp())));
} }
if (StringUtils.isBlank(params.get("show_order").toString())) { if (StringUtils.isBlank(params.get("show_order").toString())) {
@ -386,11 +386,11 @@ public class JobServiceImpl extends Service implements JobService {
// 更新主表数据 // 更新主表数据
params.put("is_key", searchParam.getIsKey()); params.put("is_key", searchParam.getIsKey());
Long ecDepartment = searchParam.getEcDepartment(); Long ecDepartment = searchParam.getEcDepartment();
DepartmentPO jclDepartment = EcHrmRelationUtil.getJclDepartmentId(ecDepartment + ""); DepartmentPO jclDepartment = EcHrmRelationUtil.getJclDepartmentId(Util.null2String(ecDepartment));
params.put("parent_dept", jclDepartment.getId()); params.put("parent_dept", jclDepartment.getId());
params.put("parent_comp", jclDepartment.getParentComp()); params.put("parent_comp", jclDepartment.getParentComp());
if (null != jclDepartment.getParentComp()) { if (null != jclDepartment.getParentComp()) {
params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(jclDepartment.getParentComp() + "")); params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(Util.null2String(jclDepartment.getParentComp())));
} }
params.put("jobactivityid", JOB_ACTIVITY_ID); params.put("jobactivityid", JOB_ACTIVITY_ID);
new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.UPDATE, params, oldJobPO).sync(); new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.UPDATE, params, oldJobPO).sync();

@ -206,7 +206,7 @@ public class StaffPlanServiceImpl extends Service implements StaffPlanService {
OrganizationAssert.notNull(staffPlanPO, "选择的数据不存在,或数据已删除"); OrganizationAssert.notNull(staffPlanPO, "选择的数据不存在,或数据已删除");
planNoItem.setValue(staffPlanPO.getPlanNo()); planNoItem.setValue(staffPlanPO.getPlanNo());
planNameItem.setValue(staffPlanPO.getPlanName()); planNameItem.setValue(staffPlanPO.getPlanName());
planYearItem.setValue(staffPlanPO.getPlanYear() + ""); planYearItem.setValue(Util.null2String(staffPlanPO.getPlanYear()));
timeStartItem.setValue(DateUtil.getDate(staffPlanPO.getTimeStart(), "yyyy-MM-dd")); timeStartItem.setValue(DateUtil.getDate(staffPlanPO.getTimeStart(), "yyyy-MM-dd"));
timeEndItem.setValue(DateUtil.getDate(staffPlanPO.getTimeEnd(), "yyyy-MM-dd")); timeEndItem.setValue(DateUtil.getDate(staffPlanPO.getTimeEnd(), "yyyy-MM-dd"));

@ -113,11 +113,11 @@ public class StaffServiceImpl extends Service implements StaffService {
StaffPO staffPO = StaffBO.convertParamToPO(param, (long) user.getUID()); StaffPO staffPO = StaffBO.convertParamToPO(param, (long) user.getUID());
checkRequired(staffPO); checkRequired(staffPO);
// 赋值 // 赋值
CompPO jclCompanyId = EcHrmRelationUtil.getJclCompanyId(staffPO.getEcCompany() + ""); CompPO jclCompanyId = EcHrmRelationUtil.getJclCompanyId(Util.null2String(staffPO.getEcCompany()));
if (null != jclCompanyId) { if (null != jclCompanyId) {
staffPO.setCompId(jclCompanyId.getId()); staffPO.setCompId(jclCompanyId.getId());
} }
DepartmentPO jclDepartmentId = EcHrmRelationUtil.getJclDepartmentId(staffPO.getEcDepartment() + ""); DepartmentPO jclDepartmentId = EcHrmRelationUtil.getJclDepartmentId(Util.null2String(staffPO.getEcDepartment()));
if (null != jclDepartmentId) { if (null != jclDepartmentId) {
staffPO.setDeptId(jclDepartmentId.getId()); staffPO.setDeptId(jclDepartmentId.getId());
} }
@ -264,7 +264,7 @@ public class StaffServiceImpl extends Service implements StaffService {
} }
staffNumItem.setValue(staffPO.getStaffNum()); staffNumItem.setValue(staffPO.getStaffNum());
controlPolicyItem.setValue(staffPO.getControlPolicy() + ""); controlPolicyItem.setValue(Util.null2String(staffPO.getControlPolicy()));
descriptionItem.setValue(staffPO.getDescription()); descriptionItem.setValue(staffPO.getDescription());
} }
selectItems.add(planIdItem); selectItems.add(planIdItem);

Loading…
Cancel
Save