Forráskód Böngészése

职业资格导入功能

user5 4 éve
szülő
commit
328feee1fe

+ 6 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffCertificateService.java

@@ -141,6 +141,12 @@ public class WorkStaffCertificateService extends CrudService<WorkStaffCertificat
                 }else if(1 == userList.size()){
                     entity.setStaffId(userList.get(0).getAchiveId());
                     //根据 职业资格名称查询字典表并比对当前人员是否已添加该职业资格信息
+                    List<MainDictDetail> certificateType = DictUtils.getMainDictList("certificate_type");
+                    for (MainDictDetail type : certificateType) {
+                        if(entity.getName().equals(type.getLabel())){
+                            entity.setName(type.getValue());
+                        }
+                    }
                     List<WorkStaffCertificate> certificateList = dao.getByUserId(userList.get(0).getAchiveId());
                     for (WorkStaffCertificate certificate : certificateList) {
                         if(entity.getName().equals(certificate.getName())){

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

@@ -16,6 +16,7 @@ import com.jeeplus.common.utils.ThisLocalityDownloadUtil;
 import com.jeeplus.common.utils.excel.ExportExcel;
 import com.jeeplus.common.utils.excel.ImportExcel;
 import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
 import com.jeeplus.modules.sys.entity.Role;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.service.RoleService;
@@ -30,6 +31,7 @@ import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workreceiptsregister.entity.ResponseEntity;
 import com.jeeplus.modules.workrelationship.entity.WorkRelationship;
 import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
+import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
 import com.jeeplus.modules.workstaff.entity.WorkStaffCertificateImport;
 import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
 import com.jeeplus.modules.workstaff.service.WorkStaffCertificateService;
@@ -201,6 +203,16 @@ public class WorkStaffBasicInfoController extends BaseController {
 		if(StringUtils.isNotBlank(workStaffBasicInfo.getId())){
             workStaffBasicInfoService.queryDetails(workStaffBasicInfo);
         }
+		List<WorkStaffCertificate> certificateList = workStaffBasicInfo.getCertificateList();
+		List<MainDictDetail> certificateType = DictUtils.getMainDictList("certificate_type");
+		for (MainDictDetail type : certificateType) {
+			for (WorkStaffCertificate info: certificateList) {
+				if(info.getName().equals(type.getValue())){
+					info.setName(type.getLabel());
+					break;
+				}
+			}
+		}
 		Role role = roleService.get(roleService.getRoleIdByUserId(workStaffBasicInfo.getUserId()));
 		workStaffBasicInfo.setRoleId(role.getId());
 		workStaffBasicInfo.setRoleName(role.getName());

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

@@ -1150,7 +1150,7 @@
                                 <td>
                                     <select name="certificateList[${varStatus.index}].name" id="certificateList${varStatus.index}_name" class="form-control required">
                                         <c:forEach items="${fns:getMainDictList('certificate_type')}" var="var">
-                                            <option value="${var.label}" <c:if test="${certificate.name eq var.label}">selected</c:if>>${var.label}</option>
+                                            <option value="${var.value}" <c:if test="${certificate.name eq var.label}">selected</c:if>>${var.label}</option>
                                         </c:forEach>
                                     </select>
                                 </td>
@@ -1192,7 +1192,7 @@
                                    <select name="certificateList[{{idx}}].name" id="certificateList{{idx}}_name" class="form-control required">
                                         <option value=""></option>
                                         <c:forEach items="${fns:getMainDictList('certificate_type')}" var="var">
-                                            <option value="${var.label}">${var.label}</option>
+                                            <option value="${var.value}">${var.label}</option>
                                         </c:forEach>
                                     </select>
                                 </td>

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

@@ -183,7 +183,9 @@
                     <shiro:hasPermission name="workstaff:workStaffBasicInfo:add">
                         <table:addRow url="${ctx}/workstaff/workStaffBasicInfo/form" title="员工信息"></table:addRow><!-- 增加按钮 -->
                     </shiro:hasPermission>
-                    <table:importExcelBasic url="${ctx}/workstaff/workStaffBasicInfo/import"></table:importExcelBasic><!-- 导入按钮 -->
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:import">
+                        <table:importExcelBasic url="${ctx}/workstaff/workStaffBasicInfo/import"></table:importExcelBasic><!-- 导入按钮 -->
+                    </shiro:hasPermission>
                     <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
                     <div style="clear: both;"></div>
                 </div>

+ 5 - 21
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoView.jsp

@@ -537,13 +537,9 @@
                             <tr>
                                 <th width="10%"><span class="require-item">*</span>证书名称</th>
                                 <th width="10%"><span class="require-item">*</span>证书编号</th>
-                                <th width="10%"><span class="require-item">*</span>发证机关</th>
-                                <th width="10%"><span class="require-item">*</span>发证日期</th>
-                                <th width="10%">注册日期</th>
-                                <th width="10%">注册证书编号</th>
-                                <th width="10%">专业</th>
-                                <th width="10%">等级</th>
-                                <th width="10%">取得方式</th>
+                                <th width="11%">注册日期</th>
+                                <th width="11%"><span class="require-item">*</span>发证日期</th>
+                                <th width="10%">发证机关</th>
                                 <th width="10%">文件</th>
                             </tr>
                             </thead>
@@ -557,25 +553,13 @@
                                         ${certificate.num}
                                     </td>
                                     <td>
-                                        ${certificate.issuingAuthority}
-                                    </td>
-                                    <td>
-                                        <fmt:formatDate value="${certificate.issuingDate}" pattern="yyyy-MM-dd"/>
-                                    </td>
-                                    <td>
                                         <fmt:formatDate value="${certificate.registDate}" pattern="yyyy-MM-dd"/>
                                     </td>
                                     <td>
-                                        ${certificate.registNum}
-                                    </td>
-                                    <td>
-                                        ${certificate.major}
-                                    </td>
-                                    <td>
-                                        ${certificate.grade}
+                                        <fmt:formatDate value="${certificate.issuingDate}" pattern="yyyy-MM-dd"/>
                                     </td>
                                     <td>
-                                            ${certificate.issType}
+                                        ${certificate.issuingAuthority}
                                     </td>
                                     <td >
                                         <c:if test="${not empty certificate.filePath}"><img src="${certificate.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${certificate.filePath}','90%','90%')" alt=""></c:if>