|
@@ -355,6 +355,11 @@ public class TestPlugin extends AbstractListPlugin {
|
|
|
existingDeptEntry.set("position", postName);
|
|
|
isUpdated = true;
|
|
|
}
|
|
|
+ //如果职位为空,则赋值无
|
|
|
+ if ("".equals(existingDeptEntry.getString("position"))) {
|
|
|
+ existingDeptEntry.set("position", "无");
|
|
|
+ isUpdated = true;
|
|
|
+ }
|
|
|
// 如果有更新则保存
|
|
|
if (isUpdated) {
|
|
|
SaveServiceHelper.save(new DynamicObject[]{existingUser});
|
|
@@ -423,11 +428,20 @@ public class TestPlugin extends AbstractListPlugin {
|
|
|
this.getView().showMessage("部门编码为 " + deptCode + " 的部门缺少组织结构信息,跳过该记录。");
|
|
|
}
|
|
|
}
|
|
|
- String postName = personData.getString("nckd_posidname");;
|
|
|
- bumeninfo.set("position", postName);
|
|
|
+ String postName = personData.getString("nckd_posidname");
|
|
|
+ if ("".equals(postName)) {
|
|
|
+ bumeninfo.set("position", "无");
|
|
|
+ }else {
|
|
|
+ bumeninfo.set("position", postName);
|
|
|
+ }
|
|
|
//所在岗位名称
|
|
|
- String positionnumber = personData.getString("nckd_posidname");;
|
|
|
- bumeninfo.set("post", positionnumber);
|
|
|
+ String positionnumber = personData.getString("nckd_posidname");
|
|
|
+ if ("".equals(positionnumber)) {
|
|
|
+ bumeninfo.set("post", "无");
|
|
|
+ }else {
|
|
|
+ bumeninfo.set("post", positionnumber);
|
|
|
+ }
|
|
|
+
|
|
|
// 保存新用户信息
|
|
|
SaveServiceHelper.save(new DynamicObject[]{userinfo});
|
|
|
msg+="工号为 " + gonghao + " 的用户已创建!";
|