Browse Source

公告流程更改

user5 4 years atrás
parent
commit
23551786c6

+ 9 - 0
src/main/java/com/jeeplus/modules/oa/entity/OaNotify.java

@@ -59,6 +59,7 @@ public class OaNotify extends ActEntity<OaNotify> {
 	private Integer closeStatus;  //关闭状态
 	private String flagAdmin;     //管理员状态(1:管理员,0:非管理员)
 	private String referenceNumber;     //文号
+	private String flagOffice;     //是否为办公室权限(1:是,0:否)
 
     public String getHome() {
         return home;
@@ -376,6 +377,14 @@ public class OaNotify extends ActEntity<OaNotify> {
 	public void setReadFlagStr(String readFlagStr) {
 		this.readFlagStr = readFlagStr;
 	}
+
+	public String getFlagOffice() {
+		return flagOffice;
+	}
+
+	public void setFlagOffice(String flagOffice) {
+		this.flagOffice = flagOffice;
+	}
 	/*	@Override
 	public String toString() {
 		return "OaNotify [type=" + type + ", title=" + title + ", content=" + content + ", files=" + files + ", status="

+ 2 - 2
src/main/java/com/jeeplus/modules/oa/service/OaNotifyService.java

@@ -348,8 +348,8 @@ public class OaNotifyService extends CrudService<OaNotifyDao, OaNotify> {
     public String saveNotify(OaNotify oaNotify) {
         oaNotify.setCloseStatus(0);
         this.save(oaNotify);
-        //判断当前登陆人是否为办公室人员
-        if("ff48ec7fc3bc4b909d5eab2322bb53bf".equals(UserUtils.getUser().getOffice().getId())){
+        //判断是否为办公室发起
+        if("1".equals(oaNotify.getFlagOffice())){
             //办公室发起审批
             return this.startAudit(oaNotify,oaNotify.getProcessInstanceId());
         }else{

+ 1 - 1
src/main/java/com/jeeplus/modules/oa/web/OaNotifyController.java

@@ -498,7 +498,7 @@ public class OaNotifyController extends BaseController {
             }else {
 				String str = null;
 				//判断当前登陆人是否为办公室人员
-				if("ff48ec7fc3bc4b909d5eab2322bb53bf".equals(UserUtils.getUser().getOffice().getId())){
+				if("1".equals(oaNotify.getFlagOffice())){
 					//办公室审批
 					str = oaNotifyService.auditSave(oaNotify, users);
 				}else{

+ 6 - 2
src/main/resources/mappings/modules/oa/OaNotifyDao.xml

@@ -44,6 +44,7 @@
 	<select id="get" resultType="OaNotify">
 		SELECT 
 			<include refid="oaNotifyColumns"/>
+			,a.flag_office as "flagOffice"
 		FROM oa_notify a
 		<include refid="oaNotifyJoins"/>
 		WHERE a.id = #{id}
@@ -55,6 +56,7 @@
 			<if test="isSelf">,
                     r.read_flag
 			</if>
+			,a.flag_office as "flagOffice"
 		FROM oa_notify a
 		<include refid="oaNotifyJoins"/>
 		<!-- 我的通告 -->
@@ -391,7 +393,8 @@
 			process_instance_id,
 			DEL_FLAG,
 			close_status,
-			reference_number
+			reference_number,
+			flag_office
 		) VALUES (
 			#{id},
 			#{type},
@@ -413,7 +416,8 @@
 			#{processInstanceId},
 			#{delFlag},
 			#{closeStatus},
-			#{referenceNumber}
+			#{referenceNumber},
+			#{flagOffice}
 		)
 	</insert>
 	

+ 15 - 0
src/main/webapp/WEB-INF/tags/table/officeAddRow.tag

@@ -0,0 +1,15 @@
+<%@ tag language="java" pageEncoding="UTF-8"%>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ attribute name="url" type="java.lang.String" required="true"%>
+<%@ attribute name="title" type="java.lang.String" required="true"%>
+<%@ attribute name="width" type="java.lang.String" required="false"%>
+<%@ attribute name="height" type="java.lang.String" required="false"%>
+<%@ attribute name="target" type="java.lang.String" required="false"%>
+<%@ attribute name="label" type="java.lang.String" required="false"%>
+<button class="nav-btn nav-btn-add" data-toggle="tooltip" data-placement="left" onclick="officeAdd()" title="添加"><i class="fa fa-plus"></i> ${label==null?'添加':label}</button>
+<%-- 使用方法: 1.将本tag写在查询的form之前;2.传入table的id和controller的url --%>
+<script type="text/javascript">
+	function officeAdd(){
+		openDialog('${title}'+"登记",encodeURI("${url}"),"${width==null?'95%':width}", "${height==null?'95%':height}","${target}");
+	}
+</script>

+ 1 - 0
src/main/webapp/webpage/modules/oa/oaNotifyForm.jsp

@@ -149,6 +149,7 @@
     <div class="container">
         <form:form id="inputForm" modelAttribute="oaNotify" enctype="multipart/form-data" action="${ctx}/oa/oaNotify/save" method="post" class="form-horizontal">
             <form:hidden path="id"/>
+            <form:hidden path="flagOffice"/>
             <sys:message content="${message}"/>
 
             <div class="form-group layui-row first">

+ 4 - 1
src/main/webapp/webpage/modules/oa/oaNotifyList.jsp

@@ -405,7 +405,10 @@
 			<div class="contentShadow layui-form contentDetails">
 				<div class="nav-btns">
 					<shiro:hasPermission name="oa:oaNotify:add">
-						<table:addRow url="${ctx}/oa/oaNotify/form" title="通知" height="95%;" width="95%;"></table:addRow><!-- 增加按钮 -->
+						<table:addRow label="新增" url="${ctx}/oa/oaNotify/form?flagOffice=0" title="通知" height="95%;" width="95%;"></table:addRow><!-- 增加按钮 -->
+					</shiro:hasPermission>
+					<shiro:hasPermission name="oa:oaNotify:officeAdd">
+						<table:officeAddRow label="办公室新增" url="${ctx}/oa/oaNotify/form?flagOffice=1" title="通知" height="95%;" width="95%;"></table:officeAddRow><!-- 增加按钮 -->
 					</shiro:hasPermission>
 					<shiro:hasPermission name="oa:oaNotify:import">
 						<table:importExcel url="${ctx}/oa/oaNotify/import"></table:importExcel><!-- 导入按钮 -->