|  | @@ -310,6 +310,7 @@ public class TestPlugin  extends AbstractListPlugin {
 | 
											
												
													
														|  |                      //更新部门和岗位
 |  |                      //更新部门和岗位
 | 
											
												
													
														|  |                      DynamicObjectCollection existingDeptEntries = existingUser.getDynamicObjectCollection("entryentity");
 |  |                      DynamicObjectCollection existingDeptEntries = existingUser.getDynamicObjectCollection("entryentity");
 | 
											
												
													
														|  |                      DynamicObject existingDeptEntry =null;
 |  |                      DynamicObject existingDeptEntry =null;
 | 
											
												
													
														|  | 
 |  | +                    //循环,获取到不为兼职的人员分录数据
 | 
											
												
													
														|  |                      for (DynamicObject dep:existingDeptEntries) {
 |  |                      for (DynamicObject dep:existingDeptEntries) {
 | 
											
												
													
														|  |                          //改变分录不是兼职的分录数据
 |  |                          //改变分录不是兼职的分录数据
 | 
											
												
													
														|  |                          if (!dep.getBoolean("ispartjob")){
 |  |                          if (!dep.getBoolean("ispartjob")){
 | 
											
										
											
												
													
														|  | @@ -363,6 +364,11 @@ public class TestPlugin  extends AbstractListPlugin {
 | 
											
												
													
														|  |                          existingDeptEntry.set("position", postName);
 |  |                          existingDeptEntry.set("position", postName);
 | 
											
												
													
														|  |                          isUpdated = true;
 |  |                          isUpdated = true;
 | 
											
												
													
														|  |                      }
 |  |                      }
 | 
											
												
													
														|  | 
 |  | +                    if ("总经理".contains(postName)) {
 | 
											
												
													
														|  | 
 |  | +                        //设置为负责人
 | 
											
												
													
														|  | 
 |  | +                        existingDeptEntry.set("isincharge",true);
 | 
											
												
													
														|  | 
 |  | +                        isUpdated = true;
 | 
											
												
													
														|  | 
 |  | +                    }
 | 
											
												
													
														|  |                      //如果职位为空,则赋值无
 |  |                      //如果职位为空,则赋值无
 | 
											
												
													
														|  |                      if ("".equals(existingDeptEntry.getString("position"))) {
 |  |                      if ("".equals(existingDeptEntry.getString("position"))) {
 | 
											
												
													
														|  |                          existingDeptEntry.set("position", "无");
 |  |                          existingDeptEntry.set("position", "无");
 | 
											
										
											
												
													
														|  | @@ -442,6 +448,10 @@ public class TestPlugin  extends AbstractListPlugin {
 | 
											
												
													
														|  |                      }else {
 |  |                      }else {
 | 
											
												
													
														|  |                          bumeninfo.set("position", postName);
 |  |                          bumeninfo.set("position", postName);
 | 
											
												
													
														|  |                      }
 |  |                      }
 | 
											
												
													
														|  | 
 |  | +                    //如果人员的岗位为总经理,则设置为负责人
 | 
											
												
													
														|  | 
 |  | +                    if(("总经理").contains(postName)) {
 | 
											
												
													
														|  | 
 |  | +                        bumeninfo.set("isincharge",true);
 | 
											
												
													
														|  | 
 |  | +                    }
 | 
											
												
													
														|  |                      //所在岗位名称
 |  |                      //所在岗位名称
 | 
											
												
													
														|  |                      String positionnumber = personData.getString("nckd_posidname");
 |  |                      String positionnumber = personData.getString("nckd_posidname");
 | 
											
												
													
														|  |                      if ("".equals(positionnumber)) {
 |  |                      if ("".equals(positionnumber)) {
 | 
											
										
											
												
													
														|  | @@ -455,6 +465,7 @@ public class TestPlugin  extends AbstractListPlugin {
 | 
											
												
													
														|  |                      msg+="工号为 " + gonghao + " 的用户已创建!";
 |  |                      msg+="工号为 " + gonghao + " 的用户已创建!";
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +                    //刷新员工的类型字段
 | 
											
												
													
														|  |                      DBRoute dbRoute=new DBRoute("sys");
 |  |                      DBRoute dbRoute=new DBRoute("sys");
 | 
											
												
													
														|  |                      //生成id
 |  |                      //生成id
 | 
											
												
													
														|  |                      long timestamp = System.currentTimeMillis();
 |  |                      long timestamp = System.currentTimeMillis();
 | 
											
										
											
												
													
														|  | @@ -835,10 +846,10 @@ public class TestPlugin  extends AbstractListPlugin {
 | 
											
												
													
														|  |          //
 |  |          //
 | 
											
												
													
														|  |          if("testaaa".equals(e.getOperateKey()))
 |  |          if("testaaa".equals(e.getOperateKey()))
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
												
													
														|  | -            QFilter filter=new QFilter("number",QCP.equals,"12");
 |  | 
 | 
											
												
													
														|  | -            DynamicObject dynamicObject=BusinessDataServiceHelper
 |  | 
 | 
											
												
													
														|  | -                    .loadSingle("bos_user",new QFilter[]{filter});
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +//            QFilter filter=new QFilter("number",QCP.equals,"12");
 | 
											
												
													
														|  | 
 |  | +//            DynamicObject dynamicObject=BusinessDataServiceHelper
 | 
											
												
													
														|  | 
 |  | +//                    .loadSingle("bos_user",new QFilter[]{filter});
 | 
											
												
													
														|  | 
 |  | +            DynamicObject dynamicObject = BusinessDataServiceHelper.newDynamicObject("");
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          }
 |  |          }
 |