소스 검색

标准意见查看添加部门查询信息

user5 3 년 전
부모
커밋
c78a48725f

+ 18 - 0
src/main/java/com/jeeplus/modules/bzshbExamine/entity/StandardOpinion.java

@@ -34,6 +34,8 @@ public class StandardOpinion extends DataEntity<StandardOpinion> {
     private String deductOption;    //标准复核意见
     private String standardDetail;  //标准内容
     private String standardDetailTwo;  //标准内容旧数据
+    private String officeId;    //部门id
+    private String officeName;  //部门名称
 
 
     public String getUserId() {
@@ -187,4 +189,20 @@ public class StandardOpinion extends DataEntity<StandardOpinion> {
     public void setStandardDetailTwo(String standardDetailTwo) {
         this.standardDetailTwo = standardDetailTwo;
     }
+
+    public String getOfficeId() {
+        return officeId;
+    }
+
+    public void setOfficeId(String officeId) {
+        this.officeId = officeId;
+    }
+
+    public String getOfficeName() {
+        return officeName;
+    }
+
+    public void setOfficeName(String officeName) {
+        this.officeName = officeName;
+    }
 }

+ 9 - 0
src/main/java/com/jeeplus/modules/bzshbExamine/service/StandardOpinionAllService.java

@@ -6,6 +6,7 @@ import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.bzshbExamine.dao.StandardOpinionDao;
 import com.jeeplus.modules.bzshbExamine.entity.StandardOpinion;
 import com.jeeplus.modules.sys.dao.UserDao;
+import com.jeeplus.modules.sys.service.OfficeService;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -24,6 +25,8 @@ public class StandardOpinionAllService extends CrudService<StandardOpinionDao, S
 
     @Autowired
     private UserDao userDao;
+    @Autowired
+    private OfficeService officeService;
 
     @Override
     public StandardOpinion get(String id) {
@@ -31,6 +34,12 @@ public class StandardOpinionAllService extends CrudService<StandardOpinionDao, S
     }
 
     public Page<StandardOpinion> findPage(Page<StandardOpinion> page, StandardOpinion standardOpinion) {
+        if(StringUtils.isNotBlank(standardOpinion.getOfficeId())){
+            //查询该选择节点下所有的部门Id
+            List<String> officeIdList = officeService.getChildrenOffice(standardOpinion.getOfficeId());
+            officeIdList.add(standardOpinion.getOfficeId());
+            standardOpinion.setOfficeIdList(officeIdList);
+        }
         List<String> auditUserIdList = null;
         //判断是否选择对应总审
         //如果选择了需要查询得总审信息

+ 11 - 0
src/main/java/com/jeeplus/modules/bzshbExamine/service/StandardOpinionService.java

@@ -2,11 +2,13 @@ package com.jeeplus.modules.bzshbExamine.service;
 
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.bzshbExamine.dao.BzshbExaminDao;
 import com.jeeplus.modules.bzshbExamine.dao.StandardOpinionDao;
 import com.jeeplus.modules.bzshbExamine.entity.BzshbExaminInfo;
 import com.jeeplus.modules.bzshbExamine.entity.StandardOpinion;
 import com.jeeplus.modules.sys.dao.UserDao;
+import com.jeeplus.modules.sys.service.OfficeService;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -25,6 +27,8 @@ public class StandardOpinionService extends CrudService<StandardOpinionDao, Stan
 
     @Autowired
     private UserDao userDao;
+    @Autowired
+    private OfficeService officeService;
 
     @Override
     public StandardOpinion get(String id) {
@@ -32,6 +36,13 @@ public class StandardOpinionService extends CrudService<StandardOpinionDao, Stan
     }
 
     public Page<StandardOpinion> findPage(Page<StandardOpinion> page, StandardOpinion standardOpinion) {
+        if(StringUtils.isNotBlank(standardOpinion.getOfficeId())){
+            //查询该选择节点下所有的部门Id
+            List<String> officeIdList = officeService.getChildrenOffice(standardOpinion.getOfficeId());
+            officeIdList.add(standardOpinion.getOfficeId());
+            standardOpinion.setOfficeIdList(officeIdList);
+        }
+
         //查询当前登录人对应的所有总审id
         List<String> auditUserIdList = userDao.getAuditUserListByRelevanceUserId(UserUtils.getUser().getId());
         standardOpinion.setAuditUserIdList(auditUserIdList);

+ 13 - 0
src/main/resources/mappings/modules/bzshbExamin/StandardOpinionDao.xml

@@ -25,6 +25,12 @@
 			<if test="(userId != null and userId != '') or (userName != null and userName != '')">
 				AND (wpu.user_id = #{userId} or su.name like concat('%',#{userName},'%'))
 			</if>
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and su.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
 		</where>
 		group by wpu.user_id
 		order by a.audit_pass_date desc
@@ -93,6 +99,13 @@
 			<if test="(userId != null and userId != '') or (userName != null and userName != '')">
 				AND (wpu.user_id = #{userId} or su.name like concat('%',#{userName},'%'))
 			</if>
+
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and su.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
 		</where>
 		group by wpu.user_id) z
     </select>

+ 7 - 0
src/main/webapp/webpage/modules/bzshStandardOpinion/StandardOpinionAllList.jsp

@@ -225,6 +225,13 @@
 								</input>
 							</div>
 						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">部门:</label>
+							<div class="layui-input-block with-icon">
+								<sys:treeselect id="officeId" name="officeId" value="${standardOpinion.officeId}" labelName="officeName" labelValue="${standardOpinion.officeName}" cssStyle="background-color: #fff"
+												title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+							</div>
+						</div>
 						<div style="clear:both;"></div>
 					</div>
 				</form:form>

+ 7 - 1
src/main/webapp/webpage/modules/bzshStandardOpinion/StandardOpinionList.jsp

@@ -344,7 +344,13 @@
 						<div style="    clear:both;"></div>
 					</div>
 					<div id="moresees" style="clear:both;display:none;" class="lw6">
-
+						<div class="layui-item query athird">
+							<label class="layui-form-label">部门:</label>
+							<div class="layui-input-block with-icon">
+								<sys:treeselect id="officeId" name="officeId" value="${standardOpinion.officeId}" labelName="officeName" labelValue="${standardOpinion.officeName}" cssStyle="background-color: #fff"
+												title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+							</div>
+						</div>
 						<div style="clear:both;"></div>
 					</div>
 				</form:form>

+ 21 - 21
src/main/webapp/webpage/modules/sys/tagTreeselectReimbur.jsp

@@ -51,17 +51,17 @@
 					+ new Date().getTime()+"&branchOffice=${branchOffice}", function(zNodes){
 				// 初始化树结构
 				tree = $.fn.zTree.init($("#tree"), setting, zNodes);
-				
+
 				// 默认展开一级节点
 				var nodes = tree.getNodesByParam("level", 0);
 				for(var i=0; i<nodes.length; i++) {
 					tree.expandNode(nodes[i], true, false, false);
 				}
 				//异步加载子节点(加载用户)
-				// var nodesOne = tree.getNodesByParam("isParent", true);
-				// for(var j=0; j<nodesOne.length; j++) {
-				// 	tree.reAsyncChildNodes(nodesOne[j],"!refresh",false);
-				// }
+				 var nodesOne = tree.getNodesByParam("isParent", true);
+				 for(var j=0; j<nodesOne.length; j++) {
+				 	tree.reAsyncChildNodes(nodesOne[j],"!refresh",true);
+				 }
 				selectCheckNode();
 			});
 			key = $("#key");
@@ -69,7 +69,7 @@
 			key.bind('keydown', function (e){if(e.which == 13){searchNode();}});
 			setTimeout("search();", "300");
 		});
-		
+
 		// 默认选择节点
 		function selectCheckNode(){
 			var ids = "${selectIds}".split(",");
@@ -94,26 +94,26 @@
 			}
 			searchNode(e);
 		}
-		
+
 		//搜索节点
 		function searchNode() {
 			// 取得输入的关键字的值
 			var value = $.trim(key.get(0).value);
-			
+
 			// 按名字查询
 			var keyType = "name";<%--
 			if (key.hasClass("empty")) {
 				value = "";
 			}--%>
-			
+
 			// 如果和上次一次,就退出不查了。
 			if (lastValue === value) {
 				return;
 			}
-			
+
 			// 保存最后一次
 			lastValue = value;
-			
+
 			var nodes = tree.getNodes();
 			// 如果要查空字串,就退出不查了。
 			if (value == "") {
@@ -124,17 +124,17 @@
 			nodeList = tree.getNodesByParamFuzzy(keyType, value);
 			updateNodes(nodeList);
 		}
-		
+
 		//隐藏所有节点
-		function hideAllNode(nodes){			
+		function hideAllNode(nodes){
 			nodes = tree.transformToArray(nodes);
 			for(var i=nodes.length-1; i>=0; i--) {
 				tree.hideNode(nodes[i]);
 			}
 		}
-		
+
 		//显示所有节点
-		function showAllNode(nodes){			
+		function showAllNode(nodes){
 			nodes = tree.transformToArray(nodes);
 			for(var i=nodes.length-1; i>=0; i--) {
 				/* if(!nodes[i].isParent){
@@ -150,14 +150,14 @@
 				/* } */
 			}
 		}
-		
+
 		//更新节点状态
 		function updateNodes(nodeList) {
 			tree.showNodes(nodeList);
 			for(var i=0, l=nodeList.length; i<l; i++) {
-				
+
 				//展开当前节点的父节点
-				tree.showNode(nodeList[i].getParentNode()); 
+				tree.showNode(nodeList[i].getParentNode());
 				//tree.expandNode(nodeList[i].getParentNode(), true, false, false);
 				//显示展开符合条件节点的父节点
 				while(nodeList[i].getParentNode()!=null){
@@ -203,8 +203,8 @@
 				}
 			})
 		}
-		
-		
+
+
 	</script>
 </head>
 <body>
@@ -216,4 +216,4 @@
 			</span>
 	</div>
 	<div id="tree" class="ztree" style="padding:15px 20px;"></div>
-</body>
+</body>