蔡德晨 5 jaren geleden
bovenliggende
commit
54dbd0792f

+ 2 - 0
src/main/java/com/jeeplus/modules/sys/dao/OfficeDao.java

@@ -63,4 +63,6 @@ public interface OfficeDao extends TreeDao<Office> {
     List<String> findBranchOfficeId(@Param("branchOffice")String branchOffice,@Param("companyId")String companyId);
 
     List<String> findChildOfficeId(String parentId);
+
+    List<Office> findAllList1(String comId);
 }

+ 2 - 2
src/main/java/com/jeeplus/modules/sys/service/OfficeService.java

@@ -58,8 +58,8 @@ public class OfficeService extends TreeService<OfficeDao, Office> {
 
 	public List<Office> findList(Boolean isAll){
 		if (isAll != null && isAll){
-			//return UserUtils.getOfficeAllList();
-			return UserUtils.getOfficeList();
+			return UserUtils.getOfficeAllList();
+//			return UserUtils.getOfficeList();
 		}else{
 			return UserUtils.getOfficeList();
 		}

+ 6 - 0
src/main/java/com/jeeplus/modules/sys/utils/UserUtils.java

@@ -813,6 +813,12 @@ public class UserUtils {
 		return officeList;
 	}
 
+	public static List<Office> getAllOfficeList(){
+		String comId = UserUtils.getUser().getComId();
+		List<Office> officeList = officeDao.findAllList1(comId);
+		return officeList;
+	}
+
 	/**
 	 * 获取授权主要对象
 	 */

+ 10 - 1
src/main/resources/mappings/modules/sys/OfficeDao.xml

@@ -282,7 +282,16 @@
 			<include refid="officeColumns"/>
 		FROM sys_office a
 		<include refid="officeJoins"/>
-		WHERE a.del_flag = #{DEL_FLAG_NORMAL}
+		WHERE a.del_flag = #{DEL_FLAG_NORMAL} and a.id != '1'
+		/*ORDER BY a.code*/
+	</select>
+
+	<select id="findAllList1" resultType="Office" parameterType="String">
+		SELECT
+		<include refid="officeColumns"/>
+		FROM sys_office a
+		<include refid="officeJoins"/>
+		WHERE a.del_flag = #{DEL_FLAG_NORMAL} and a.id != '1'
 		/*ORDER BY a.code*/
 	</select>
 

+ 1 - 1
src/main/webapp/webpage/modules/workstaff/workAddressBookList.jsp

@@ -105,7 +105,7 @@
                         <label class="layui-form-label">部门:</label>
                         <div class="layui-input-block with-icon">
                             <sys:treeselect id="office" name="office.id" value="${workStaffBasicInfo.office.id}" labelName="office.name" labelValue="${workStaffBasicInfo.office.name}"
-                                            title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input required" notAllowSelectParent="true"/>
+                                            title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input required" notAllowSelectParent="true" isAll="true"/>
                         </div>
                     </div>
                     <div class="layui-item athird fr">