yue 5 éve
szülő
commit
d1154ee006

+ 2 - 2
src/main/java/com/jeeplus/common/config/Global.java

@@ -109,7 +109,7 @@ public class Global {
 	 */
 	public static String getAttachmentDir(){
 		SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
-		String dir = Global.getUserfilesBaseDir() + Global.USERFILES_BASE_URL + principal + "/程序附件/";
+		String dir = Global.getUserfilesBaseDir() + Global.USERFILES_BASE_URL + principal ;
 		FileUtils.createDirectory(dir);
 		return dir;
 	}
@@ -121,7 +121,7 @@ public class Global {
 	public static String getAttachmentUrl(){
 
 		SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
-		return  Servlets.getRequest().getContextPath() + Global.USERFILES_BASE_URL + principal + "/程序附件/";
+		return  Servlets.getRequest().getContextPath() + Global.USERFILES_BASE_URL + principal ;
 	}
 
 	/**

+ 40 - 14
src/main/java/com/jeeplus/modules/act/service/ActProcessService.java

@@ -23,6 +23,9 @@ import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.core.persistence.ActEntity;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.utils.ProcessDefCache;
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.PersonnelManagement;
+import com.jeeplus.modules.sg.managementcenter.activiti.service.PersonnelManagementService;
+import com.jeeplus.modules.sys.utils.UserUtils;
 import org.activiti.bpmn.converter.BpmnXMLConverter;
 import org.activiti.bpmn.model.BpmnModel;
 import org.activiti.editor.constants.ModelDataJsonConstants;
@@ -67,6 +70,8 @@ public class ActProcessService extends BaseService {
 	private HistoryService historyService;
 	@Autowired
 	private ActTaskService actTaskService;
+	@Autowired
+	private PersonnelManagementService personnelManagementService;
 
 	/**
 	 * 流程定义列表
@@ -88,22 +93,43 @@ public class ActProcessService extends BaseService {
 		}else {
 			processDefinitionList = processDefinitionQuery.listPage(page.getFirstResult(), page.getMaxResults());
 		}
-	    for (ProcessDefinition processDefinition : processDefinitionList) {
+
+		String id = UserUtils.getUser().getId();
+		PersonnelManagement personnelManagement = new PersonnelManagement();
+		personnelManagement = personnelManagementService.get(id);
+		String[] strarr = null;
+		if (personnelManagement != null) {
+			String pid = personnelManagement.getPid();
+			strarr = pid.split(";");
+		}
+
+
+		for (ProcessDefinition processDefinition : processDefinitionList) {
 	      String deploymentId = processDefinition.getDeploymentId();
 	      Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
-	      Map pMap = new HashMap<>();
-	      pMap.put("id", processDefinition.getId());
-	      pMap.put("category", processDefinition.getCategory());
-	      pMap.put("key", processDefinition.getKey());
-	      pMap.put("name", processDefinition.getName());
-	      pMap.put("version","V:"+processDefinition.getVersion());
-	      pMap.put("resourceName", processDefinition.getResourceName());
-	      pMap.put("description", processDefinition.getDescription());
-	      pMap.put("diagramResourceName", processDefinition.getDiagramResourceName());
-	      pMap.put("deploymentId", processDefinition.getDeploymentId());
-	      pMap.put("suspended", processDefinition.isSuspended());
-			pMap.put("deploymentTime",deployment.getDeploymentTime());
-	      page.getList().add(pMap);
+			Map pMap = new HashMap<>();
+			String id1 = processDefinition.getId();
+			if (strarr != null) {
+				for (String str : strarr) {
+					if (str.equals(id1)) {
+						pMap.put("id", processDefinition.getId());
+						pMap.put("category", processDefinition.getCategory());
+						pMap.put("key", processDefinition.getKey());
+						pMap.put("name", processDefinition.getName());
+						pMap.put("version","V:"+processDefinition.getVersion());
+						pMap.put("resourceName", processDefinition.getResourceName());
+						pMap.put("description", processDefinition.getDescription());
+						pMap.put("diagramResourceName", processDefinition.getDiagramResourceName());
+						pMap.put("deploymentId", processDefinition.getDeploymentId());
+						pMap.put("suspended", processDefinition.isSuspended());
+						pMap.put("deploymentTime",deployment.getDeploymentTime());
+						page.getList().add(pMap);
+						continue;
+					} else {
+						continue;
+					}
+				}
+			}
 	    }
 
 		return page;

+ 24 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/entity/PersonnelManagement.java

@@ -0,0 +1,24 @@
+package com.jeeplus.modules.sg.managementcenter.activiti.entity;
+
+import com.jeeplus.core.persistence.ActEntity;
+
+public class PersonnelManagement extends ActEntity<PersonnelManagement> {
+    private String uId;
+    private String Pid;
+
+    public String getuId() {
+        return uId;
+    }
+
+    public void setuId(String uId) {
+        this.uId = uId;
+    }
+
+    public String getPid() {
+        return Pid;
+    }
+
+    public void setPid(String pid) {
+        Pid = pid;
+    }
+}

+ 20 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/mapper/PersonnelManagementMapper.java

@@ -0,0 +1,20 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.managementcenter.activiti.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.Disclose;
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.PersonnelManagement;
+
+/**
+ * 施工交底MAPPER接口
+ * @author
+ * @version 2019-11-08
+ */
+
+@MyBatisMapper
+public interface PersonnelManagementMapper extends BaseMapper<PersonnelManagement> {
+
+}

+ 105 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/mapper/xml/PersonnelManagementMapper.xml

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.sg.managementcenter.activiti.mapper.PersonnelManagementMapper">
+    
+	<sql id="constructionColumns">
+		a.id AS "id",
+		a.uId AS "uid",
+		a.Pid AS "pid",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+
+	</sql>
+
+	<select id="get" resultType="com.jeeplus.modules.sg.managementcenter.activiti.entity.PersonnelManagement" >
+		SELECT *
+		FROM xm_personnel_management a
+		WHERE a.uId = #{uId}
+	</select>
+	
+	<select id="findList" resultType="PersonnelManagement" >
+		SELECT *
+		FROM xm_personnel_management a
+		<where>
+			<if test="dataScope != null and dataScope != ''">
+				${dataScope}
+			</if>
+			<if test="uId != null and uId != ''">
+				AND a.uId = #{uId}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="PersonnelManagement" >
+		SELECT *
+		FROM xm_personnel_management a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert">
+		INSERT INTO xm_personnel_management(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE xm_personnel_management SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks}
+		WHERE id = #{id}
+	</update>
+
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM xm_personnel_management
+		WHERE id = #{id}
+	</update>
+	
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE xm_personnel_management SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+	
+
+	
+</mapper>

+ 49 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/service/PersonnelManagementService.java

@@ -0,0 +1,49 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.sg.managementcenter.activiti.service;
+
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.Disclose;
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.PersonnelManagement;
+import com.jeeplus.modules.sg.managementcenter.activiti.mapper.DiscloseMapper;
+import com.jeeplus.modules.sg.managementcenter.activiti.mapper.PersonnelManagementMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 施工交底Service
+ * @author
+ * @version 2019-11-08
+ */
+@Service
+@Transactional(readOnly = true)
+public class PersonnelManagementService extends CrudService<PersonnelManagementMapper,PersonnelManagement> {
+
+	@Autowired
+	private PersonnelManagementMapper personnelManagementMapper;
+
+	@Override
+	public PersonnelManagement get(String id) {
+		return super.get(id);
+	}
+
+	@Override
+	public List<PersonnelManagement> findList(PersonnelManagement entity) {
+		return super.findList(entity);
+	}
+
+	@Override
+	public void save(PersonnelManagement entity) {
+		super.save(entity);
+	}
+
+	@Override
+	public void delete(PersonnelManagement entity) {
+		super.delete(entity);
+	}
+}

+ 11 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/web/DivideController.java

@@ -53,7 +53,18 @@ public class DivideController extends BaseController {
 		return entity;
 	}
 
+	@RequestMapping(value = "upload")
+	public String formUp(Construction construction, Model model) {
+		model.addAttribute("construction", construction);
+		return "modules/sg/managementcenter/activiti/upload";
+	}
 
+	@ResponseBody
+	@RequestMapping(value = "uploadSave")
+	public String uploadSave(Construction construction, Model model,String pic) {
+		model.addAttribute("construction", construction);
+		return "modules/sg/managementcenter/activiti/upload";
+	}
 	
 
 	/**

+ 1 - 1
src/main/webapp/webpage/modules/bpm/task/todo/taskTodoList.jsp

@@ -15,7 +15,7 @@
 	<div class="panel-heading">
 		<h3 class="panel-title">待办任务列表</h3>
 	</div>
-	<div class="panel-body">q
+	<div class="panel-body">
 	
 	<!-- 搜索 -->
 	<div id="search-collapse" class="collapse">

+ 1 - 0
src/main/webapp/webpage/modules/sg/managementcenter/activiti/constructionAudit.jsp

@@ -227,6 +227,7 @@
 								<td class="width-35">
 									<sys:userselect id="tuser" name="tuser.id" value="${construction.tuser.id}" labelName="tuser.name" labelValue="${construction.tuser.name}"
 													cssClass="form-control required"/>
+<%--									<sys:fileUpload path="pic" fileNumLimit="2" fileSizeLimit="50" value="${testPic.pic}" type="image" uploadPath="/test/pic/testPic"></sys:fileUpload>--%>
 								</td>
 							</tr>
 							<tr>

+ 83 - 0
src/main/webapp/webpage/modules/sg/managementcenter/activiti/layUpload.jsp

@@ -0,0 +1,83 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<link rel="stylesheet" href="${ctxp}/static/plugin/assets/layui/css/layui.css">
+<link rel="stylesheet" href="${ctxp}/static/plugin/assets/common.css"/>
+<link rel="stylesheet" href="${ctxp}/static/plugin/assets/vermeit.css">
+<script type="text/javascript" src="${ctxp}/static/plugin/assets/jquery-3.2.1.min.js"></script>
+<script src="${ctxp}/static/plugin/assets/layui/layui.js"></script>
+<%@ include file="addItem2Form.js"%>
+<html>
+<head>
+    <title>添加工程</title>
+    <meta http-equiv=Content-Type content=“text/html;charset=utf-8″>
+    <meta http-equiv=X-UA-Compatible content=IE=EmulateIE7>
+    <meta name="renderer" content="webkit">
+    <style>
+        .layui-input{ height: 28px;margin-top: 6px;line-height: 28px}
+        .layui-table-view .layui-table {width:100%}
+        .myselect{border: none;padding: 5px 7px;min-height: 20px;color: #666666;line-height: 20px}
+        .mydiv{padding: 5px 7px;min-height: 20px;border: whitesmoke;line-height: 20px}
+        .mydiv:empty:before{content: attr(placeholder);color:#999999;}
+        .mydiv:focus:before{content:none}
+        .layui-table-tips-main{display:none}
+        .layui-table-tips-c{display:none}
+    </style>
+</head>
+<body style="height: 100%;line-height: 100%">
+<div style="padding: 10px; background-color: #F2F2F2;">
+    <div class="layui-main-bgc">
+        <%--<sys:message content="${message}"/>--%>
+        <div class="layui-row layui-col-space15">
+            <div class="layui-col-md12">
+                <div class="layui-card">
+                    <div class="layui-card-header layui-card-header-add">单体工程管理</div>
+                        <div class="layui-card-body" style="margin-top: 2px;">
+                            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
+                                <legend style="font-size: 15px;">添加单体工程</legend>
+                            </fieldset>
+                            <div class="layui-form-item">
+                                <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 100px;">*单体工程名称</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="myinput" autocomplete="off" placeholder="" class="layui-input">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 100px">*单体工程编号</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="dt_number" value="" autocomplete="off" placeholder="" class="layui-input">
+                                    </div>
+                                </div>
+                            </div>
+                            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
+                                <legend style="font-size: 15px;">添加结算书</legend>
+                            </fieldset>
+                            <div class="layui-upload">
+                                <button type="button" class="layui-btn layui-btn-normal" id="add_List">添加结算书</button>
+                                <div class="layui-upload-list">
+                                        <table class="layui-table" id="mytable">
+                                        <thead>
+                                        <tr>
+                                            <th width="45%">*结算书名称</th>
+                                            <%--<th width="17%">*项目类型</th>--%>
+                                            <%--<th width="25%">*结算书编号</th>--%>
+                                            <th width="33%">*供应商</th>
+                                            <th width="22%" style="text-align: center">操作</th>
+                                        </tr></thead>
+                                        <tbody id="tbody_List">
+
+                                        </tbody>
+                                    </table>
+                                </div>
+                             <div style="margin-top: 20px">
+                                <button id="mybtn" type="button" class="layui-btn" style="width: 70px;" onclick="okSubmit()">确定</button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+             </div>
+        </div>
+    </div>
+</div>
+</body>
+</html>

+ 126 - 0
src/main/webapp/webpage/modules/sg/managementcenter/activiti/upload.jsp

@@ -0,0 +1,126 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>施工交底管理</title>
+	<meta name="decorator" content="ani"/>
+	<!-- SUMMERNOTE -->
+	<%@include file="/webpage/include/summernote.jsp" %>
+	<script type="text/javascript">
+
+		$(document).ready(function() {
+			jp.ajaxForm("#inputForm",function(data){
+				if(data.success){
+					jp.success(data.msg);
+					jp.go("${ctx}"+ data.body.targetUrl);
+				}else{
+					jp.error(data.msg);
+					$("#inputForm").find("button:submit").button("reset");
+				}
+			});
+
+			$("#agree").click(function () {
+				var tuser = $("#tuserName").val();
+				console.log(tuser);
+				if (tuser=="") {
+					jp.error("请选择用户");
+					return;
+				}
+			})
+
+			$('#acceptDate').datetimepicker({
+				format: "YYYY-MM-DD HH:mm:ss"
+			});
+			$('#examineDate').datetimepicker({
+				format: "YYYY-MM-DD HH:mm:ss"
+			});
+			//富文本初始化
+			$('#reason').summernote({
+				height: 300,
+				lang: 'zh-CN',
+				callbacks: {
+					onChange: function(contents, $editable) {
+						$("input[name='reason']").val($('#reason').summernote('code'));//取富文本的值
+					}
+				}
+			});
+
+			$("#${id}Button, #${id}Name").click(function(){
+				// 是否限制选择,如果限制,设置为disabled
+				if ($("#${id}Button").hasClass("disabled")){
+					return true;
+				}
+			});
+
+			$("#${id}DelButton").click(function(){
+				// 是否限制选择,如果限制,设置为disabled
+				if ($("#${id}Button").hasClass("disabled")){
+					return true;
+				}
+				// 清除
+				$("#${id}Id").val("");
+				$("#${id}Name").val("");
+				$("#${id}Name").focus();
+
+			});
+		});
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<div class="row">
+		<div class="col-md-12">
+			<div class="panel panel-primary">
+				<div class="panel-heading">
+					<h3 class="panel-title">
+						<a class="panelButton"  href="#"  onclick="history.go(-1)"><i class="ti-angle-left"></i> 返回</a>
+					</h3>
+				</div>
+				<div class="panel-body">
+					<form:form id="inputForm" modelAttribute="construction" action="${ctx}/managementcenter/divide/uploadSave" method="post" class="form-horizontal">
+						<form:hidden path="id"/>
+						<form:hidden path="act.taskId"/>
+						<form:hidden path="act.taskName"/>
+						<form:hidden path="act.taskDefKey"/>
+						<form:hidden path="act.procInsId"/>
+						<form:hidden path="act.procDefId"/>
+						<form:hidden id="flag" path="act.flag" />
+						<div class="form-group text-center">
+							<h3> 施工交底申请</h3>
+						</div>
+						<table class="table table-bordered">
+							<tbody>
+							<tr>
+								<td class="width-15 active"><label class="pull-right"><font color="red">*</font>申请人:</label></td>
+								<td class="width-35">
+									<input type='text'  name="userName" class="form-control required"  value="${construction.userName}"/>
+								</td>
+								<td class="width-15 active"><label class="pull-right"><font color="red">*</font>文件上传:</label></td>
+								<td class="width-35">
+									<sys:fileUpload  path="pic" fileNumLimit="50" fileSizeLimit="50" value="${testPic.pic}" type="file" uploadPath="${cxt}/freemarker"></sys:fileUpload>
+								</td>
+							</tr>
+							</tbody>
+						</table>
+						<div class="form-group">
+							<div class="col-lg-3"></div>
+								<div class="col-lg-6">
+									<div class="form-group text-center">
+										<div>
+											<button class="btn btn-primary btn-block btn-lg btn-parsley" data-loading-text="正在提交...">提 交</button>
+										</div>
+									</div>
+								</div>
+						</div>
+					</form:form>
+					<c:if test="${not empty construction.id}">
+						<act:flowChart procInsId="${construction.act.procInsId}"/>
+						<act:histoicFlow procInsId="${construction.act.procInsId}" />
+					</c:if>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+</body>
+</html>