|
|
@@ -5,6 +5,7 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
|
import kd.bos.entity.EntityMetadataCache;
|
|
|
import kd.bos.entity.MainEntityType;
|
|
|
import kd.bos.entity.param.CustomParam;
|
|
|
+import kd.bos.ext.fi.bei.util.EmptyUtil;
|
|
|
import kd.bos.logging.Log;
|
|
|
import kd.bos.logging.LogFactory;
|
|
|
import kd.bos.orm.query.QCP;
|
|
|
@@ -230,7 +231,14 @@ public class SynPendingSalaryAdjDataServiceImpl implements SynPendingSalaryAdjDa
|
|
|
*/
|
|
|
dyn.set("nckd_newhradminorg", transferDyn.getLong("aorg.id")); //部门
|
|
|
dyn.set("nckd_newposition", transferDyn.getLong("aposition.boid")); //岗位
|
|
|
- dyn.set("nckd_newsalaryrank", salaryRankDyn.getLong("id")); //薪档
|
|
|
+ //判断薪档是否改变
|
|
|
+ boolean isChange = calaSararyRank(transferDyn.getLong("bb_po_position.boid"), transferDyn.getLong("aposition.boid"));
|
|
|
+ if(isChange) {
|
|
|
+ dyn.set("nckd_newsalaryrank", salaryRankDyn.getLong("id")); //薪档
|
|
|
+ }else{
|
|
|
+ dyn.set("nckd_newsalaryrank", adjRecordDyn.getLong("salaryrank.id"));
|
|
|
+ }
|
|
|
+
|
|
|
transferCount++;
|
|
|
billDynList.add(dyn);
|
|
|
}
|
|
|
@@ -285,4 +293,43 @@ public class SynPendingSalaryAdjDataServiceImpl implements SynPendingSalaryAdjDa
|
|
|
return adjRecordMap;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 岗位上字段
|
|
|
+ * 岗级 管理层级 职位序列 输出
|
|
|
+ * 变 不变 不变 岗级变,保留原档次
|
|
|
+ * 不变 变 不变 ×
|
|
|
+ * 不变 不变 变 岗级和档次都不变
|
|
|
+ * 变 不变 变 岗级变,保留原档次
|
|
|
+ * 变 变 不变 岗级变,档次默认为1档
|
|
|
+ * 不变 变 变 ×
|
|
|
+ * 变 变 变 岗级变,档次默认为1档
|
|
|
+ * @param oldPosition
|
|
|
+ * @param newPosition
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+
|
|
|
+ public boolean calaSararyRank(Long oldPosition, Long newPosition) {
|
|
|
+
|
|
|
+ if(oldPosition == null || newPosition == null) {
|
|
|
+ String selectField = "id,number,name,nckd_postgrade.id,jobseq.id,nckd_mgtlvldtl.nckd_mgmtlevel.id";
|
|
|
+ QFilter qFilter = new QFilter("id", QCP.equals, oldPosition);
|
|
|
+ DynamicObject oldPositionDyn = QueryServiceHelper.queryOne("hbpm_positionhr", selectField, new QFilter[]{qFilter});
|
|
|
+
|
|
|
+ String selectField1 = "id,number,name,nckd_postgrade.id,jobseq.id,nckd_mgtlvldtl.nckd_mgmtlevel.id";
|
|
|
+ QFilter qFilter1 = new QFilter("id", QCP.equals, newPosition);
|
|
|
+ DynamicObject newPositionDyn = QueryServiceHelper.queryOne("hbpm_positionhr", selectField1, new QFilter[]{qFilter1});
|
|
|
+ //岗级
|
|
|
+ Long oldPostGrade = EmptyUtil.isEmpty(oldPositionDyn.getLong("nckd_postgrade.id")) ? 0L : oldPositionDyn.getLong("nckd_postgrade.id");
|
|
|
+ Long newPostGrade = EmptyUtil.isEmpty(newPositionDyn.getLong("nckd_postgrade.id")) ? 0L : newPositionDyn.getLong("nckd_postgrade.id");
|
|
|
+ //管理层级
|
|
|
+ Long oldMgtLevel = EmptyUtil.isEmpty(oldPositionDyn.getLong("nckd_mgtlvldtl.nckd_mgmtlevel.id")) ? 0L : oldPositionDyn.getLong("nckd_mgtlvldtl.nckd_mgmtlevel.id");
|
|
|
+ Long newMgtLevel = EmptyUtil.isEmpty(newPositionDyn.getLong("nckd_mgtlvldtl.nckd_mgmtlevel.id")) ? 0L : newPositionDyn.getLong("nckd_mgtlvldtl.nckd_mgmtlevel.id");
|
|
|
+
|
|
|
+ if (!oldPostGrade.equals(newPostGrade) && !oldMgtLevel.equals(newMgtLevel)){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
}
|