Ver código fonte

Merge branch 'master' of http://192.168.2.4:3000/user5/simple_xg_total_process_master

chengqiang 4 anos atrás
pai
commit
f898ee4759

+ 28 - 0
src/main/java/com/jeeplus/modules/feedback/entity/QuestionFeedback.java

@@ -2,6 +2,7 @@ package com.jeeplus.modules.feedback.entity;
 
 import com.jeeplus.common.persistence.DataEntity;
 import com.jeeplus.modules.examplesingle.entity.ExampleSingle;
+import com.jeeplus.modules.sys.entity.User;
 
 /**
  * 问题反馈 实体类
@@ -10,6 +11,9 @@ public class QuestionFeedback extends DataEntity<QuestionFeedback> {
     private String title; //反馈标题
     private String content; //反馈内容
     private String contents; //反馈内容1
+    private User handlingId; //处理人
+    private String handlingOpinions; //处理意见
+    private String handlingStatus; //处理状态
 
     public String getTitle() {
         return title;
@@ -34,4 +38,28 @@ public class QuestionFeedback extends DataEntity<QuestionFeedback> {
     public void setContents(String contents) {
         this.contents = contents;
     }
+
+    public User getHandlingId() {
+        return handlingId;
+    }
+
+    public void setHandlingId(User handlingId) {
+        this.handlingId = handlingId;
+    }
+
+    public String getHandlingOpinions() {
+        return handlingOpinions;
+    }
+
+    public void setHandlingOpinions(String handlingOpinions) {
+        this.handlingOpinions = handlingOpinions;
+    }
+
+    public String getHandlingStatus() {
+        return handlingStatus;
+    }
+
+    public void setHandlingStatus(String handlingStatus) {
+        this.handlingStatus = handlingStatus;
+    }
 }

+ 7 - 2
src/main/java/com/jeeplus/modules/feedback/service/QuestionFeedbackService.java

@@ -7,6 +7,7 @@ import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.Collections3;
 import com.jeeplus.common.utils.MenuStatusEnum;
+import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.examplesingle.dao.ExampleSingleDao;
 import com.jeeplus.modules.examplesingle.entity.ExampleSingle;
 import com.jeeplus.modules.feedback.dao.QuestionFeedbackDao;
@@ -32,9 +33,9 @@ public class QuestionFeedbackService extends CrudService<QuestionFeedbackDao, Qu
 	public Page<QuestionFeedback> findPage(Page<QuestionFeedback> page, QuestionFeedback questionFeedback) {
 		//设置数据权限
 		if(!UserUtils.getUser().isAdmin()) {
-			String dataScopeSql = null;
+			String dataScopeSql = dataScopeFilter(questionFeedback.getCurrentUser(), "o", "u", "s", MenuStatusEnum.OVERALL_WORK_RECORDS.getValue());
+//			String dataScopeSql = dataScopeFilterOR(questionFeedback.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_PERFORMANCE.getValue());
 			questionFeedback.getSqlMap().put("dsf", dataScopeSql);
-			questionFeedback.getSqlMap().put("delFlag", "AND a.del_flag = 0");
 		}
 		int count = dao.queryCount(questionFeedback);
 		page.setCount(count);
@@ -44,6 +45,10 @@ public class QuestionFeedbackService extends CrudService<QuestionFeedbackDao, Qu
 		for (QuestionFeedback feedback : questionFeedbackList) {
 			User user=UserUtils.get(feedback.getCreateBy().getId());
 			feedback.setCreateBy(user);
+			if (feedback.getHandlingId()!=null && StringUtils.isNotBlank(feedback.getHandlingId().getId())){
+				User u=UserUtils.get(feedback.getHandlingId().getId());
+				feedback.setHandlingId(u);
+			}
 		}
 		page.setList(questionFeedbackList);
 		return page;

+ 48 - 1
src/main/java/com/jeeplus/modules/feedback/web/QuestionFeedbackController.java

@@ -132,7 +132,25 @@ public class QuestionFeedbackController extends BaseController {
 		}
 		return "redirect:"+Global.getAdminPath()+"/feedback/questionFeedback/?repage";
 	}
-
+	/**
+	 * 处理反馈
+	 * @param questionFeedback
+	 * @param model
+	 * @return
+	 */
+	@RequiresPermissions(value={"feedback:questionFeedback:handle"})
+	@RequestMapping(value = "handle")
+	public String handle(QuestionFeedback questionFeedback, Model model) {
+		if (questionFeedback!=null&&StringUtils.isNotBlank(questionFeedback.getId())) {
+			questionFeedback = feedbackService.get(questionFeedback.getId());
+			User user=UserUtils.get(questionFeedback.getCreateBy().getId());
+			questionFeedback.setCreateBy(user);
+			User u=UserUtils.getUser();
+			questionFeedback.setHandlingId(u);
+		}
+		model.addAttribute("questionFeedback", questionFeedback);
+		return "modules/feedback/feedbackHandle";
+	}
 	/**
 	 * 删除反馈
 	 * @param questionFeedback
@@ -176,4 +194,33 @@ public class QuestionFeedbackController extends BaseController {
 		map.put("page",page.getList());
 		return map;
 	}
+	@RequestMapping(value = "view")
+	public String view(QuestionFeedback questionFeedback, Model model) {
+		if (questionFeedback!=null&&StringUtils.isNotBlank(questionFeedback.getId())) {
+			questionFeedback = feedbackService.get(questionFeedback.getId());
+			User user=UserUtils.get(questionFeedback.getCreateBy().getId());
+			questionFeedback.setCreateBy(user);
+			if (questionFeedback.getHandlingId()!=null && StringUtils.isNotBlank(questionFeedback.getHandlingId().getId())){
+				User u=UserUtils.get(questionFeedback.getHandlingId().getId());
+				questionFeedback.setHandlingId(u);
+			}
+		}
+		model.addAttribute("questionFeedback", questionFeedback);
+		return "modules/feedback/feedbackview";
+	}
+	/**
+	 * 撤回处理
+	 * @param questionFeedback
+	 * @param redirectAttributes
+	 * @return
+	 * @throws Exception
+	 */
+	@RequestMapping(value = "rebank")
+	public String rebank(QuestionFeedback questionFeedback, RedirectAttributes redirectAttributes) throws Exception {
+		questionFeedback.setHandlingId(new User());
+		questionFeedback.setHandlingOpinions("");
+		questionFeedback.setHandlingStatus("");
+		feedbackDao.update(questionFeedback);
+		return "redirect:"+Global.getAdminPath()+"/feedback/questionFeedback/?repage";
+	}
 }

+ 24 - 4
src/main/resources/mappings/modules/feedback/QuestionFeedbackDao.xml

@@ -12,7 +12,10 @@
 		a.del_flag AS "delFlag",
 		a.title AS "title",
 		a.content AS "content",
-		a.contents AS "contents"
+		a.contents AS "contents",
+		a.handling_id AS "handlingId.id",
+		a.handling_opinions AS "handlingOpinions",
+		a.handling_status AS "handlingStatus"
 	</sql>
 	<select id="get" resultType="QuestionFeedback" >
 		SELECT 
@@ -32,6 +35,9 @@
 			<if test="content!=null and content !=''">
 				and a.content like CONCAT('%',#{content},'%')
 			</if>
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				 ${sqlMap.dsf}
+			</if>
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -54,6 +60,9 @@
 			<if test="content!=null and content !=''">
 				and a.content like CONCAT('%',#{content},'%')
 			</if>
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				 ${sqlMap.dsf}
+			</if>
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -74,9 +83,13 @@
 			update_date,
 			remarks,
 			del_flag,
+			office_id,
 			title,
 			content,
-			contents
+			contents,
+			handling_id,
+			handling_opinions,
+			handling_status
 		) VALUES (
 			#{id},
 			#{createBy.id},
@@ -85,9 +98,13 @@
 			#{updateDate},
 			#{remarks},
 			#{delFlag},
+			#{createBy.office.id},
 			#{title},
 			#{content},
-			#{contents}
+			#{contents},
+			#{handlingId.id},
+			#{handlingOpinions},
+			#{handlingStatus}
 		)
 	</insert>
 	
@@ -98,7 +115,10 @@
 			remarks = #{remarks},
 			title = #{title},
 			content = #{content},
-			contents = #{contents}
+			contents = #{contents},
+			handling_id=#{handlingId.id},
+			handling_opinions=#{handlingOpinions},
+			handling_status=#{handlingStatus}
 		WHERE id = #{id}
 	</update>
 	

+ 40 - 8
src/main/webapp/webpage/modules/feedback/feedbackList.jsp

@@ -451,7 +451,7 @@
                 // {checkbox: true, fixed: true},
                 {field:'index',align:'center',  width:40,title: '序号'}
 				,{field:'title',align:'center', title: '反馈标题', minWidth:150,templet:function(d){
-						var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogListView('查看反馈', '${ctx}/feedback/questionFeedback/form?id=" + d.id + "','" + d.id + "','95%','95%')\">" +
+						var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogListView('查看反馈', '${ctx}/feedback/questionFeedback/view?id=" + d.id + "','" + d.id + "','95%','95%')\">" +
 								"<span title=" + d.title + ">" + d.title + "</span></a>";
 						return xml;
 					}}
@@ -464,6 +464,19 @@
                 ,{field:'tmdcreateDate', align:'center',title: '创建时间',width:150,templet:function(d){
 						return "<span title='"+ d.createDate +"'>" + d.tmdcreateDate + "</span>";
 					}}
+				,{field:'handlingName', align:'center',title: '处理人',width:150,templet:function(d){
+						return "<span title='"+ d.handlingName +"'>" + d.handlingName + "</span>";
+					}}
+				,{field:'handlingStatus', align:'center',title: '处理状态',width:150,templet:function(d){
+						if(d.handlingStatus=='1'){
+							var st = getAuditState("5")
+							return "<span class=\"status-label status-label-" + st.label + "\" title='"+ d.handlingStatus +"'>已处理</span>";
+						}else{
+							var st = getAuditState("1")
+							return "<span class=\"status-label status-label-" + st.label + "\" title='"+ d.handlingStatus +"'>未处理</span>";
+
+						}
+					}}
                 // ,{fixed: 'right',align:'center', toolbar: '#op',title:"操作"}
                 ,{align:'center',title:"操作",width:130,templet:function(d){
                         ////对操作进行初始化
@@ -476,28 +489,47 @@
 						{
 							xml+="<a href=\"${ctx}/feedback/questionFeedback/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该反馈信息吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\"> 删除</a>";
 						}
+						if(d.canedit3 != undefined && d.canedit3 =="3")
+						{
+							xml+="<a href=\"#\" onclick=\"openDialogre('处理反馈', '${ctx}/feedback/questionFeedback/handle?id=" + d.id +"','95%', '95%','','保存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" >处理</a>";
+						}
+						if(d.canedit4 != undefined && d.canedit4 =="4")
+						{
+							xml+="<a href=\"${ctx}/feedback/questionFeedback/rebank?id=" + d.id + "\" onclick=\"return confirmx('确认要撤回该处理信息吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\"> 撤回</a>";
+						}
                         xml+="</div>"
                             return xml;
                     }}
             ]]
             ,data: [
                 <c:if test="${ not empty page.list}">
-                <c:forEach items="${page.list}" var="oaNotify" varStatus="index">
+                <c:forEach items="${page.list}" var="feedback" varStatus="index">
                 <c:if test="${index.index != 0}">,</c:if>
                 {
                     "index":"${index.index+1}"
-                    ,"id":"${oaNotify.id}"
-                    ,"title":"<c:out value="${oaNotify.title}" escapeXml="true"/>"
-                    ,"content":"<c:out value="${oaNotify.content}" escapeXml="true"/>"
-                    ,"createBy":"${oaNotify.createBy.name}"
-                    ,"createDate":"<fmt:formatDate value="${oaNotify.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
-                    ,"tmdcreateDate":"<fmt:formatDate value="${oaNotify.createDate}" pattern="yyyy-MM-dd"/>"
+                    ,"id":"${feedback.id}"
+                    ,"title":"<c:out value="${feedback.title}" escapeXml="true"/>"
+                    ,"content":"<c:out value="${feedback.content}" escapeXml="true"/>"
+                    ,"createBy":"${feedback.createBy.name}"
+                    ,"handlingName":"${feedback.handlingId.name}"
+                    ,"handlingStatus":"${feedback.handlingStatus}"
+                    ,"tmdcreateDate":"<fmt:formatDate value="${feedback.createDate}" pattern="yyyy-MM-dd"/>"
 					<shiro:hasPermission name="feedback:questionFeedback:edit">
 					,"canedit1":1
 					</shiro:hasPermission>
 					<shiro:hasPermission name="feedback:questionFeedback:del">
 					,"canedit2":2
 					</shiro:hasPermission>
+					<shiro:hasPermission name="feedback:questionFeedback:handle">
+					<c:choose>
+						<c:when test="${feedback.handlingStatus!='1'}">
+						,"canedit3":3
+						</c:when>
+						<c:otherwise>
+							,"canedit4":4
+						</c:otherwise>
+					</c:choose>
+					</shiro:hasPermission>
                 }
                 </c:forEach>
                 </c:if>

+ 1 - 1
src/main/webapp/webpage/modules/sys/sysIndex.jsp

@@ -13,7 +13,7 @@
 
     <%@ include file="/webpage/include/head.jsp"%>
     <%@ include file="/webpage/include/systemInfoSocketInit.jsp"%>
-    <%@ include file="/webpage/include/layIMInit.jsp"%>
+<%--    <%@ include file="/webpage/include/layIMInit.jsp"%>--%>
     <script src="${ctxStatic}/common/inspinia.js?v=3.2.0"></script>
     <script src="${ctxStatic}/common/contabs.js"></script>
     <meta name="keywords" content="JeePlus快速开发平台">

+ 1 - 1
src/main/webapp/webpage/modules/sys/sysLogin.jsp

@@ -549,7 +549,7 @@
 					<div style="margin-top: 100px;">
 
 						<div style="width:600px;margin:auto">
-							<img src="${ctxp}/static/common/login/images/top-name3.png">
+							<img src="${ctxp}/static/common/login/images/top-name4.png">
 							<div id="login-box" class="login-box visible widget-box">
 								<div class="login-title">
 									<span>用户登录</span>