@@ -2,9 +2,7 @@ package com.rwk.web.controller.ability; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.List; | import java.util.List; | ||||
import com.rwk.common.utils.StringUtils; | |||||
import com.rwk.system.domain.RwkFamilyMember; | |||||
import com.rwk.common.utils.DateUtils; | |||||
import com.rwk.system.service.IRwkFamilyMemberService; | import com.rwk.system.service.IRwkFamilyMemberService; | ||||
import org.apache.shiro.authz.annotation.RequiresPermissions; | import org.apache.shiro.authz.annotation.RequiresPermissions; | ||||
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
@@ -62,14 +60,13 @@ public class RwkStaffInformationController extends BaseController | |||||
public String receiveView(@PathVariable("id") Long id, ModelMap mmap) | public String receiveView(@PathVariable("id") Long id, ModelMap mmap) | ||||
{ | { | ||||
RwkStaffInformation rwkStaffInformation = rwkStaffInformationService.selectRwkStaffInformationById(id); | RwkStaffInformation rwkStaffInformation = rwkStaffInformationService.selectRwkStaffInformationById(id); | ||||
List<RwkFamilyMember> list = new ArrayList<>(); | |||||
if (StringUtils.isNotEmpty(rwkStaffInformation.getFamilyMemberCode())){ | |||||
RwkFamilyMember rwkFamilyMember = new RwkFamilyMember(); | |||||
rwkFamilyMember.setFamilyMemberCode(rwkStaffInformation.getFamilyMemberCode()); | |||||
list = rwkFamilyMemberService.selectRwkFamilyMemberList(rwkFamilyMember); | |||||
} | |||||
List<List<String>> resumeLines = splitConversion(rwkStaffInformation.getResume()); | |||||
List<List<String>> trainingLines = splitConversion(rwkStaffInformation.getTraining()); | |||||
List<List<String>> achievementLines = splitConversion(rwkStaffInformation.getAchievement()); | |||||
mmap.put("rwkStaffInformation",rwkStaffInformation); | mmap.put("rwkStaffInformation",rwkStaffInformation); | ||||
mmap.put("familyList",list); | |||||
mmap.put("resumeLines",resumeLines); | |||||
mmap.put("trainingLines",trainingLines); | |||||
mmap.put("achievementLines",achievementLines); | |||||
return prefix + "/informationView"; | return prefix + "/informationView"; | ||||
} | } | ||||
@@ -118,6 +115,8 @@ public class RwkStaffInformationController extends BaseController | |||||
@ResponseBody | @ResponseBody | ||||
public AjaxResult addSave(RwkStaffInformation rwkStaffInformation) | public AjaxResult addSave(RwkStaffInformation rwkStaffInformation) | ||||
{ | { | ||||
rwkStaffInformation.setCreateTime(DateUtils.getNowDate()); | |||||
rwkStaffInformation.setCreateBy(getSysUser().getLoginName()); | |||||
return toAjax(rwkStaffInformationService.insertRwkStaffInformation(rwkStaffInformation)); | return toAjax(rwkStaffInformationService.insertRwkStaffInformation(rwkStaffInformation)); | ||||
} | } | ||||
@@ -142,6 +141,8 @@ public class RwkStaffInformationController extends BaseController | |||||
@ResponseBody | @ResponseBody | ||||
public AjaxResult editSave(RwkStaffInformation rwkStaffInformation) | public AjaxResult editSave(RwkStaffInformation rwkStaffInformation) | ||||
{ | { | ||||
rwkStaffInformation.setUpdateTime(DateUtils.getNowDate()); | |||||
rwkStaffInformation.setUpdateBy(getSysUser().getLoginName()); | |||||
return toAjax(rwkStaffInformationService.updateRwkStaffInformation(rwkStaffInformation)); | return toAjax(rwkStaffInformationService.updateRwkStaffInformation(rwkStaffInformation)); | ||||
} | } | ||||
@@ -156,4 +157,21 @@ public class RwkStaffInformationController extends BaseController | |||||
{ | { | ||||
return toAjax(rwkStaffInformationService.deleteRwkStaffInformationByIds(ids)); | return toAjax(rwkStaffInformationService.deleteRwkStaffInformationByIds(ids)); | ||||
} | } | ||||
private List<List<String>> splitConversion(String string){ | |||||
List<List<String>> result = new ArrayList<>(); | |||||
String[] lines = string.split("\r\n"); | |||||
for (String line : lines) { | |||||
// 对每一行按空白字符分割,去除前后空格 | |||||
String[] parts = line.trim().split("\\s+"); | |||||
List<String> lineParts = new ArrayList<>(); | |||||
for (String part : parts) { | |||||
lineParts.add(part.trim()); | |||||
} | |||||
if (!lineParts.isEmpty()) { | |||||
result.add(lineParts); | |||||
} | |||||
} | |||||
return result; | |||||
} | |||||
} | } |
@@ -224,4 +224,59 @@ dd,dl{ | |||||
position: relative; | position: relative; | ||||
min-width: 80px; | min-width: 80px; | ||||
word-break: break-all | word-break: break-all | ||||
} | |||||
/*-----表格样式-----*/ | |||||
.information table { | |||||
width: 100%; | |||||
border-collapse: collapse; /* 合并边框 */ | |||||
} | |||||
.information td { | |||||
border: 1px solid #000; /* 内部框线 */ | |||||
padding: 10px; | |||||
text-align: left; | |||||
} | |||||
.information input[type="text"] { | |||||
width: 100%; | |||||
border: none; | |||||
box-sizing: border-box; | |||||
} | |||||
.information .form-control:focus{ | |||||
border: none!important; | |||||
box-shadow:none!important; | |||||
} | |||||
.multiLine-item { | |||||
padding: 10px; | |||||
text-align: left; | |||||
width: 100%; | |||||
box-sizing: border-box; | |||||
display: flex; | |||||
} | |||||
.left-content { | |||||
min-width: 145px; | |||||
} | |||||
.right-content { | |||||
margin-left: 20px; | |||||
} | |||||
.bg-color-1 { | |||||
background-color: #F9F9F9; | |||||
} | |||||
.bg-color-2 { | |||||
background-color: #ffffff; | |||||
} | |||||
.informationText table{ | |||||
width: 100%; | |||||
} | |||||
.informationText table tr:first-child{ | |||||
height: 45px; | |||||
background-color: #F3F3F3; | |||||
color: #6F6F6E; | |||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); | |||||
} | |||||
.informationText table th, | |||||
.informationText table td{ | |||||
text-align: center; | |||||
} | |||||
.informationText table tr td:last-child{ | |||||
text-align: left; | |||||
} | } |
@@ -102,7 +102,6 @@ | |||||
$('.cut').removeClass('active'); | $('.cut').removeClass('active'); | ||||
$(this).addClass('active'); | $(this).addClass('active'); | ||||
}); | }); | ||||
var array2 = [2,4,6,8,10]; | |||||
var grid = {left: '10%', right: '6%', bottom: '3%', top:'6%'} | var grid = {left: '10%', right: '6%', bottom: '3%', top:'6%'} | ||||
//饼图1 | //饼图1 | ||||
pieChartMethod('pieChart1',array1,"职务层次情况",'60%',"",grid,"",true); | pieChartMethod('pieChart1',array1,"职务层次情况",'60%',"",grid,"",true); | ||||
@@ -245,7 +244,6 @@ | |||||
function funnelPlot(id,data){ | function funnelPlot(id,data){ | ||||
var myChart = echarts.init(document.getElementById(id)); | var myChart = echarts.init(document.getElementById(id)); | ||||
var changeData = handleData(data); | var changeData = handleData(data); | ||||
console.log(changeData); | |||||
var option = { | var option = { | ||||
// tooltip: { | // tooltip: { | ||||
// trigger: 'item', | // trigger: 'item', | ||||
@@ -314,7 +312,7 @@ | |||||
return data.map((item,index) => { | return data.map((item,index) => { | ||||
return { | return { | ||||
name: item.name+" "+item.value+" 人", | name: item.name+" "+item.value+" 人", | ||||
value: array2[index] | |||||
value: (index+1)*2 | |||||
}; | }; | ||||
}); | }); | ||||
} | } | ||||
@@ -11,405 +11,188 @@ | |||||
<button class="btn btn-unite" onclick="submitHandler()">保存</button> | <button class="btn btn-unite" onclick="submitHandler()">保存</button> | ||||
</div> | </div> | ||||
</ul> | </ul> | ||||
<form class="form-horizontal m" id="form-information-add"> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">姓名:</label> | |||||
<div class="col-md-9"> | |||||
<input name="name" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">性别:</label> | |||||
<div class="col-md-9"> | |||||
<select name="sex" class="form-control" th:with="type=${@dict.getType('sys_user_sex')}"> | |||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> | |||||
</select> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">民族:</label> | |||||
<div class="col-md-9"> | |||||
<input name="nation" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">国籍:</label> | |||||
<div class="col-md-9"> | |||||
<input name="nationality" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">出生年月:</label> | |||||
<div class="col-md-9"> | |||||
<input name="birthday" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">出生地:</label> | |||||
<div class="col-md-9"> | |||||
<input name="birthplace" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">籍贯:</label> | |||||
<div class="col-md-9"> | |||||
<input name="nativePlace" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">是否取得境外长期居留资格:</label> | |||||
<div class="col-md-9"> | |||||
<select name="overseasResidencyStatus" class="form-control" th:with="type=${@dict.getType('sys_yes_no')}"> | |||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> | |||||
</select> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">取得国家:</label> | |||||
<div class="col-md-9"> | |||||
<input name="acquiringCountry" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">证件号:</label> | |||||
<div class="col-md-9"> | |||||
<input name="idNumber" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">参加工作时间:</label> | |||||
<div class="col-md-9"> | |||||
<input name="workTime" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label"><span class="specialSign">*</span>身份证号码:</label> | |||||
<div class="col-md-9"> | |||||
<input name="idCard" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">党派:</label> | |||||
<div class="col-md-9"> | |||||
<input name="party" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">党派职务:</label> | |||||
<div class="col-md-9"> | |||||
<input name="partyPositions" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">加入时间:</label> | |||||
<div class="col-md-9"> | |||||
<input name="joinTime" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">人才类别:</label> | |||||
<div class="col-md-9"> | |||||
<input name="talentCategory" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">宗教信仰:</label> | |||||
<div class="col-md-9"> | |||||
<input name="religion" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">现任社会职务(包括各级人大、政协等职务):</label> | |||||
<div class="col-md-9"> | |||||
<input name="currentOccupation" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">知联会职务:</label> | |||||
<div class="col-md-9"> | |||||
<input name="zlhJob" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">全日制教育</label> | |||||
<label class="col-md-3 control-label">毕业院校及专业:</label> | |||||
<div class="col-md-6"> | |||||
<input name="qrzSchoolMajor" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">学历:</label> | |||||
<div class="col-md-9"> | |||||
<input name="qrzQualification" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">学位:</label> | |||||
<div class="col-md-9"> | |||||
<input name="qrzDegree" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">在职教育</label> | |||||
<label class="col-md-3 control-label">毕业院校及专业:</label> | |||||
<div class="col-md-6"> | |||||
<input name="zzSchoolMajor" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">学历:</label> | |||||
<div class="col-md-9"> | |||||
<input name="zzQualification" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">学位:</label> | |||||
<div class="col-md-9"> | |||||
<input name="zzDegree" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">工作单位及职务:</label> | |||||
<div class="col-md-9"> | |||||
<input name="unitJob" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">技术职称:</label> | |||||
<div class="col-md-9"> | |||||
<input name="technicalTitle" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">专业特长:</label> | |||||
<div class="col-md-9"> | |||||
<input name="speciality" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">单位属性:</label> | |||||
<div class="col-md-9"> | |||||
<input name="unitAttribute" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">职务级别:</label> | |||||
<div class="col-md-9"> | |||||
<input name="jobLevel" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">任现职时间:</label> | |||||
<div class="col-md-9"> | |||||
<input name="currentTenure" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">单位地址:</label> | |||||
<div class="col-md-9"> | |||||
<input name="unitAddress" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">电话:</label> | |||||
<div class="col-md-9"> | |||||
<input name="unitPhone" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">邮编:</label> | |||||
<div class="col-md-9"> | |||||
<input name="unitZipCode" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">家庭地址:</label> | |||||
<div class="col-md-9"> | |||||
<input name="homeAddress" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">电话:</label> | |||||
<div class="col-md-9"> | |||||
<input name="homePhone" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">邮编:</label> | |||||
<div class="col-md-9"> | |||||
<input name="homeZipCode" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">电子邮箱:</label> | |||||
<div class="col-md-9"> | |||||
<input name="email" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">手机号:</label> | |||||
<div class="col-md-9"> | |||||
<input name="mobilePhone" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">微信号:</label> | |||||
<div class="col-md-9"> | |||||
<input name="wxCode" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="form-group"> | |||||
<label class="col-md-1 control-label">业余爱好:</label> | |||||
<div class="col-md-11"> | |||||
<input name="hobby" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="form-group"> | |||||
<label class="col-md-1 control-label">简历:</label> | |||||
<div class="col-md-11"> | |||||
<textarea rows="6" name="resume" class="form-control"></textarea> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="form-group"> | |||||
<label class="col-md-1 control-label">培训情况:</label> | |||||
<div class="col-md-11"> | |||||
<textarea rows="6" name="training" class="form-control"></textarea> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="form-group"> | |||||
<label class="col-md-1 control-label">主要成就:</label> | |||||
<div class="col-md-11"> | |||||
<textarea rows="6" name="achievement" class="form-control"></textarea> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="form-group"> | |||||
<label class="col-md-1 control-label">家庭情况:</label> | |||||
<div class="col-md-11"> | |||||
<button type="button" class="btn btn-unite" onclick="addRow()">增加</button> | |||||
<button type="button" class="btn btn-unite" onclick="sub.delRow()">删除</button> | |||||
<div class="col-sm-12 select-table table-striped"> | |||||
<table id="bootstrap-table"></table> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<form class="form-horizontal m information" id="form-information-add"> | |||||
<table> | |||||
<tr> | |||||
<td colspan="2">姓名</td> | |||||
<td colspan="2"><input name="name" class="form-control" type="text"></td> | |||||
<td colspan="2">性别</td> | |||||
<td colspan="2"><input name="sex" class="form-control" type="text"></td> | |||||
<td colspan="2">民族</td> | |||||
<td colspan="2"><input name="nation" class="form-control" type="text"></td> | |||||
<td colspan="2">国籍</td> | |||||
<td colspan="2"><input name="nationality" class="form-control" type="text"></td> | |||||
<td colspan="2" rowspan="4" style="min-width: 240px;"> | |||||
<div style="width:100%;display: flex;align-items: center;justify-content: center;flex-direction: column;"> | |||||
<div style="width: 60%;max-height: 150px;"><img id="photo" class="img-xs" src="" style="display: none;width: 100%;height: 100%;"/></div> | |||||
<div style="width: 60%;height: 20%;text-align: center;"> | |||||
<a class="btn btn-unite" onclick="$('#fileUpload').click();">上传照片</a> | |||||
</div> | |||||
</div> | |||||
<input name="photo" class="form-control" type="hidden"> | |||||
<input class="btn btn-unite" type="file" name="fileUpload" id="fileUpload" style="display: none;" onchange="getFileName()" accept=".jpg,.png"> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">出生年月日</td> | |||||
<td colspan="2"><input name="birthday" class="form-control" type="text"></td> | |||||
<td colspan="2">出生地</td> | |||||
<td colspan="2"><input name="birthplace" class="form-control" type="text"></td> | |||||
<td colspan="2">籍贯</td> | |||||
<td colspan="6"><input name="nativePlace" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">是否取得境外长期居留资格</td> | |||||
<td colspan="2"><input name="overseasResidencyStatus" class="form-control" type="text"></td> | |||||
<td colspan="2">取得国家</td> | |||||
<td colspan="2"><input name="acquiringCountry" class="form-control" type="text"></td> | |||||
<td colspan="2">证件号</td> | |||||
<td colspan="6"><input name="idNumber" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">参加工作时间</td> | |||||
<td colspan="4"><input name="workTime" class="form-control" type="text"></td> | |||||
<td colspan="2">身份证号码(☆必填)</td> | |||||
<td colspan="8"><input name="idCard" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">党派</td> | |||||
<td colspan="4"><input name="party" class="form-control" type="text"></td> | |||||
<td colspan="2">党派职务</td> | |||||
<td colspan="4"><input name="partyPositions" class="form-control" type="text"></td> | |||||
<td colspan="2">加入时间</td> | |||||
<td colspan="4"><input name="joinTime" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">人才类别</td> | |||||
<td colspan="6"><input name="talentCategory" class="form-control" type="text"></td> | |||||
<td colspan="4">宗教信仰</td> | |||||
<td colspan="6"><input name="religion" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="4">现任社会职务<span>(包括各级人大、政协等职务)</span></td> | |||||
<td colspan="8"><input name="currentOccupation" class="form-control" type="text"></td> | |||||
<td colspan="2">知联会职务</td> | |||||
<td colspan="4"><input name="zlhJob" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">全日制教育</td> | |||||
<td colspan="2">毕业院校及专业</td> | |||||
<td colspan="4"><input name="qrzSchoolMajor" class="form-control" type="text"></td> | |||||
<td colspan="2">学历</td> | |||||
<td colspan="3"><input name="qrzQualification" class="form-control" type="text"></td> | |||||
<td colspan="2">学位</td> | |||||
<td colspan="3"><input name="qrzDegree" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">在职教育</td> | |||||
<td colspan="2">毕业院校及专业</td> | |||||
<td colspan="4"><input name="zzSchoolMajor" class="form-control" type="text"></td> | |||||
<td colspan="2">学历</td> | |||||
<td colspan="3"><input name="zzQualification" class="form-control" type="text"></td> | |||||
<td colspan="2">学位</td> | |||||
<td colspan="3"><input name="zzDegree" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">工作单位及职务</td> | |||||
<td colspan="6"><input name="unitJob" class="form-control" type="text"></td> | |||||
<td colspan="2">技术职称</td> | |||||
<td colspan="3"><input name="technicalTitle" class="form-control" type="text"></td> | |||||
<td colspan="2">专业特长</td> | |||||
<td colspan="3"><input name="speciality" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">单位属性</td> | |||||
<td colspan="4"><input name="unitAttribute" class="form-control" type="text"></td> | |||||
<td colspan="2">职务级别</td> | |||||
<td colspan="4"><input name="jobLevel" class="form-control" type="text"></td> | |||||
<td colspan="2">任现职时间</td> | |||||
<td colspan="4"><input name="currentTenure" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">单位地址</td> | |||||
<td colspan="6"><input name="unitAddress" class="form-control" type="text"></td> | |||||
<td colspan="2">电话</td> | |||||
<td colspan="3"><input name="unitPhone" class="form-control" type="text"></td> | |||||
<td colspan="2">邮编</td> | |||||
<td colspan="3"><input name="unitZipCode" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">家庭地址</td> | |||||
<td colspan="6"><input name="homeAddress" class="form-control" type="text"></td> | |||||
<td colspan="2">电话</td> | |||||
<td colspan="3"><input name="homePhone" class="form-control" type="text"></td> | |||||
<td colspan="2">邮编</td> | |||||
<td colspan="3"><input name="homeZipCode" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">电子信箱</td> | |||||
<td colspan="5"><input name="email" class="form-control" type="text"></td> | |||||
<td colspan="2">手机</td> | |||||
<td colspan="3"><input name="mobilePhone" class="form-control" type="text"></td> | |||||
<td colspan="2">微信号</td> | |||||
<td colspan="4"><input name="wxCode" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">业余爱好</td> | |||||
<td colspan="16"><input name="hobby" class="form-control" type="text"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">简历</td> | |||||
<td colspan="16"><textarea rows="10" name="resume" class="form-control" style="width: 100%;border: none;resize: none;"></textarea></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">培训情况</td> | |||||
<td colspan="16"><textarea rows="10" name="training" class="form-control" style="width: 100%;border: none;resize: none;"></textarea></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">主要成就<span>(工作成绩、成果、受奖励和荣誉称号等)</span></td> | |||||
<td colspan="16"><textarea rows="10" name="achievement" class="form-control" style="width: 100%;border: none;resize: none;"></textarea></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2" rowspan="6">家庭成员</td> | |||||
<td colspan="2">称谓</td> | |||||
<td colspan="3">姓名</td> | |||||
<td colspan="2">出生年月</td> | |||||
<td colspan="3">政治面貌</td> | |||||
<td colspan="6">工作单位及职务</td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[0].appellation" class="form-control" type="text"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[0].name" class="form-control" type="text"/></td> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[0].birthday" class="form-control" type="text"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[0].politicalStatus" class="form-control" type="text"/></td> | |||||
<td colspan="6"><input name="rwkFamilyMemberList[0].unitJob" class="form-control" type="text"/></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[1].appellation" class="form-control" type="text"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[1].name" class="form-control" type="text"/></td> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[1].birthday" class="form-control" type="text"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[1].politicalStatus" class="form-control" type="text"/></td> | |||||
<td colspan="6"><input name="rwkFamilyMemberList[1].unitJob" class="form-control" type="text"/></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[2].appellation" class="form-control" type="text"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[2].name" class="form-control" type="text"/></td> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[2].birthday" class="form-control" type="text"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[2].politicalStatus" class="form-control" type="text"/></td> | |||||
<td colspan="6"><input name="rwkFamilyMemberList[2].unitJob" class="form-control" type="text"/></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[3].appellation" class="form-control" type="text"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[3].name" class="form-control" type="text"/></td> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[3].birthday" class="form-control" type="text"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[3].politicalStatus" class="form-control" type="text"/></td> | |||||
<td colspan="6"><input name="rwkFamilyMemberList[3].unitJob" class="form-control" type="text"/></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[4].appellation" class="form-control" type="text"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[4].name" class="form-control" type="text"/></td> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[4].birthday" class="form-control" type="text"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[4].politicalStatus" class="form-control" type="text"/></td> | |||||
<td colspan="6"><input name="rwkFamilyMemberList[4].unitJob" class="form-control" type="text"/></td> | |||||
</tr> | |||||
</table> | |||||
<input name="familyMemberCode" id="familyMemberCode" type="hidden"> | <input name="familyMemberCode" id="familyMemberCode" type="hidden"> | ||||
</form> | </form> | ||||
</div> | </div> | ||||
@@ -420,86 +203,34 @@ | |||||
$("#form-information-add").validate({ | $("#form-information-add").validate({ | ||||
focusCleanup: true | focusCleanup: true | ||||
}); | }); | ||||
init(); | |||||
//初始化 | |||||
function init(){ | |||||
loadTable(); | |||||
} | |||||
//加载表格 | |||||
function loadTable(){ | |||||
var options = { | |||||
data: [], | |||||
pagination: false, | |||||
showSearch: false, | |||||
showRefresh: false, | |||||
showToggle: false, | |||||
showColumns: false, | |||||
sidePagination: "client", | |||||
columns: [{ | |||||
checkbox: true | |||||
}, | |||||
{ | |||||
field: 'index', | |||||
align: 'center', | |||||
title: "序号", | |||||
formatter: function (value, row, index) { | |||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index)); | |||||
var columnId = $.common.sprintf("<input type='hidden' name='list[%s].id' value='%s'>", index, row.id); | |||||
return columnIndex + $.table.serialNumber(index) + columnId; | |||||
} | |||||
}, | |||||
{ | |||||
field: 'appellation', | |||||
align: 'center', | |||||
title: '称谓', | |||||
formatter: function(value, row, index) { | |||||
return $.common.sprintf("<input class='form-control' type='text' name='list[%s].appellation' value='%s' />", index, value); | |||||
} | |||||
}, | |||||
{ | |||||
field: 'name', | |||||
align: 'center', | |||||
title: '姓名', | |||||
formatter: function(value, row, index) { | |||||
return $.common.sprintf("<input class='form-control' type='text' name='list[%s].name' value='%s' />", index, value); | |||||
} | |||||
//上传图片 | |||||
function getFileName(){ | |||||
var file = $("#fileUpload")[0].files[0]; | |||||
var filename = file.name; | |||||
var formData = new FormData(); | |||||
formData.append("file", file); | |||||
var allowedExtensions = /(\.jpg|\.png)$/i; | |||||
var fileExtension = filename.substring(filename.lastIndexOf('.')).toLowerCase(); | |||||
//判断文件是否符合规范 | |||||
if (allowedExtensions.test(fileExtension)) { | |||||
$.ajax({ | |||||
url: ctx + 'common/upload', | |||||
type: 'POST', | |||||
data: formData, | |||||
contentType: false, | |||||
processData: false, | |||||
success: function(response) { | |||||
$("input[name=photo]").val(response.url); | |||||
$("#photo").attr("src",response.url).show(); | |||||
}, | }, | ||||
{ | |||||
field: 'birthday', | |||||
align: 'center', | |||||
title: '出生年月', | |||||
formatter: function(value, row, index) { | |||||
return $.common.sprintf("<input class='form-control' type='text' name='list[%s].birthday' value='%s' />", index, value); | |||||
} | |||||
}, | |||||
{ | |||||
field: 'politicalStatus', | |||||
align: 'center', | |||||
title: '政治面貌', | |||||
formatter: function(value, row, index) { | |||||
return $.common.sprintf("<input class='form-control' type='text' name='list[%s].politicalStatus' value='%s' />", index, value); | |||||
} | |||||
}, | |||||
{ | |||||
field: 'unitJob', | |||||
align: 'left', | |||||
title: '工作单位及职务', | |||||
formatter: function(value, row, index) { | |||||
return $.common.sprintf("<textarea class='form-control' rows=\"2\" name='list[%s].unitJob'>%s</textarea>", index, value); | |||||
} | |||||
}, | |||||
{ | |||||
title: '操作', | |||||
align: 'center', | |||||
formatter: function(value, row, index) { | |||||
var num = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index); | |||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + num + '\')"><i class="fa fa-remove"></i>删除</a>'; | |||||
} | |||||
}] | |||||
}; | |||||
$.table.init(options); | |||||
error: function(xhr, status, error) { | |||||
console.error(error); | |||||
} | |||||
}); | |||||
} else { | |||||
$.modal.alertError("该文件类型不符合"); | |||||
} | |||||
} | } | ||||
function submitHandler() { | function submitHandler() { | ||||
@@ -508,28 +239,6 @@ | |||||
} | } | ||||
} | } | ||||
function addRow() { | |||||
var element = $("#" + table.options.id); | |||||
var count = element.bootstrapTable('getData').length; | |||||
var row = { | |||||
index: $.table.serialNumber(count), | |||||
appellation:"", | |||||
name: "", | |||||
birthday: "", | |||||
politicalStatus: "", | |||||
unitJob: "" | |||||
} | |||||
sub.addRow(row); | |||||
scrollToBottom(); | |||||
} | |||||
// 滚动到页面底部的函数 | |||||
function scrollToBottom() { | |||||
$('html, body').animate({ | |||||
scrollTop: $(document).height() | |||||
}, 'slow'); | |||||
} | |||||
//随机生成连表code | //随机生成连表code | ||||
function generateCodeId() { | function generateCodeId() { | ||||
const timestamp = Date.now(); | const timestamp = Date.now(); | ||||
@@ -2,6 +2,7 @@ | |||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > | <html lang="zh" xmlns:th="http://www.thymeleaf.org" > | ||||
<head> | <head> | ||||
<th:block th:include="include :: header('修改人员信息')" /> | <th:block th:include="include :: header('修改人员信息')" /> | ||||
<link th:href="@{/css/use/css1.css}" rel="stylesheet"/> | |||||
</head> | </head> | ||||
<body class="white-bg"> | <body class="white-bg"> | ||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | ||||
@@ -10,404 +11,189 @@ | |||||
<button class="btn btn-unite" onclick="submitHandler()">保存</button> | <button class="btn btn-unite" onclick="submitHandler()">保存</button> | ||||
</div> | </div> | ||||
</ul> | </ul> | ||||
<form class="form-horizontal m" id="form-information-edit" th:object="${rwkStaffInformation}"> | |||||
<form class="form-horizontal m information" id="form-information-edit" th:object="${rwkStaffInformation}"> | |||||
<input name="id" th:field="*{id}" type="hidden"> | <input name="id" th:field="*{id}" type="hidden"> | ||||
<div class="col-md-12"> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">姓名:</label> | |||||
<div class="col-md-9"> | |||||
<input name="name" th:field="*{name}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">性别:</label> | |||||
<div class="col-md-9"> | |||||
<select name="sex" class="form-control" th:with="type=${@dict.getType('sys_user_sex')}"> | |||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option> | |||||
</select> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">民族:</label> | |||||
<div class="col-md-9"> | |||||
<input name="nation" th:field="*{nation}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">国籍:</label> | |||||
<div class="col-md-9"> | |||||
<input name="nationality" th:field="*{nationality}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">出生年月:</label> | |||||
<div class="col-md-9"> | |||||
<input name="birthday" th:field="*{birthday}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">出生地:</label> | |||||
<div class="col-md-9"> | |||||
<input name="birthplace" th:field="*{birthplace}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">籍贯:</label> | |||||
<div class="col-md-9"> | |||||
<input name="nativePlace" th:field="*{nativePlace}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">是否取得境外长期居留资格:</label> | |||||
<div class="col-md-9"> | |||||
<select name="overseasResidencyStatus" class="form-control" th:with="type=${@dict.getType('sys_yes_no')}"> | |||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{overseasResidencyStatus}"></option> | |||||
</select> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">取得国家:</label> | |||||
<div class="col-md-9"> | |||||
<input name="acquiringCountry" th:field="*{acquiringCountry}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">证件号:</label> | |||||
<div class="col-md-9"> | |||||
<input name="idNumber" th:field="*{idNumber}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">参加工作时间:</label> | |||||
<div class="col-md-9"> | |||||
<input name="workTime" th:field="*{workTime}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label"><span class="specialSign">*</span>身份证号码:</label> | |||||
<div class="col-md-9"> | |||||
<input name="idCard" th:field="*{idCard}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">党派:</label> | |||||
<div class="col-md-9"> | |||||
<input name="party" th:field="*{party}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">党派职务:</label> | |||||
<div class="col-md-9"> | |||||
<input name="partyPositions" th:field="*{partyPositions}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">加入时间:</label> | |||||
<div class="col-md-9"> | |||||
<input name="joinTime" th:field="*{joinTime}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">人才类别:</label> | |||||
<div class="col-md-9"> | |||||
<input name="talentCategory" th:field="*{talentCategory}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">宗教信仰:</label> | |||||
<div class="col-md-9"> | |||||
<input name="religion" th:field="*{religion}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">现任社会职务(包括各级人大、政协等职务):</label> | |||||
<div class="col-md-9"> | |||||
<input name="currentOccupation" th:field="*{currentOccupation}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">知联会职务:</label> | |||||
<div class="col-md-9"> | |||||
<input name="zlhJob" th:field="*{zlhJob}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">全日制教育</label> | |||||
<label class="col-md-3 control-label">毕业院校及专业:</label> | |||||
<div class="col-md-6"> | |||||
<input name="qrzSchoolMajor" th:field="*{qrzSchoolMajor}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">学历:</label> | |||||
<div class="col-md-9"> | |||||
<input name="qrzQualification" th:field="*{qrzQualification}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">学位:</label> | |||||
<div class="col-md-9"> | |||||
<input name="qrzDegree" th:field="*{qrzDegree}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">在职教育</label> | |||||
<label class="col-md-3 control-label">毕业院校及专业:</label> | |||||
<div class="col-md-6"> | |||||
<input name="zzSchoolMajor" th:field="*{zzSchoolMajor}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">学历:</label> | |||||
<div class="col-md-9"> | |||||
<input name="zzQualification" th:field="*{zzQualification}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">学位:</label> | |||||
<div class="col-md-9"> | |||||
<input name="zzDegree" th:field="*{zzDegree}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">工作单位及职务:</label> | |||||
<div class="col-md-9"> | |||||
<input name="unitJob" th:field="*{unitJob}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">技术职称:</label> | |||||
<div class="col-md-9"> | |||||
<input name="technicalTitle" th:field="*{technicalTitle}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">专业特长:</label> | |||||
<div class="col-md-9"> | |||||
<input name="speciality" th:field="*{speciality}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">单位属性:</label> | |||||
<div class="col-md-9"> | |||||
<input name="unitAttribute" th:field="*{unitAttribute}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">职务级别:</label> | |||||
<div class="col-md-9"> | |||||
<input name="jobLevel" th:field="*{jobLevel}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">任现职时间:</label> | |||||
<div class="col-md-9"> | |||||
<input name="currentTenure" th:field="*{currentTenure}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">单位地址:</label> | |||||
<div class="col-md-9"> | |||||
<input name="unitAddress" th:field="*{unitAddress}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">电话:</label> | |||||
<div class="col-md-9"> | |||||
<input name="unitPhone" th:field="*{unitPhone}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">邮编:</label> | |||||
<div class="col-md-9"> | |||||
<input name="unitZipCode" th:field="*{unitZipCode}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-6"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">家庭地址:</label> | |||||
<div class="col-md-9"> | |||||
<input name="homeAddress" th:field="*{homeAddress}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">电话:</label> | |||||
<div class="col-md-9"> | |||||
<input name="homePhone" th:field="*{homePhone}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">邮编:</label> | |||||
<div class="col-md-9"> | |||||
<input name="homeZipCode" th:field="*{homeZipCode}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">电子邮箱:</label> | |||||
<div class="col-md-9"> | |||||
<input name="email" th:field="*{email}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">手机号:</label> | |||||
<div class="col-md-9"> | |||||
<input name="mobilePhone" th:field="*{mobilePhone}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-4"> | |||||
<div class="form-group"> | |||||
<label class="col-md-3 control-label">微信号:</label> | |||||
<div class="col-md-9"> | |||||
<input name="wxCode" th:field="*{wxCode}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="form-group"> | |||||
<label class="col-md-1 control-label">业余爱好:</label> | |||||
<div class="col-md-11"> | |||||
<input name="hobby" th:field="*{hobby}" class="form-control" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="form-group"> | |||||
<label class="col-md-1 control-label">简历:</label> | |||||
<div class="col-md-11"> | |||||
<textarea rows="6" name="resume" class="form-control">[[*{resume}]]</textarea> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="form-group"> | |||||
<label class="col-md-1 control-label">培训情况:</label> | |||||
<div class="col-md-11"> | |||||
<textarea rows="6" name="training" class="form-control">[[*{training}]]</textarea> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="form-group"> | |||||
<label class="col-md-1 control-label">主要成就:</label> | |||||
<div class="col-md-11"> | |||||
<textarea rows="6" name="achievement" class="form-control">[[*{achievement}]]</textarea> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-md-12"> | |||||
<div class="form-group"> | |||||
<label class="col-md-1 control-label">家庭情况:</label> | |||||
<div class="col-md-11"> | |||||
<table id="jtqk"> | |||||
</table> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<table> | |||||
<tr> | |||||
<td colspan="2">姓名</td> | |||||
<td colspan="2"><input name="name" class="form-control" type="text" th:field="*{name}"></td> | |||||
<td colspan="2">性别</td> | |||||
<td colspan="2"><input name="sex" class="form-control" type="text" th:field="*{sex}"></td> | |||||
<td colspan="2">民族</td> | |||||
<td colspan="2"><input name="nation" class="form-control" type="text" th:field="*{nation}"></td> | |||||
<td colspan="2">国籍</td> | |||||
<td colspan="2"><input name="nationality" class="form-control" type="text" th:field="*{nationality}"></td> | |||||
<td colspan="2" rowspan="4" style="min-width: 240px;"> | |||||
<div style="width:100%;display: flex;align-items: center;justify-content: center;flex-direction: column;"> | |||||
<div style="width: 60%;max-height: 150px;"><img id="photo" class="img-xs" src="" style="display: none;width: 100%;height: 100%;"/></div> | |||||
<div style="width: 60%;height: 20%;text-align: center;"> | |||||
<a class="btn btn-unite" onclick="$('#fileUpload').click();">上传照片</a> | |||||
</div> | |||||
</div> | |||||
<input name="photo" class="form-control" type="hidden"> | |||||
<input class="btn btn-unite" type="file" name="fileUpload" id="fileUpload" style="display: none;" onchange="getFileName()" accept=".jpg,.png"> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">出生年月日</td> | |||||
<td colspan="2"><input name="birthday" class="form-control" type="text" th:field="*{birthday}"></td> | |||||
<td colspan="2">出生地</td> | |||||
<td colspan="2"><input name="birthplace" class="form-control" type="text" th:field="*{birthplace}"></td> | |||||
<td colspan="2">籍贯</td> | |||||
<td colspan="6"><input name="nativePlace" class="form-control" type="text" th:field="*{nativePlace}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">是否取得境外长期居留资格</td> | |||||
<td colspan="2"><input name="overseasResidencyStatus" class="form-control" type="text" th:field="*{overseasResidencyStatus}"></td> | |||||
<td colspan="2">取得国家</td> | |||||
<td colspan="2"><input name="acquiringCountry" class="form-control" type="text" th:field="*{acquiringCountry}"></td> | |||||
<td colspan="2">证件号</td> | |||||
<td colspan="6"><input name="idNumber" class="form-control" type="text" th:field="*{idNumber}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">参加工作时间</td> | |||||
<td colspan="4"><input name="workTime" class="form-control" type="text" th:field="*{workTime}"></td> | |||||
<td colspan="2">身份证号码(☆必填)</td> | |||||
<td colspan="8"><input name="idCard" class="form-control" type="text" th:field="*{idCard}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">党派</td> | |||||
<td colspan="4"><input name="party" class="form-control" type="text" th:field="*{party}"></td> | |||||
<td colspan="2">党派职务</td> | |||||
<td colspan="4"><input name="partyPositions" class="form-control" type="text" th:field="*{partyPositions}"></td> | |||||
<td colspan="2">加入时间</td> | |||||
<td colspan="4"><input name="joinTime" class="form-control" type="text" th:field="*{joinTime}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">人才类别</td> | |||||
<td colspan="6"><input name="talentCategory" class="form-control" type="text" th:field="*{talentCategory}"></td> | |||||
<td colspan="4">宗教信仰</td> | |||||
<td colspan="6"><input name="religion" class="form-control" type="text" th:field="*{religion}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="4">现任社会职务<span>(包括各级人大、政协等职务)</span></td> | |||||
<td colspan="8"><input name="currentOccupation" class="form-control" type="text" th:field="*{currentOccupation}"></td> | |||||
<td colspan="2">知联会职务</td> | |||||
<td colspan="4"><input name="zlhJob" class="form-control" type="text" th:field="*{zlhJob}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">全日制教育</td> | |||||
<td colspan="2">毕业院校及专业</td> | |||||
<td colspan="4"><input name="qrzSchoolMajor" class="form-control" type="text" th:field="*{qrzSchoolMajor}"></td> | |||||
<td colspan="2">学历</td> | |||||
<td colspan="3"><input name="qrzQualification" class="form-control" type="text" th:field="*{qrzQualification}"></td> | |||||
<td colspan="2">学位</td> | |||||
<td colspan="3"><input name="qrzDegree" class="form-control" type="text" th:field="*{qrzDegree}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">在职教育</td> | |||||
<td colspan="2">毕业院校及专业</td> | |||||
<td colspan="4"><input name="zzSchoolMajor" class="form-control" type="text" th:field="*{zzSchoolMajor}"></td> | |||||
<td colspan="2">学历</td> | |||||
<td colspan="3"><input name="zzQualification" class="form-control" type="text" th:field="*{zzQualification}"></td> | |||||
<td colspan="2">学位</td> | |||||
<td colspan="3"><input name="zzDegree" class="form-control" type="text" th:field="*{zzDegree}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">工作单位及职务</td> | |||||
<td colspan="6"><input name="unitJob" class="form-control" type="text" th:field="*{unitJob}"></td> | |||||
<td colspan="2">技术职称</td> | |||||
<td colspan="3"><input name="technicalTitle" class="form-control" type="text" th:field="*{technicalTitle}"></td> | |||||
<td colspan="2">专业特长</td> | |||||
<td colspan="3"><input name="speciality" class="form-control" type="text" th:field="*{speciality}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">单位属性</td> | |||||
<td colspan="4"><input name="unitAttribute" class="form-control" type="text" th:field="*{unitAttribute}"></td> | |||||
<td colspan="2">职务级别</td> | |||||
<td colspan="4"><input name="jobLevel" class="form-control" type="text" th:field="*{jobLevel}"></td> | |||||
<td colspan="2">任现职时间</td> | |||||
<td colspan="4"><input name="currentTenure" class="form-control" type="text" th:field="*{currentTenure}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">单位地址</td> | |||||
<td colspan="6"><input name="unitAddress" class="form-control" type="text" th:field="*{unitAddress}"></td> | |||||
<td colspan="2">电话</td> | |||||
<td colspan="3"><input name="unitPhone" class="form-control" type="text" th:field="*{unitPhone}"></td> | |||||
<td colspan="2">邮编</td> | |||||
<td colspan="3"><input name="unitZipCode" class="form-control" type="text" th:field="*{unitZipCode}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">家庭地址</td> | |||||
<td colspan="6"><input name="homeAddress" class="form-control" type="text" th:field="*{homeAddress}"></td> | |||||
<td colspan="2">电话</td> | |||||
<td colspan="3"><input name="homePhone" class="form-control" type="text" th:field="*{homePhone}"></td> | |||||
<td colspan="2">邮编</td> | |||||
<td colspan="3"><input name="homeZipCode" class="form-control" type="text" th:field="*{homeZipCode}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">电子信箱</td> | |||||
<td colspan="5"><input name="email" class="form-control" type="text" th:field="*{email}"></td> | |||||
<td colspan="2">手机</td> | |||||
<td colspan="3"><input name="mobilePhone" class="form-control" type="text" th:field="*{mobilePhone}"></td> | |||||
<td colspan="2">微信号</td> | |||||
<td colspan="4"><input name="wxCode" class="form-control" type="text" th:field="*{wxCode}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">业余爱好</td> | |||||
<td colspan="16"><input name="hobby" class="form-control" type="text" th:field="*{hobby}"></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">简历</td> | |||||
<td colspan="16"><textarea rows="10" name="resume" class="form-control" style="width: 100%;border: none;resize: none;">[[*{resume}]]</textarea></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">培训情况</td> | |||||
<td colspan="16"><textarea rows="10" name="training" class="form-control" style="width: 100%;border: none;resize: none;">[[*{training}]]</textarea></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2">主要成就<span>(工作成绩、成果、受奖励和荣誉称号等)</span></td> | |||||
<td colspan="16"><textarea rows="10" name="achievement" class="form-control" style="width: 100%;border: none;resize: none;">[[*{achievement}]]</textarea></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2" rowspan="6">家庭成员</td> | |||||
<td colspan="2">称谓</td> | |||||
<td colspan="3">姓名</td> | |||||
<td colspan="2">出生年月</td> | |||||
<td colspan="3">政治面貌</td> | |||||
<td colspan="6">工作单位及职务</td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[0].appellation" class="form-control" type="text" th:field="*{rwkFamilyMemberList[0].appellation}"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[0].name" class="form-control" type="text" th:field="*{rwkFamilyMemberList[0].name}"/></td> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[0].birthday" class="form-control" type="text" th:field="*{rwkFamilyMemberList[0].birthday}"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[0].politicalStatus" class="form-control" type="text" th:field="*{rwkFamilyMemberList[0].politicalStatus}"/></td> | |||||
<td colspan="6"><input name="rwkFamilyMemberList[0].unitJob" class="form-control" type="text" th:field="*{rwkFamilyMemberList[0].unitJob}"/></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[1].appellation" class="form-control" type="text" th:field="*{rwkFamilyMemberList[1].appellation}"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[1].name" class="form-control" type="text" th:field="*{rwkFamilyMemberList[1].name}"/></td> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[1].birthday" class="form-control" type="text" th:field="*{rwkFamilyMemberList[1].birthday}"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[1].politicalStatus" class="form-control" type="text" th:field="*{rwkFamilyMemberList[1].politicalStatus}"/></td> | |||||
<td colspan="6"><input name="rwkFamilyMemberList[1].unitJob" class="form-control" type="text" th:field="*{rwkFamilyMemberList[1].unitJob}"/></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[2].appellation" class="form-control" type="text" th:field="*{rwkFamilyMemberList[2].appellation}"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[2].name" class="form-control" type="text" th:field="*{rwkFamilyMemberList[2].name}"/></td> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[2].birthday" class="form-control" type="text" th:field="*{rwkFamilyMemberList[2].birthday}"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[2].politicalStatus" class="form-control" type="text" th:field="*{rwkFamilyMemberList[2].politicalStatus}"/></td> | |||||
<td colspan="6"><input name="rwkFamilyMemberList[2].unitJob" class="form-control" type="text" th:field="*{rwkFamilyMemberList[2].unitJob}"/></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[3].appellation" class="form-control" type="text" th:field="*{rwkFamilyMemberList[3].appellation}"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[3].name" class="form-control" type="text" th:field="*{rwkFamilyMemberList[3].name}"/></td> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[3].birthday" class="form-control" type="text" th:field="*{rwkFamilyMemberList[3].birthday}"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[3].politicalStatus" class="form-control" type="text" th:field="*{rwkFamilyMemberList[3].politicalStatus}"/></td> | |||||
<td colspan="6"><input name="rwkFamilyMemberList[3].unitJob" class="form-control" type="text" th:field="*{rwkFamilyMemberList[3].unitJob}"/></td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[4].appellation" class="form-control" type="text" th:field="*{rwkFamilyMemberList[4].appellation}"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[4].name" class="form-control" type="text" th:field="*{rwkFamilyMemberList[4].name}"/></td> | |||||
<td colspan="2"><input name="rwkFamilyMemberList[4].birthday" class="form-control" type="text" th:field="*{rwkFamilyMemberList[4].birthday}"/></td> | |||||
<td colspan="3"><input name="rwkFamilyMemberList[4].politicalStatus" class="form-control" type="text" th:field="*{rwkFamilyMemberList[4].politicalStatus}"/></td> | |||||
<td colspan="6"><input name="rwkFamilyMemberList[4].unitJob" class="form-control" type="text" th:field="*{rwkFamilyMemberList[4].unitJob}"/></td> | |||||
</tr> | |||||
</table> | |||||
<input name="familyMemberCode" th:field="*{familyMemberCode}" type="hidden"> | <input name="familyMemberCode" th:field="*{familyMemberCode}" type="hidden"> | ||||
</form> | </form> | ||||
</div> | </div> | ||||
@@ -417,12 +203,50 @@ | |||||
$("#form-information-edit").validate({ | $("#form-information-edit").validate({ | ||||
focusCleanup: true | focusCleanup: true | ||||
}); | }); | ||||
var photo = [[${rwkStaffInformation.photo}]]; | |||||
init(); | |||||
function submitHandler() { | function submitHandler() { | ||||
if ($.validate.form()) { | if ($.validate.form()) { | ||||
$.operate.saveTab(prefix + "/edit", $('#form-information-edit').serialize()); | $.operate.saveTab(prefix + "/edit", $('#form-information-edit').serialize()); | ||||
} | } | ||||
} | } | ||||
function init(){ | |||||
if (photo){ | |||||
$("input[name=photo]").val(photo); | |||||
$("#photo").attr("src",photo).show(); | |||||
} | |||||
} | |||||
//上传图片 | |||||
function getFileName() { | |||||
var file = $("#fileUpload")[0].files[0]; | |||||
var filename = file.name; | |||||
var formData = new FormData(); | |||||
formData.append("file", file); | |||||
var allowedExtensions = /(\.jpg|\.png)$/i; | |||||
var fileExtension = filename.substring(filename.lastIndexOf('.')).toLowerCase(); | |||||
//判断文件是否符合规范 | |||||
if (allowedExtensions.test(fileExtension)) { | |||||
$.ajax({ | |||||
url: ctx + 'common/upload', | |||||
type: 'POST', | |||||
data: formData, | |||||
contentType: false, | |||||
processData: false, | |||||
success: function (response) { | |||||
$("input[name=photo]").val(response.url); | |||||
$("#photo").attr("src", response.url).show(); | |||||
}, | |||||
error: function (xhr, status, error) { | |||||
console.error(error); | |||||
} | |||||
}); | |||||
} else { | |||||
$.modal.alertError("该文件类型不符合"); | |||||
} | |||||
} | |||||
</script> | </script> | ||||
</body> | </body> | ||||
</html> | </html> |
@@ -99,6 +99,14 @@ | |||||
field: 'mobilePhone', | field: 'mobilePhone', | ||||
title: '手机号' | title: '手机号' | ||||
}, | }, | ||||
{ | |||||
field: 'nation', | |||||
title: '民族' | |||||
}, | |||||
{ | |||||
field: 'party', | |||||
title: '党派' | |||||
}, | |||||
{ | { | ||||
title: '操作', | title: '操作', | ||||
align: 'center', | align: 'center', | ||||
@@ -27,13 +27,13 @@ | |||||
background-color: #1a7bb9; | background-color: #1a7bb9; | ||||
} | } | ||||
.piece .line{ | .piece .line{ | ||||
width: calc(64% - 20px); | |||||
flex: 0 0 calc(88% - 20px); | |||||
margin-left: 20px; | margin-left: 20px; | ||||
margin-top: 10px; | margin-top: 10px; | ||||
border-top: 1px solid #E1E1E1; | border-top: 1px solid #E1E1E1; | ||||
} | } | ||||
.piece .content .informationText{ | .piece .content .informationText{ | ||||
padding-left: 20px; | |||||
padding: 20px; | |||||
} | } | ||||
.piece .content { | .piece .content { | ||||
width: 75%; | width: 75%; | ||||
@@ -86,6 +86,7 @@ | |||||
</head> | </head> | ||||
<body class="gray-bg"> | <body class="gray-bg"> | ||||
<form class="form-horizontal m" id="form-information-view" th:object="${rwkStaffInformation}"> | <form class="form-horizontal m" id="form-information-view" th:object="${rwkStaffInformation}"> | ||||
<input name="id" th:field="*{id}" type="hidden"> | |||||
<div class="container-div"> | <div class="container-div"> | ||||
<div class="piece"> | <div class="piece"> | ||||
<h2 style="font-weight: bold;" th:text="*{name}">姓名</h2> | <h2 style="font-weight: bold;" th:text="*{name}">姓名</h2> | ||||
@@ -98,7 +99,7 @@ | |||||
<div class="itemWrapper_yeNiB"> | <div class="itemWrapper_yeNiB"> | ||||
<dt class="basicInfoItem_aRc0i itemName_PqU2f">性 别</dt> | <dt class="basicInfoItem_aRc0i itemName_PqU2f">性 别</dt> | ||||
<dd class="basicInfoItem_aRc0i itemValue_OfJ1R"> | <dd class="basicInfoItem_aRc0i itemValue_OfJ1R"> | ||||
<span class="text_lqEdu" data-text="true" id="sex"></span> | |||||
<span class="text_lqEdu" data-text="true" th:text="*{sex}"></span> | |||||
</dd> | </dd> | ||||
</div> | </div> | ||||
<div class="itemWrapper_yeNiB"> | <div class="itemWrapper_yeNiB"> | ||||
@@ -122,7 +123,7 @@ | |||||
<div class="itemWrapper_yeNiB"> | <div class="itemWrapper_yeNiB"> | ||||
<dt class="basicInfoItem_aRc0i itemName_PqU2f">是否取得境外长期居留资格</dt> | <dt class="basicInfoItem_aRc0i itemName_PqU2f">是否取得境外长期居留资格</dt> | ||||
<dd class="basicInfoItem_aRc0i itemValue_OfJ1R"> | <dd class="basicInfoItem_aRc0i itemValue_OfJ1R"> | ||||
<span class="text_lqEdu" data-text="true" id="overseasResidencyStatus"></span> | |||||
<span class="text_lqEdu" data-text="true" th:text="*{overseasResidencyStatus}"></span> | |||||
</dd> | </dd> | ||||
</div> | </div> | ||||
</dl> | </dl> | ||||
@@ -193,17 +194,14 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div style="width: 25%;display: flex;justify-content: center;align-items: center;flex-direction: column;"> | <div style="width: 25%;display: flex;justify-content: center;align-items: center;flex-direction: column;"> | ||||
<div style="width: 45%;height: 80%;"><img style="width: 100%;height: 100%" src="../img/use/tx.png" /></div> | |||||
<div style="width: 60%;height: 20%;border: 1px solid grey;text-align: center;"> | |||||
<div>其他补充材料</div> | |||||
</div> | |||||
<div style="width: 45%;height: 100%;"><img style="width: 100%;height: 100%" th:src="*{photo}" /></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="piece" style="font-size: 16px;"> | <div class="piece" style="font-size: 16px;"> | ||||
<div style="display: flex;"> | <div style="display: flex;"> | ||||
<div class="marks"></div><h3>学历 学位</h3><span class="line"></span> | |||||
<div class="marks"></div><h3>学历 学位</h3><span style="flex: 0 0 calc(64% - 20px);" class="line"></span> | |||||
</div> | </div> | ||||
<div style="margin-left: 40px;border-bottom: 1px dashed grey;width: 75%;"> | |||||
<div style="margin-left: 40px;border-bottom: 1px dashed #DBDBDB;width: 75%;"> | |||||
<h3>全日制教育</h3> | <h3>全日制教育</h3> | ||||
<div style="display: flex;"> | <div style="display: flex;"> | ||||
<div class="education"> | <div class="education"> | ||||
@@ -220,7 +218,7 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div style="margin-left: 40px;border-bottom: 1px dashed grey;width: 75%;margin-top:10px;"> | |||||
<div style="margin-left: 40px;border-bottom: 1px dashed #DBDBDB;width: 75%;margin-top:10px;"> | |||||
<h3>在职教育</h3> | <h3>在职教育</h3> | ||||
<div style="display: flex;"> | <div style="display: flex;"> | ||||
<div class="education"> | <div class="education"> | ||||
@@ -245,27 +243,58 @@ | |||||
<div style="display: flex;"> | <div style="display: flex;"> | ||||
<div class="marks"></div><h3>简历</h3><span class="line"></span> | <div class="marks"></div><h3>简历</h3><span class="line"></span> | ||||
</div> | </div> | ||||
<div class="informationText" th:text="*{resume}"></div> | |||||
<div class="informationText"> | |||||
<div th:each="line1, iterStat1 : ${resumeLines}" | |||||
th:class="${iterStat1.even} ? 'multiLine-item bg-color-1' : 'multiLine-item bg-color-2'"> | |||||
<div th:each="line2,iterStat2:${line1}" | |||||
th:class="${iterStat2.even} ? 'right-content' : 'left-content'" th:text="${line2}"></div> | |||||
</div> | |||||
</div> | |||||
</div> | </div> | ||||
<div class="section" id="title2"> | <div class="section" id="title2"> | ||||
<div style="display: flex;"> | <div style="display: flex;"> | ||||
<div class="marks" style="width: 4px;"></div><h3>培训情况</h3><span class="line"></span> | <div class="marks" style="width: 4px;"></div><h3>培训情况</h3><span class="line"></span> | ||||
</div> | </div> | ||||
<div class="informationText" th:text="*{training}"></div> | |||||
<div class="informationText"> | |||||
<div th:each="line1 : ${trainingLines}" class="multiLine-item"> | |||||
<div th:each="line2,iterStat2:${line1}" | |||||
th:class="${iterStat2.even} ? 'right-content' : 'left-content'" th:text="${line2}"></div> | |||||
</div> | |||||
</div> | |||||
</div> | </div> | ||||
<div class="section" id="title3"> | <div class="section" id="title3"> | ||||
<div style="display: flex;"> | <div style="display: flex;"> | ||||
<div class="marks" style="width: 4px;"></div><h3>主要成就</h3><span class="line"></span> | <div class="marks" style="width: 4px;"></div><h3>主要成就</h3><span class="line"></span> | ||||
</div> | </div> | ||||
<div class="informationText" th:text="*{achievement}"></div> | |||||
<div class="informationText"> | |||||
<div th:each="line1 : ${achievementLines}" class="multiLine-item"> | |||||
<div th:each="line2,iterStat2:${line1}" | |||||
th:class="${iterStat2.even} ? 'right-content' : 'left-content'" th:text="${line2}"></div> | |||||
</div> | |||||
</div> | |||||
</div> | </div> | ||||
<div class="section" id="title4"> | <div class="section" id="title4"> | ||||
<div style="display: flex;"> | <div style="display: flex;"> | ||||
<div class="marks" style="width: 4px;"></div><h3>家庭成员</h3><span class="line"></span> | <div class="marks" style="width: 4px;"></div><h3>家庭成员</h3><span class="line"></span> | ||||
</div> | </div> | ||||
<div class="informationText"> | <div class="informationText"> | ||||
这是内容。这里是一些示例文本,内容可以很长,测试内容测试内容测试内容<br/> | |||||
测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试。 | |||||
<table style="width: 100%;"> | |||||
<tr> | |||||
<th colspan="2">称谓</th> | |||||
<th colspan="3">姓名</th> | |||||
<th colspan="2">出生年月</th> | |||||
<th colspan="3">政治面貌</th> | |||||
<th colspan="6">工作单位及职称</th> | |||||
</tr> | |||||
<tr class="" th:each="item,index: ${rwkStaffInformation.rwkFamilyMemberList}" | |||||
th:class="${index.even} ? 'bg-color-1' : 'bg-color-2'"> | |||||
<td colspan="2" th:text="${item.appellation}"></td> | |||||
<td colspan="3" th:text="${item.name}"></td> | |||||
<td colspan="2" th:text="${item.birthday}"></td> | |||||
<td colspan="3" th:text="${item.politicalStatus}"></td> | |||||
<td colspan="6" th:text="${item.unitJob}"></td> | |||||
</tr> | |||||
</table> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -283,15 +312,11 @@ | |||||
<th:block th:include="include :: footer" /> | <th:block th:include="include :: footer" /> | ||||
<script th:inline="javascript"> | <script th:inline="javascript"> | ||||
var prefix = ctx + "system/information"; | var prefix = ctx + "system/information"; | ||||
var sexData = [[${@dict.getType('sys_user_sex')}]]; | |||||
var overseasData = [[${@dict.getType('sys_yes_no')}]]; | |||||
rollingLinkage(); | rollingLinkage(); | ||||
init(); | init(); | ||||
//数据进行初始化加载 | //数据进行初始化加载 | ||||
function init(){ | function init(){ | ||||
//多选框进行数据赋值 | |||||
$("#sex").text($.table.selectDictLabelStr(sexData,[[${rwkStaffInformation.sex}]])); | |||||
$("#overseasResidencyStatus").text($.table.selectDictLabelStr(overseasData,[[${rwkStaffInformation.overseasResidencyStatus}]])); | |||||
} | } | ||||
function rollingLinkage(){ | function rollingLinkage(){ | ||||
@@ -1,5 +1,6 @@ | |||||
package com.rwk.system.domain; | package com.rwk.system.domain; | ||||
import java.util.List; | |||||
import org.apache.commons.lang3.builder.ToStringBuilder; | import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
import org.apache.commons.lang3.builder.ToStringStyle; | import org.apache.commons.lang3.builder.ToStringStyle; | ||||
import com.rwk.common.annotation.Excel; | import com.rwk.common.annotation.Excel; | ||||
@@ -9,7 +10,7 @@ import com.rwk.common.core.domain.BaseEntity; | |||||
* 人员信息对象 rwk_staff_information | * 人员信息对象 rwk_staff_information | ||||
* | * | ||||
* @author rick | * @author rick | ||||
* @date 2024-11-06 | |||||
* @date 2024-11-25 | |||||
*/ | */ | ||||
public class RwkStaffInformation extends BaseEntity | public class RwkStaffInformation extends BaseEntity | ||||
{ | { | ||||
@@ -198,6 +199,13 @@ public class RwkStaffInformation extends BaseEntity | |||||
@Excel(name = "家庭成员code") | @Excel(name = "家庭成员code") | ||||
private String familyMemberCode; | private String familyMemberCode; | ||||
/** 个人照片 */ | |||||
@Excel(name = "个人照片") | |||||
private String photo; | |||||
/** 家庭成员信息 */ | |||||
private List<RwkFamilyMember> rwkFamilyMemberList; | |||||
public void setId(Long id) | public void setId(Long id) | ||||
{ | { | ||||
this.id = id; | this.id = id; | ||||
@@ -658,6 +666,26 @@ public class RwkStaffInformation extends BaseEntity | |||||
return familyMemberCode; | return familyMemberCode; | ||||
} | } | ||||
public void setPhoto(String photo) | |||||
{ | |||||
this.photo = photo; | |||||
} | |||||
public String getPhoto() | |||||
{ | |||||
return photo; | |||||
} | |||||
public List<RwkFamilyMember> getRwkFamilyMemberList() | |||||
{ | |||||
return rwkFamilyMemberList; | |||||
} | |||||
public void setRwkFamilyMemberList(List<RwkFamilyMember> rwkFamilyMemberList) | |||||
{ | |||||
this.rwkFamilyMemberList = rwkFamilyMemberList; | |||||
} | |||||
@Override | @Override | ||||
public String toString() { | public String toString() { | ||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
@@ -711,6 +739,8 @@ public class RwkStaffInformation extends BaseEntity | |||||
.append("createBy", getCreateBy()) | .append("createBy", getCreateBy()) | ||||
.append("updateTime", getUpdateTime()) | .append("updateTime", getUpdateTime()) | ||||
.append("updateBy", getUpdateBy()) | .append("updateBy", getUpdateBy()) | ||||
.append("rwkFamilyMemberList", getRwkFamilyMemberList()) | |||||
.append("photo", getPhoto()) | |||||
.toString(); | .toString(); | ||||
} | } | ||||
} | } |
@@ -2,18 +2,19 @@ package com.rwk.system.mapper; | |||||
import java.util.List; | import java.util.List; | ||||
import com.rwk.system.domain.RwkStaffInformation; | import com.rwk.system.domain.RwkStaffInformation; | ||||
import com.rwk.system.domain.RwkFamilyMember; | |||||
/** | /** | ||||
* 人员信息Mapper接口 | * 人员信息Mapper接口 | ||||
* | |||||
* | |||||
* @author rick | * @author rick | ||||
* @date 2024-11-06 | |||||
* @date 2024-11-25 | |||||
*/ | */ | ||||
public interface RwkStaffInformationMapper | |||||
public interface RwkStaffInformationMapper | |||||
{ | { | ||||
/** | /** | ||||
* 查询人员信息 | * 查询人员信息 | ||||
* | |||||
* | |||||
* @param id 人员信息主键 | * @param id 人员信息主键 | ||||
* @return 人员信息 | * @return 人员信息 | ||||
*/ | */ | ||||
@@ -21,7 +22,7 @@ public interface RwkStaffInformationMapper | |||||
/** | /** | ||||
* 查询人员信息列表 | * 查询人员信息列表 | ||||
* | |||||
* | |||||
* @param rwkStaffInformation 人员信息 | * @param rwkStaffInformation 人员信息 | ||||
* @return 人员信息集合 | * @return 人员信息集合 | ||||
*/ | */ | ||||
@@ -29,7 +30,7 @@ public interface RwkStaffInformationMapper | |||||
/** | /** | ||||
* 新增人员信息 | * 新增人员信息 | ||||
* | |||||
* | |||||
* @param rwkStaffInformation 人员信息 | * @param rwkStaffInformation 人员信息 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@@ -37,7 +38,7 @@ public interface RwkStaffInformationMapper | |||||
/** | /** | ||||
* 修改人员信息 | * 修改人员信息 | ||||
* | |||||
* | |||||
* @param rwkStaffInformation 人员信息 | * @param rwkStaffInformation 人员信息 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@@ -45,7 +46,7 @@ public interface RwkStaffInformationMapper | |||||
/** | /** | ||||
* 删除人员信息 | * 删除人员信息 | ||||
* | |||||
* | |||||
* @param id 人员信息主键 | * @param id 人员信息主键 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@@ -53,9 +54,34 @@ public interface RwkStaffInformationMapper | |||||
/** | /** | ||||
* 批量删除人员信息 | * 批量删除人员信息 | ||||
* | |||||
* | |||||
* @param ids 需要删除的数据主键集合 | * @param ids 需要删除的数据主键集合 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
public int deleteRwkStaffInformationByIds(String[] ids); | public int deleteRwkStaffInformationByIds(String[] ids); | ||||
/** | |||||
* 批量删除家庭成员 | |||||
* | |||||
* @param ids 需要删除的数据主键集合 | |||||
* @return 结果 | |||||
*/ | |||||
public int deleteRwkFamilyMemberByFamilyMemberCodes(String[] ids); | |||||
/** | |||||
* 批量新增家庭成员 | |||||
* | |||||
* @param rwkFamilyMemberList 家庭成员列表 | |||||
* @return 结果 | |||||
*/ | |||||
public int batchRwkFamilyMember(List<RwkFamilyMember> rwkFamilyMemberList); | |||||
/** | |||||
* 通过人员信息主键删除家庭成员信息 | |||||
* | |||||
* @param id 人员信息ID | |||||
* @return 结果 | |||||
*/ | |||||
public int deleteRwkFamilyMemberByFamilyMemberCode(Long id); | |||||
} | } |
@@ -5,15 +5,15 @@ import com.rwk.system.domain.RwkStaffInformation; | |||||
/** | /** | ||||
* 人员信息Service接口 | * 人员信息Service接口 | ||||
* | |||||
* | |||||
* @author rick | * @author rick | ||||
* @date 2024-11-06 | |||||
* @date 2024-11-25 | |||||
*/ | */ | ||||
public interface IRwkStaffInformationService | |||||
public interface IRwkStaffInformationService | |||||
{ | { | ||||
/** | /** | ||||
* 查询人员信息 | * 查询人员信息 | ||||
* | |||||
* | |||||
* @param id 人员信息主键 | * @param id 人员信息主键 | ||||
* @return 人员信息 | * @return 人员信息 | ||||
*/ | */ | ||||
@@ -21,7 +21,7 @@ public interface IRwkStaffInformationService | |||||
/** | /** | ||||
* 查询人员信息列表 | * 查询人员信息列表 | ||||
* | |||||
* | |||||
* @param rwkStaffInformation 人员信息 | * @param rwkStaffInformation 人员信息 | ||||
* @return 人员信息集合 | * @return 人员信息集合 | ||||
*/ | */ | ||||
@@ -29,7 +29,7 @@ public interface IRwkStaffInformationService | |||||
/** | /** | ||||
* 新增人员信息 | * 新增人员信息 | ||||
* | |||||
* | |||||
* @param rwkStaffInformation 人员信息 | * @param rwkStaffInformation 人员信息 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@@ -37,7 +37,7 @@ public interface IRwkStaffInformationService | |||||
/** | /** | ||||
* 修改人员信息 | * 修改人员信息 | ||||
* | |||||
* | |||||
* @param rwkStaffInformation 人员信息 | * @param rwkStaffInformation 人员信息 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@@ -45,7 +45,7 @@ public interface IRwkStaffInformationService | |||||
/** | /** | ||||
* 批量删除人员信息 | * 批量删除人员信息 | ||||
* | |||||
* | |||||
* @param ids 需要删除的人员信息主键集合 | * @param ids 需要删除的人员信息主键集合 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@@ -53,7 +53,7 @@ public interface IRwkStaffInformationService | |||||
/** | /** | ||||
* 删除人员信息信息 | * 删除人员信息信息 | ||||
* | |||||
* | |||||
* @param id 人员信息主键 | * @param id 人员信息主键 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@@ -3,6 +3,10 @@ package com.rwk.system.service.impl; | |||||
import java.util.List; | import java.util.List; | ||||
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
import java.util.ArrayList; | |||||
import com.rwk.common.utils.StringUtils; | |||||
import org.springframework.transaction.annotation.Transactional; | |||||
import com.rwk.system.domain.RwkFamilyMember; | |||||
import com.rwk.system.mapper.RwkStaffInformationMapper; | import com.rwk.system.mapper.RwkStaffInformationMapper; | ||||
import com.rwk.system.domain.RwkStaffInformation; | import com.rwk.system.domain.RwkStaffInformation; | ||||
import com.rwk.system.service.IRwkStaffInformationService; | import com.rwk.system.service.IRwkStaffInformationService; | ||||
@@ -10,19 +14,19 @@ import com.rwk.common.core.text.Convert; | |||||
/** | /** | ||||
* 人员信息Service业务层处理 | * 人员信息Service业务层处理 | ||||
* | |||||
* | |||||
* @author rick | * @author rick | ||||
* @date 2024-11-06 | |||||
* @date 2024-11-25 | |||||
*/ | */ | ||||
@Service | @Service | ||||
public class RwkStaffInformationServiceImpl implements IRwkStaffInformationService | |||||
public class RwkStaffInformationServiceImpl implements IRwkStaffInformationService | |||||
{ | { | ||||
@Autowired | @Autowired | ||||
private RwkStaffInformationMapper rwkStaffInformationMapper; | private RwkStaffInformationMapper rwkStaffInformationMapper; | ||||
/** | /** | ||||
* 查询人员信息 | * 查询人员信息 | ||||
* | |||||
* | |||||
* @param id 人员信息主键 | * @param id 人员信息主键 | ||||
* @return 人员信息 | * @return 人员信息 | ||||
*/ | */ | ||||
@@ -34,7 +38,7 @@ public class RwkStaffInformationServiceImpl implements IRwkStaffInformationServi | |||||
/** | /** | ||||
* 查询人员信息列表 | * 查询人员信息列表 | ||||
* | |||||
* | |||||
* @param rwkStaffInformation 人员信息 | * @param rwkStaffInformation 人员信息 | ||||
* @return 人员信息 | * @return 人员信息 | ||||
*/ | */ | ||||
@@ -46,49 +50,96 @@ public class RwkStaffInformationServiceImpl implements IRwkStaffInformationServi | |||||
/** | /** | ||||
* 新增人员信息 | * 新增人员信息 | ||||
* | |||||
* | |||||
* @param rwkStaffInformation 人员信息 | * @param rwkStaffInformation 人员信息 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@Transactional | |||||
@Override | @Override | ||||
public int insertRwkStaffInformation(RwkStaffInformation rwkStaffInformation) | public int insertRwkStaffInformation(RwkStaffInformation rwkStaffInformation) | ||||
{ | { | ||||
return rwkStaffInformationMapper.insertRwkStaffInformation(rwkStaffInformation); | |||||
int rows = rwkStaffInformationMapper.insertRwkStaffInformation(rwkStaffInformation); | |||||
insertRwkFamilyMember(rwkStaffInformation); | |||||
return rows; | |||||
} | } | ||||
/** | /** | ||||
* 修改人员信息 | * 修改人员信息 | ||||
* | |||||
* | |||||
* @param rwkStaffInformation 人员信息 | * @param rwkStaffInformation 人员信息 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@Transactional | |||||
@Override | @Override | ||||
public int updateRwkStaffInformation(RwkStaffInformation rwkStaffInformation) | public int updateRwkStaffInformation(RwkStaffInformation rwkStaffInformation) | ||||
{ | { | ||||
rwkStaffInformationMapper.deleteRwkFamilyMemberByFamilyMemberCode(rwkStaffInformation.getId()); | |||||
insertRwkFamilyMember(rwkStaffInformation); | |||||
return rwkStaffInformationMapper.updateRwkStaffInformation(rwkStaffInformation); | return rwkStaffInformationMapper.updateRwkStaffInformation(rwkStaffInformation); | ||||
} | } | ||||
/** | /** | ||||
* 批量删除人员信息 | * 批量删除人员信息 | ||||
* | |||||
* | |||||
* @param ids 需要删除的人员信息主键 | * @param ids 需要删除的人员信息主键 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@Transactional | |||||
@Override | @Override | ||||
public int deleteRwkStaffInformationByIds(String ids) | public int deleteRwkStaffInformationByIds(String ids) | ||||
{ | { | ||||
rwkStaffInformationMapper.deleteRwkFamilyMemberByFamilyMemberCodes(Convert.toStrArray(ids)); | |||||
return rwkStaffInformationMapper.deleteRwkStaffInformationByIds(Convert.toStrArray(ids)); | return rwkStaffInformationMapper.deleteRwkStaffInformationByIds(Convert.toStrArray(ids)); | ||||
} | } | ||||
/** | /** | ||||
* 删除人员信息信息 | * 删除人员信息信息 | ||||
* | |||||
* | |||||
* @param id 人员信息主键 | * @param id 人员信息主键 | ||||
* @return 结果 | * @return 结果 | ||||
*/ | */ | ||||
@Transactional | |||||
@Override | @Override | ||||
public int deleteRwkStaffInformationById(Long id) | |||||
{ | |||||
public int deleteRwkStaffInformationById(Long id) { | |||||
rwkStaffInformationMapper.deleteRwkFamilyMemberByFamilyMemberCode(id); | |||||
return rwkStaffInformationMapper.deleteRwkStaffInformationById(id); | return rwkStaffInformationMapper.deleteRwkStaffInformationById(id); | ||||
} | } | ||||
/** | |||||
* 新增家庭成员信息 | |||||
* | |||||
* @param rwkStaffInformation 人员信息对象 | |||||
*/ | |||||
public void insertRwkFamilyMember(RwkStaffInformation rwkStaffInformation) | |||||
{ | |||||
List<RwkFamilyMember> rwkFamilyMemberList = rwkStaffInformation.getRwkFamilyMemberList(); | |||||
String familyMemberCode = rwkStaffInformation.getFamilyMemberCode(); | |||||
if (StringUtils.isNotNull(rwkFamilyMemberList)) { | |||||
List<RwkFamilyMember> list = new ArrayList<>(); | |||||
for (RwkFamilyMember rwkFamilyMember : rwkFamilyMemberList) { | |||||
if (emptyJudge(rwkFamilyMember)) { | |||||
rwkFamilyMember.setFamilyMemberCode(familyMemberCode); | |||||
list.add(rwkFamilyMember); | |||||
} | |||||
} | |||||
if (!list.isEmpty()) { | |||||
rwkStaffInformationMapper.batchRwkFamilyMember(list); | |||||
} | |||||
} | |||||
} | |||||
private boolean emptyJudge(RwkFamilyMember rwkFamilyMember){ | |||||
boolean flag = true; | |||||
int emptyCount = 0; | |||||
// 检查每个字段是否为空 | |||||
if (rwkFamilyMember.getName() == null || rwkFamilyMember.getName().isEmpty()) emptyCount++; | |||||
if (rwkFamilyMember.getAppellation() == null || rwkFamilyMember.getAppellation().isEmpty()) emptyCount++; | |||||
if (rwkFamilyMember.getBirthday() == null || rwkFamilyMember.getBirthday().isEmpty()) emptyCount++; | |||||
if (rwkFamilyMember.getPoliticalStatus() == null || rwkFamilyMember.getPoliticalStatus().isEmpty()) emptyCount++; | |||||
if (rwkFamilyMember.getUnitJob() == null || rwkFamilyMember.getUnitJob().isEmpty()) emptyCount++; | |||||
if (emptyCount >= 3) { | |||||
flag = false; | |||||
} | |||||
return flag; | |||||
} | |||||
} | } |
@@ -55,10 +55,31 @@ | |||||
<result property="createBy" column="create_by" /> | <result property="createBy" column="create_by" /> | ||||
<result property="updateTime" column="update_time" /> | <result property="updateTime" column="update_time" /> | ||||
<result property="updateBy" column="update_by" /> | <result property="updateBy" column="update_by" /> | ||||
<result property="photo" column="photo" /> | |||||
</resultMap> | |||||
<resultMap id="RwkStaffInformationRwkFamilyMemberResult" type="RwkStaffInformation" extends="RwkStaffInformationResult"> | |||||
<collection property="rwkFamilyMemberList" ofType="RwkFamilyMember" column="family_member_code" select="selectRwkFamilyMemberList" /> | |||||
</resultMap> | |||||
<resultMap type="RwkFamilyMember" id="RwkFamilyMemberResult"> | |||||
<result property="id" column="id" /> | |||||
<result property="appellation" column="appellation" /> | |||||
<result property="name" column="name" /> | |||||
<result property="birthday" column="birthday" /> | |||||
<result property="politicalStatus" column="political_status" /> | |||||
<result property="unitJob" column="unit_job" /> | |||||
<result property="familyMemberCode" column="family_member_code" /> | |||||
</resultMap> | </resultMap> | ||||
<sql id="selectRwkStaffInformationVo"> | <sql id="selectRwkStaffInformationVo"> | ||||
select id, name, sex, nation, nationality, birthday, birthplace, native_place, overseas_residency_status, acquiring_country, id_number, work_time, id_card, party, party_positions, join_time, talent_category, religion, current_occupation, zlh_job, qrz_school_major, qrz_qualification, qrz_degree, zz_school_major, zz_qualification, zz_degree, unit_job, technical_title, speciality, unit_attribute, job_level, current_tenure, unit_address, unit_phone, unit_zip_code, home_address, home_phone, home_zip_code, email, mobile_phone, wx_code, hobby, resume, training, achievement, family_member_code, create_time, create_by, update_time, update_by from rwk_staff_information | |||||
select id, name, sex, nation, nationality, birthday, birthplace, native_place, overseas_residency_status, | |||||
acquiring_country, id_number, work_time, id_card, party, party_positions, join_time, talent_category, | |||||
religion, current_occupation, zlh_job, qrz_school_major, qrz_qualification, qrz_degree, zz_school_major, | |||||
zz_qualification, zz_degree, unit_job, technical_title, speciality, unit_attribute, job_level, current_tenure, | |||||
unit_address, unit_phone, unit_zip_code, home_address, home_phone, home_zip_code, email, mobile_phone, | |||||
wx_code, hobby, resume, training, achievement, family_member_code, create_time, create_by, update_time, | |||||
update_by, photo from rwk_staff_information | |||||
</sql> | </sql> | ||||
<select id="selectRwkStaffInformationList" parameterType="RwkStaffInformation" resultMap="RwkStaffInformationResult"> | <select id="selectRwkStaffInformationList" parameterType="RwkStaffInformation" resultMap="RwkStaffInformationResult"> | ||||
@@ -109,14 +130,27 @@ | |||||
<if test="training != null and training != ''"> and training = #{training}</if> | <if test="training != null and training != ''"> and training = #{training}</if> | ||||
<if test="achievement != null and achievement != ''"> and achievement = #{achievement}</if> | <if test="achievement != null and achievement != ''"> and achievement = #{achievement}</if> | ||||
<if test="familyMemberCode != null and familyMemberCode != ''"> and family_member_code = #{familyMemberCode}</if> | <if test="familyMemberCode != null and familyMemberCode != ''"> and family_member_code = #{familyMemberCode}</if> | ||||
<if test="photo != null and photo != ''"> and photo = #{photo}</if> | |||||
</where> | </where> | ||||
</select> | </select> | ||||
<select id="selectRwkStaffInformationById" parameterType="Long" resultMap="RwkStaffInformationResult"> | |||||
<include refid="selectRwkStaffInformationVo"/> | |||||
<select id="selectRwkStaffInformationById" parameterType="Long" resultMap="RwkStaffInformationRwkFamilyMemberResult"> | |||||
select id, name, sex, nation, nationality, birthday, birthplace, native_place, overseas_residency_status, | |||||
acquiring_country, id_number, work_time, id_card, party, party_positions, join_time, talent_category, | |||||
religion, current_occupation, zlh_job, qrz_school_major, qrz_qualification, qrz_degree, zz_school_major, | |||||
zz_qualification, zz_degree, unit_job, technical_title, speciality, unit_attribute, job_level, current_tenure, | |||||
unit_address, unit_phone, unit_zip_code, home_address, home_phone, home_zip_code, email, mobile_phone, wx_code, | |||||
hobby, resume, training, achievement, family_member_code, create_time, create_by, update_time, update_by, photo | |||||
from rwk_staff_information | |||||
where id = #{id} | where id = #{id} | ||||
</select> | </select> | ||||
<select id="selectRwkFamilyMemberList" resultMap="RwkFamilyMemberResult"> | |||||
select id, appellation, name, birthday, political_status, unit_job, family_member_code | |||||
from rwk_family_member | |||||
where family_member_code = #{family_member_code} | |||||
</select> | |||||
<insert id="insertRwkStaffInformation" parameterType="RwkStaffInformation" useGeneratedKeys="true" keyProperty="id"> | <insert id="insertRwkStaffInformation" parameterType="RwkStaffInformation" useGeneratedKeys="true" keyProperty="id"> | ||||
insert into rwk_staff_information | insert into rwk_staff_information | ||||
<trim prefix="(" suffix=")" suffixOverrides=","> | <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
@@ -169,6 +203,7 @@ | |||||
<if test="createBy != null">create_by,</if> | <if test="createBy != null">create_by,</if> | ||||
<if test="updateTime != null">update_time,</if> | <if test="updateTime != null">update_time,</if> | ||||
<if test="updateBy != null">update_by,</if> | <if test="updateBy != null">update_by,</if> | ||||
<if test="photo != null">photo,</if> | |||||
</trim> | </trim> | ||||
<trim prefix="values (" suffix=")" suffixOverrides=","> | <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
<if test="name != null">#{name},</if> | <if test="name != null">#{name},</if> | ||||
@@ -220,6 +255,7 @@ | |||||
<if test="createBy != null">#{createBy},</if> | <if test="createBy != null">#{createBy},</if> | ||||
<if test="updateTime != null">#{updateTime},</if> | <if test="updateTime != null">#{updateTime},</if> | ||||
<if test="updateBy != null">#{updateBy},</if> | <if test="updateBy != null">#{updateBy},</if> | ||||
<if test="photo != null">#{photo},</if> | |||||
</trim> | </trim> | ||||
</insert> | </insert> | ||||
@@ -275,6 +311,7 @@ | |||||
<if test="createBy != null">create_by = #{createBy},</if> | <if test="createBy != null">create_by = #{createBy},</if> | ||||
<if test="updateTime != null">update_time = #{updateTime},</if> | <if test="updateTime != null">update_time = #{updateTime},</if> | ||||
<if test="updateBy != null">update_by = #{updateBy},</if> | <if test="updateBy != null">update_by = #{updateBy},</if> | ||||
<if test="photo != null">photo = #{photo},</if> | |||||
</trim> | </trim> | ||||
where id = #{id} | where id = #{id} | ||||
</update> | </update> | ||||
@@ -290,4 +327,24 @@ | |||||
</foreach> | </foreach> | ||||
</delete> | </delete> | ||||
<delete id="deleteRwkFamilyMemberByFamilyMemberCodes" parameterType="String"> | |||||
delete from rwk_family_member where family_member_code in | |||||
(select family_member_code from rwk_staff_information where id in | |||||
<foreach item="id" collection="array" open="(" separator="," close=")"> | |||||
#{id} | |||||
</foreach>) | |||||
</delete> | |||||
<delete id="deleteRwkFamilyMemberByFamilyMemberCode" parameterType="Long"> | |||||
delete from rwk_family_member where family_member_code = | |||||
(select family_member_code from rwk_staff_information where id = #{id}) | |||||
</delete> | |||||
<insert id="batchRwkFamilyMember"> | |||||
insert into rwk_family_member(appellation, name, birthday, political_status, unit_job, family_member_code) values | |||||
<foreach item="item" index="index" collection="list" separator=","> | |||||
(#{item.appellation}, #{item.name}, #{item.birthday}, #{item.politicalStatus}, #{item.unitJob}, #{item.familyMemberCode}) | |||||
</foreach> | |||||
</insert> | |||||
</mapper> | </mapper> |