4 Commitit f3f5c8d8fc ... 30d0bad10c

Tekijä SHA1 Viesti Päivämäärä
  user4 30d0bad10c 员工&档案の照片的上传和修改 5 vuotta sitten
  user4 5029a80124 Merge remote-tracking branch 'origin/master' 5 vuotta sitten
  user4 0b6e8f5ee2 合同&项目の界面微调 5 vuotta sitten
  user4 ec14443b79 上传到bos 5 vuotta sitten

+ 8 - 3
src/main/java/com/jeeplus/modules/API/userinfo/MyInfoController.java

@@ -1,5 +1,6 @@
 package com.jeeplus.modules.API.userinfo;
 
+import com.jeeplus.common.bos.BOSClientUtil;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.common.oss.OSSClientUtil;
@@ -163,11 +164,15 @@ public class MyInfoController extends BaseController{
 						inputStream = httpURLConnection.getInputStream();
 
 					}
-					OSSClientUtil ossUtil =new OSSClientUtil();
+					/*OSSClientUtil ossUtil =new OSSClientUtil();
 					String[] arr = temp.split("/");
 					String photoName = System.currentTimeMillis()+arr[arr.length-1];
-					ossUtil.uploadFile2OSS(inputStream, Global.getPhoto(), photoName);
-					user.setPhoto(Global.getAliyunUrl()+"/"+ Global.getPhoto() + photoName);
+					ossUtil.uploadFile2OSS(inputStream, Global.getPhoto(), photoName);*/
+					String path = new StringBuilder("/qrcode/")
+							.append(name+System.currentTimeMillis()).append(".png").toString();
+					BOSClientUtil bosClientUtil = new BOSClientUtil();
+					String uploadPath = bosClientUtil.upload(path, inputStream);
+					user.setPhoto(uploadPath);
 					FileUtils.delFile(Global.getUserfilesBaseDir() + Global.USERFILES_BASE_URL  +time);
 				} catch (MalformedURLException e) {
 					e.printStackTrace();

+ 6 - 5
src/main/java/com/jeeplus/modules/sys/service/SystemService.java

@@ -5,6 +5,7 @@ package com.jeeplus.modules.sys.service;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
+import com.jeeplus.common.bos.BOSClientUtil;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.common.oss.OSSClientUtil;
@@ -430,11 +431,11 @@ public class SystemService extends BaseService implements InitializingBean {
                         inputStream = httpURLConnection.getInputStream();
 
                     }
-                    OSSClientUtil ossUtil = new OSSClientUtil();
-                    String[] arr = user.getQrCode().split("/");
-                    String qrCodeName = System.currentTimeMillis() + arr[arr.length - 1];
-                    ossUtil.uploadFile2OSS(inputStream, Global.getRqcode(), qrCodeName);
-                    user.setQrCode(Global.getAliyunUrl() + "/" + Global.getRqcode() + qrCodeName);
+                    String path = new StringBuilder("/qrcode/")
+                            .append(user.getName()+System.currentTimeMillis()).append(".png").toString();
+                    BOSClientUtil bosClientUtil = new BOSClientUtil();
+                    String uploadPath = bosClientUtil.upload(path, inputStream);
+                    user.setQrCode(uploadPath);
                 } catch (MalformedURLException e) {
                     e.printStackTrace();
                 } catch (IOException e) {

+ 6 - 7
src/main/java/com/jeeplus/modules/sys/service/UserService.java

@@ -3,6 +3,7 @@ package com.jeeplus.modules.sys.service;
 
 import com.easemob.server.example.api.impl.EasemobIMUsers;
 import com.google.common.base.Strings;
+import com.jeeplus.common.bos.BOSClientUtil;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.oss.OSSClientUtil;
 import com.jeeplus.common.utils.DateUtils;
@@ -208,14 +209,12 @@ public class UserService extends BaseController {
                             inputStream = httpURLConnection.getInputStream();
 
                         }
-                        OSSClientUtil ossUtil =new OSSClientUtil();
-                        String[] arr = temp.split("/");
-                        String photoName = System.currentTimeMillis()+arr[arr.length-1];
-                        ossUtil.uploadFile2OSS(inputStream, Global.getPhoto(), photoName);
-                        user.setPhoto(Global.getAliyunUrl()+"/"+ Global.getPhoto() + photoName);
+                        String path = new StringBuilder("/headImg/")
+                                .append(userName+System.currentTimeMillis()).toString();
+                        BOSClientUtil bosClientUtil = new BOSClientUtil();
+                        String uploadPath = bosClientUtil.upload(path, inputStream);
+                        user.setPhoto(uploadPath);
                         FileUtils.delFile(Global.getUserfilesBaseDir() + Global.USERFILES_BASE_URL  +time);
-                    } catch (MalformedURLException e) {
-                        e.printStackTrace();
                     } catch (IOException e) {
                         e.printStackTrace();
                     } finally {

+ 6 - 6
src/main/java/com/jeeplus/modules/sys/web/UserController.java

@@ -562,11 +562,11 @@ public class UserController extends BaseController {
                             inputStream = httpURLConnection.getInputStream();
 
                         }
-                        OSSClientUtil ossUtil =new OSSClientUtil();
-                        String[] arr = temp.split("/");
-                        String photoName = System.currentTimeMillis()+arr[arr.length-1];
-                        ossUtil.uploadFile2OSS(inputStream, Global.getPhoto(), photoName);
-                        currentUser.setPhoto(Global.getAliyunUrl()+"/"+ Global.getPhoto() + photoName);
+                        String path = new StringBuilder("/headImg/")
+                                .append(currentUser.getName()+System.currentTimeMillis()).append(".png").toString();
+                        BOSClientUtil bosClientUtil = new BOSClientUtil();
+                        String uploadPath = bosClientUtil.upload(path, inputStream);
+                        currentUser.setPhoto(uploadPath);
                         FileUtils.delFile(Global.getUserfilesBaseDir() + Global.USERFILES_BASE_URL  +time);
                     } catch (MalformedURLException e) {
                         e.printStackTrace();
@@ -768,7 +768,7 @@ public class UserController extends BaseController {
         User currentUser = UserUtils.getUser();
         if(file != null && file.getSize()>0){
             String path = new StringBuilder("/headImg/")
-                    .append(currentUser.getName()).append(".png").toString();
+                    .append(currentUser.getName()+System.currentTimeMillis()).append(".png").toString();
             InputStream inputStream = file.getInputStream();
             BOSClientUtil bosClientUtil = new BOSClientUtil();
             String url = bosClientUtil.upload(path, inputStream);

+ 0 - 4
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java

@@ -195,7 +195,6 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         workStaffBasicInfo.setAchiveId(workStaffBasicInfo.getId());
         workStaffBasicInfo.setId(baseId);
 		super.save(workStaffBasicInfo);
-//        this.saveDetails(workStaffBasicInfo,false);
 	    //同步修改sys_user表中的name
         if(roleService.getRoleIdByUserId(workStaffBasicInfo.getUserId())!=null){
             //更新信息
@@ -213,9 +212,6 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         }else{
             userService.insertRole(workStaffBasicInfo);
         }
-        //需要逻辑删除数据库中档案表id关联的教育经历等信息
-//        workStaffBasicInfo.setId(workStaffBasicInfo.getAchiveId());
-//        this.deleteDetailById(workStaffBasicInfo);
 	}
 
     /**

+ 12 - 2
src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoController.java

@@ -227,9 +227,9 @@ public class WorkStaffBasicInfoController extends BaseController {
 		MultipartFile pictureFile = workStaffBasicInfo.getPictureFile();
 		if(pictureFile != null && pictureFile.getSize()>0){
 			String path = new StringBuilder("/employeeImg/")
-			.append(workStaffBasicInfo.getName()).append(".png").toString();
+			.append(workStaffBasicInfo.getName()+System.currentTimeMillis()).append(".png").toString();
 			InputStream inputStream = pictureFile.getInputStream();
-			BOSClientUtil bosClientUtil = new BOSClientUtil();
+            BOSClientUtil bosClientUtil = new BOSClientUtil();
 			String url = bosClientUtil.upload(path, inputStream);
             workStaffBasicInfo.setPicture(url);
 		}
@@ -552,6 +552,16 @@ public class WorkStaffBasicInfoController extends BaseController {
 		if (!beanValidator(model, workStaffBasicInfo)){
 			return form(workStaffBasicInfo, model,false);
 		}
+        MultipartFile pictureFile = workStaffBasicInfo.getPictureFile();
+        if(pictureFile != null && pictureFile.getSize()>0){
+            String path = new StringBuilder("/employeeImg/")
+                    .append(workStaffBasicInfo.getName()+System.currentTimeMillis()).append(".png").toString();
+            InputStream inputStream = pictureFile.getInputStream();
+            BOSClientUtil bosClientUtil = new BOSClientUtil();
+            String url = bosClientUtil.upload(path, inputStream);
+            workStaffBasicInfo.setPicture(url);
+        }
+
 		String achieveId = workStaffBasicInfo.getId();
 		WorkStaffBasicInfo t = workStaffBasicInfoService.getBasicInfoByAchiveId(workStaffBasicInfo.getId());//从数据库取出记录的值
 		String staffId = t.getId();

+ 33 - 25
src/main/webapp/webpage/modules/projectrecord/projectRecordsAudit.jsp

@@ -44,6 +44,16 @@
 					}
 				}
 			});
+
+			var contractNum = $("#contractNum").val();
+			if (contractNum == null || contractNum === "") {
+				$("#div1").hide();
+				$("#div3").hide();
+				setTimeout(function () {
+					var tt = $("#workClientLinkmanList").find("tr").eq(0).find("td").eq(1).text().trim();
+					$("#clientName").val(tt);
+				},100);
+			}
 		});
 
         function insertTitle(tValue){
@@ -105,44 +115,42 @@
 
 			<div class="form-group layui-row first">
 				<div class="form-group-label"><h2>项目合同信息</h2></div>
-				<div class="layui-item layui-col-sm12 lw6">
-					<label class="layui-form-label">合同编号:</label>
-					<div class="layui-input-block">
-						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.contractNum}"/>
+				<div id="div1">
+					<div class="layui-item layui-col-sm12 lw6">
+						<label class="layui-form-label">合同编号:</label>
+						<div class="layui-input-block">
+							<input htmlEscape="false" id="contractNum"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.contractNum}"/>
+						</div>
 					</div>
-				</div>
-				<div class="layui-item layui-col-sm6 lw6">
-					<label class="layui-form-label">合同名称:</label>
-					<div class="layui-input-block">
-						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.name}"/>
+					<div class="layui-item layui-col-sm6 lw6">
+						<label class="layui-form-label">合同名称:</label>
+						<div class="layui-input-block">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.name}"/>
+						</div>
 					</div>
-				</div>
-				<div class="layui-item layui-col-sm6 lw6">
-					<label class="layui-form-label double-line">合同金额(元):</label>
-					<div class="layui-input-block">
-						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${projectRecords.workContractInfo.contractPrice}" pattern="#,##0.00#"/>"/>
+					<div class="layui-item layui-col-sm6 lw6">
+						<label class="layui-form-label double-line">合同金额(元):</label>
+						<div class="layui-input-block">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${projectRecords.workContractInfo.contractPrice}" pattern="#,##0.00#"/>"/>
+						</div>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6 lw6">
 					<label class="layui-form-label">主委托方:</label>
 					<div class="layui-input-block">
-						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.client.name}"/>
+						<input htmlEscape="false" id="clientName" readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.client.name}"/>
 					</div>
 				</div>
-				<div class="layui-item layui-col-sm6 lw6">
-					<label class="layui-form-label">工程分类:</label>
-					<div class="layui-input-block">
-						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.constructionProjectTypeStr}"/>
+				<div id="div3">
+					<div class="layui-item layui-col-sm6 lw6">
+						<label class="layui-form-label">工程分类:</label>
+						<div class="layui-input-block">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.constructionProjectTypeStr}"/>
+						</div>
 					</div>
 				</div>
 			</div>
 
-            <div class="tabs-container">
-                <ul class="nav nav-tabs">
-                    <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true" style="margin-top: 25px">项目合同信息</a>
-                    </li>
-                </ul>
-            </div>
 
 			<div class="form-group layui-row first">
 				<div class="form-group-label"><h2>项目基础信息</h2></div>

+ 0 - 26
src/main/webapp/webpage/modules/projectrecord/projectRecordsForm.jsp

@@ -531,32 +531,6 @@
                         </tr>
                         </thead>
                         <tbody id="workClientLinkmanList">
-<%--                        <c:if test="${not empty projectRecords.workClientLinkmanList}">--%>
-<%--                            <c:forEach items="${projectRecords.workClientLinkmanList}" var="casePeopleNorm" varStatus="index">--%>
-<%--                                <tr id="workClientInfoList${index.index}">--%>
-<%--                                    <td class="hide">--%>
-<%--                                        <input id="workClientLinkmanList${index.index}_id" name="workClientLinkmanList[${index.index}].id" type="hidden" value="${casePeopleNorm.id}" class="clientInfoId"/>--%>
-<%--                                        <input id="workClientLinkmanList${index.index}_clientId_id" name="workClientLinkmanList[${index.index}].clientId.id" type="hidden" value="${casePeopleNorm.clientId.id}" class="clientInfoId"/>--%>
-<%--                                        <input id="workClientLinkmanList${index.index}_delFlag" name="workClientLinkmanList[${index.index}].delFlag" type="hidden" value="0"/>--%>
-<%--                                    </td>--%>
-<%--                                    <td>--%>
-<%--                                        <input id="workClientLinkmanList${index.index}_clientName" name="workClientLinkmanList[${index.index}].clientId.name" type="text" value="${casePeopleNorm.clientId.name}" readonly="true"   class="form-control "/>--%>
-<%--                                    </td>--%>
-<%--                                    <td>--%>
-<%--                                        <input id="workClientLinkmanList${index.index}_name" name="workClientLinkmanList[${index.index}].name" type="text" value="${casePeopleNorm.name}" readonly="true"   class="form-control "/>--%>
-<%--                                    </td>--%>
-<%--                                    <td>--%>
-<%--                                        <input id="workClientLinkmanList${index.index}_linkPhone" name="workClientLinkmanList[${index.index}].linkPhone" type="text" value="${casePeopleNorm.linkPhone}" readonly="true"   class="form-control "/>--%>
-<%--                                    </td>--%>
-<%--                                    <td>--%>
-<%--                                        <input id="workClientLinkmanList${index.index}_linkMobile" name="workClientLinkmanList[${index.index}].linkMobile" type="text" value="${casePeopleNorm.linkMobile}" readonly="true"   class="form-control "/>--%>
-<%--                                    </td>--%>
-<%--                                    <td class="text-center op-td">--%>
-<%--                                        <span class="op-btn op-btn-delete" onclick="delRow(this, '#workClientLinkmanList${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>--%>
-<%--                                    </td>--%>
-<%--                                </tr>--%>
-<%--                            </c:forEach>--%>
-<%--                        </c:if>--%>
                         </tbody>
                     </table>
                     <script type="text/template" id="workClientLinkmanTpl">//<!--

+ 6 - 1
src/main/webapp/webpage/modules/projectrecord/projectRecordsView.jsp

@@ -6,9 +6,14 @@
 	<meta name="decorator" content="default"/>
 	<script>
 		$(document).ready(function () {
-			if ($("#contractNum").val() == null || $("#contractNum").val() == "") {
+			var tt = $("#contractNum").val();
+			if (tt == null || tt === "") {
 				$("#divv").hide();
 				$("#divv3").hide();
+				setTimeout(function () {
+					var tt = $("#workClientLinkmanList").find("tr").eq(0).find("td").eq(1).text().trim();
+					$("#clientName").val(tt);
+				},100);
 			}
 
 		})

+ 0 - 8
src/main/webapp/webpage/modules/workcontractinfo/contractInvalidateAudit.jsp

@@ -56,14 +56,6 @@
 				<c:set var="status" value="${workContractInfo.act.status}" />
 
 				<div class="tabs-container">
-					<ul class="nav nav-tabs">
-						<div class="layui-tab" id="tabDiv">
-							<ul class="layui-tab-title" >
-								<li class="active"><a data-toggle="tab" href="#tab-11"  aria-expanded="true">合同信息</a></li>
-								<li ><a data-toggle="tab" href="#tab-22"  aria-expanded="false">合同评审信息</a></li>
-							</ul>
-						</div>
-					</ul>
 					<div class="tab-content">
 						<div id="tab-11" class="tab-pane active">
 							<div class="form-group layui-row first lw9">

+ 3 - 3
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoForm.jsp

@@ -122,12 +122,12 @@
 					<td class="width-35">
 						<form:select path="contractType" class="form-control ">
 							<form:option value="0" label="请选择"/>
-							<form:option value="1" label="工程咨询"/>
+							<%--<form:option value="1" label="工程咨询"/>
 							<form:option value="2" label="工程审核"/>
 							<form:option value="3" label="招标代理"/>
 							<form:option value="4" label="跟踪审计"/>
-							<form:option value="5" label="其他"/>
-<%--<form:options items="${fns:getDictList('contract_category')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+							<form:option value="5" label="其他"/>--%>
+<form:options items="${fns:getDictList('contract_info_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
 						</form:select>
 					</td>
 				</tr>

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

@@ -94,7 +94,7 @@
             var this_upload_div_1 =
                 '<div id="this_upload_div_'+ index + '" style="position:relative;">'+
                 '<img  id="this_upload_image_' + index + '" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png"  onclick="this_upload_image_button('+index+')"/>'+
-                '<input id="this_upload_file_'+ index + '" type="file" style="display:none"  name="this_upload_files"  onchange="this_upload_show_image('+index+ ')" /><br>'+
+                '<input id="this_upload_file_'+ index + '" type="file" style="display:none"  name="pictureFile"  onchange="this_upload_show_image('+index+ ')" /><br>'+
                 '</div>';
             $("#this_upload_image_div_"+ index).html("").append(this_upload_div_1);
         }

+ 2 - 2
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModifyDirectly.jsp

@@ -107,8 +107,8 @@
         function this_add_div(index) {
             var this_upload_div_1 =
                 '<div id="this_upload_div_'+ index + '" style="position:relative;">'+
-                '<img  id="this_upload_image_' + index + '" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png"  onclick="this_upload_image_button('+index+')"/>'+
-                '<input id="this_upload_file_'+ index + '" type="file" style="display:none"  name="this_upload_files"  onchange="this_upload_show_image('+index+ ')" /><br>'+
+                     '<img  id="this_upload_image_' + index + '" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png"  onclick="this_upload_image_button('+index+')"/>'+
+                     '<input id="this_upload_file_'+ index + '" type="file" style="display:none"  name="pictureFile"  onchange="this_upload_show_image('+index+ ')" /><br>'+
                 '</div>';
             $("#this_upload_image_div_"+ index).html("").append(this_upload_div_1);
         }

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

@@ -201,7 +201,7 @@
             var this_upload_div_1 =
                 '<div id="this_upload_div_'+ index + '" style="position:relative;">'+
                 '<img  id="this_upload_image_' + index + '" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png"  onclick="this_upload_image_button('+index+')"/>'+
-                '<input id="this_upload_file_'+ index + '" type="file" style="display:none"  name="this_upload_files"  onchange="this_upload_show_image('+index+ ')" /><br>'+
+                '<input id="this_upload_file_'+ index + '" type="file" style="display:none"  name="pictureFile"  onchange="this_upload_show_image('+index+ ')" /><br>'+
                 '</div>';
             $("#this_upload_image_div_"+ index).html("").append(this_upload_div_1);
         }