|
@@ -19,8 +19,8 @@ import nckd.jxccl.base.common.utils.PatternUtil;
|
|
|
import nckd.jxccl.hrmp.hbpm.common.hr.PositionBillConstant;
|
|
import nckd.jxccl.hrmp.hbpm.common.hr.PositionBillConstant;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 岗位申请单属性变更服务类
|
|
* 岗位申请单属性变更服务类
|
|
@@ -83,16 +83,17 @@ public class PositionBillPropertyChangedService extends PositionBillBaseService
|
|
|
transKeyMap.putAll(PositionBillServiceHelper.getPosBillEntryTransKeyMap());
|
|
transKeyMap.putAll(PositionBillServiceHelper.getPosBillEntryTransKeyMap());
|
|
|
// 获取岗位要转换的键值
|
|
// 获取岗位要转换的键值
|
|
|
transKeyMap.putAll(PositionBillServiceHelper.getPositionTransKeyMap());
|
|
transKeyMap.putAll(PositionBillServiceHelper.getPositionTransKeyMap());
|
|
|
- // 排除字段
|
|
|
|
|
- List<String> positionExcludeKeyList = PositionBillServiceHelper.getPositionExcludeKeyList();
|
|
|
|
|
- positionExcludeKeyList.forEach(transKeyMap::remove);
|
|
|
|
|
|
|
+ // 获取岗位所有属性
|
|
|
|
|
+ Set<String> positionAllEntities = PositionBillServiceHelper.getPositionAllEntities();
|
|
|
|
|
|
|
|
StringBuilder selectSqlBuilder = new StringBuilder();
|
|
StringBuilder selectSqlBuilder = new StringBuilder();
|
|
|
for(IDataEntityProperty iDataEntityProperty : entryEntityInfo) {
|
|
for(IDataEntityProperty iDataEntityProperty : entryEntityInfo) {
|
|
|
String propName = iDataEntityProperty.getName();
|
|
String propName = iDataEntityProperty.getName();
|
|
|
if (PatternUtil.isExProperty(propName) && propName.endsWith(lineSuffix)) {
|
|
if (PatternUtil.isExProperty(propName) && propName.endsWith(lineSuffix)) {
|
|
|
String selectName = PositionBillServiceHelper.getNoLineSuffixProp(propName, lineSuffix);
|
|
String selectName = PositionBillServiceHelper.getNoLineSuffixProp(propName, lineSuffix);
|
|
|
- selectSqlBuilder.append(",").append(transKeyMap.getOrDefault(selectName, selectName));
|
|
|
|
|
|
|
+ if (positionAllEntities.contains(selectName)) {
|
|
|
|
|
+ selectSqlBuilder.append(",").append(transKeyMap.getOrDefault(selectName, selectName));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
selectSqlBuilder.deleteCharAt(0);
|
|
selectSqlBuilder.deleteCharAt(0);
|
|
@@ -122,14 +123,14 @@ public class PositionBillPropertyChangedService extends PositionBillBaseService
|
|
|
String propName = iDataEntityProperty.getName();
|
|
String propName = iDataEntityProperty.getName();
|
|
|
if (PatternUtil.isExProperty(propName) && propName.endsWith(lineSuffix)) {
|
|
if (PatternUtil.isExProperty(propName) && propName.endsWith(lineSuffix)) {
|
|
|
String selectName = PositionBillServiceHelper.getNoLineSuffixProp(propName, lineSuffix);
|
|
String selectName = PositionBillServiceHelper.getNoLineSuffixProp(propName, lineSuffix);
|
|
|
- if (positionExcludeKeyList.contains(selectName) || HRStringUtils.equals(selectName, PositionBillConstant.NCKD_POSDUTY_ENTRY_ENTITY_KEY)) {
|
|
|
|
|
- continue;
|
|
|
|
|
- }
|
|
|
|
|
- // 原上级岗位特殊处理
|
|
|
|
|
- if (HRStringUtils.equals(selectName, PositionBillConstant.NCKD_PARENT)) {
|
|
|
|
|
- entryEntityDyn.set(PositionBillConstant.NCKD_ORIPARENT_KEY+lineSuffix, position.get(transKeyMap.getOrDefault(selectName, selectName)));
|
|
|
|
|
|
|
+ selectName = transKeyMap.getOrDefault(selectName, selectName);
|
|
|
|
|
+ if (positionAllEntities.contains(selectName)) {
|
|
|
|
|
+ // 原上级岗位特殊处理
|
|
|
|
|
+ if (HRStringUtils.equals(selectName, PositionBillConstant.NCKD_PARENT)) {
|
|
|
|
|
+ entryEntityDyn.set(PositionBillConstant.NCKD_ORIPARENT_KEY+lineSuffix, position.get(selectName));
|
|
|
|
|
+ }
|
|
|
|
|
+ entryEntityDyn.set(propName, position.get(selectName));
|
|
|
}
|
|
}
|
|
|
- entryEntityDyn.set(propName, position.get(transKeyMap.getOrDefault(selectName, selectName)));
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|