Commit 3c7aaea5 authored by xulihui's avatar xulihui

从业人员添加工种、职称、是否管理角色、是否特种作业人员,添加“其他证书”附件上传功能,新增复检超期提示

parent a80e811c
...@@ -63,6 +63,25 @@ public class TEmployedPeopleInfo extends BaseEntity ...@@ -63,6 +63,25 @@ public class TEmployedPeopleInfo extends BaseEntity
/** 头像地址 */ /** 头像地址 */
private String avatarAddress; private String avatarAddress;
/** 工种 */
@Excel(name = "工种")
private String workType;
/** 职称 */
@Excel(name = "职称")
private String professionalTitle;
/** 是否管理角色(0否 1是) */
@Excel(name = "是否管理角色", readConverterExp = "0=否,1=是")
private String isManagementRole;
/** 是否特种作业人员(0否 1是) */
@Excel(name = "是否特种作业人员", readConverterExp = "0=否,1=是")
private String isSpecialOperation;
/** 其他证书地址 */
private String otherCertificate;
private String searchKeyword; private String searchKeyword;
public String getSearchKeyword() { public String getSearchKeyword() {
...@@ -81,6 +100,46 @@ public class TEmployedPeopleInfo extends BaseEntity ...@@ -81,6 +100,46 @@ public class TEmployedPeopleInfo extends BaseEntity
this.avatarAddress = avatarAddress; this.avatarAddress = avatarAddress;
} }
public String getWorkType() {
return workType;
}
public void setWorkType(String workType) {
this.workType = workType;
}
public String getProfessionalTitle() {
return professionalTitle;
}
public void setProfessionalTitle(String professionalTitle) {
this.professionalTitle = professionalTitle;
}
public String getIsManagementRole() {
return isManagementRole;
}
public void setIsManagementRole(String isManagementRole) {
this.isManagementRole = isManagementRole;
}
public String getIsSpecialOperation() {
return isSpecialOperation;
}
public void setIsSpecialOperation(String isSpecialOperation) {
this.isSpecialOperation = isSpecialOperation;
}
public String getOtherCertificate() {
return otherCertificate;
}
public void setOtherCertificate(String otherCertificate) {
this.otherCertificate = otherCertificate;
}
public void setEmployedPeopleId(Long employedPeopleId) public void setEmployedPeopleId(Long employedPeopleId)
{ {
this.employedPeopleId = employedPeopleId; this.employedPeopleId = employedPeopleId;
...@@ -209,6 +268,11 @@ public class TEmployedPeopleInfo extends BaseEntity ...@@ -209,6 +268,11 @@ public class TEmployedPeopleInfo extends BaseEntity
", isDel='" + isDel + '\'' + ", isDel='" + isDel + '\'' +
", remarks='" + remarks + '\'' + ", remarks='" + remarks + '\'' +
", avatarAddress='" + avatarAddress + '\'' + ", avatarAddress='" + avatarAddress + '\'' +
", workType='" + workType + '\'' +
", professionalTitle='" + professionalTitle + '\'' +
", isManagementRole='" + isManagementRole + '\'' +
", isSpecialOperation='" + isSpecialOperation + '\'' +
", otherCertificate='" + otherCertificate + '\'' +
'}'; '}';
} }
} }
...@@ -22,6 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -22,6 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="workType" column="work_type" />
<result property="professionalTitle" column="professional_title" />
<result property="isManagementRole" column="is_management_role" />
<result property="isSpecialOperation" column="is_special_operation" />
<result property="otherCertificate" column="other_certificate" />
</resultMap> </resultMap>
<resultMap type="TEnterpriseInfo" id="TEnterpriseInfoResult"> <resultMap type="TEnterpriseInfo" id="TEnterpriseInfoResult">
...@@ -45,11 +50,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -45,11 +50,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, (CASE people_occupation WHEN '1' THEN '主要负责人' WHEN '2' THEN '安全管理人员' WHEN '3' THEN '运行维护和抢修人员'end ) as people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info--> <!-- select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, (CASE people_occupation WHEN '1' THEN '主要负责人' WHEN '2' THEN '安全管理人员' WHEN '3' THEN '运行维护和抢修人员'end ) as people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info-->
<!-- </sql>--> <!-- </sql>-->
<sql id="selectTEmployedPeopleInfoVo"> <sql id="selectTEmployedPeopleInfoVo">
select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks, work_type, professional_title, is_management_role, is_special_operation, other_certificate from t_employed_people_info
</sql> </sql>
<select id="selectTEmployedPeopleInfoList" parameterType="TEmployedPeopleInfo" resultMap="TEmployedPeopleInfoResult"> <select id="selectTEmployedPeopleInfoList" parameterType="TEmployedPeopleInfo" resultMap="TEmployedPeopleInfoResult">
select employed_people_id, employed_people_name,avatar_address, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type,people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info select employed_people_id, employed_people_name, avatar_address, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks, work_type, professional_title, is_management_role, is_special_operation, other_certificate from t_employed_people_info
<where> <where>
1=1 and is_del='0' 1=1 and is_del='0'
<if test="searchKeyword!=null and searchKeyword!=''"> and (employed_people_name like concat('%', #{searchKeyword}, '%') or id_card like concat('%', #{searchKeyword}, '%'))</if> <if test="searchKeyword!=null and searchKeyword!=''"> and (employed_people_name like concat('%', #{searchKeyword}, '%') or id_card like concat('%', #{searchKeyword}, '%'))</if>
...@@ -62,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -62,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectTEmployedPeopleInfoById" parameterType="Long" resultMap="TEmployedPeopleInfoResult"> <select id="selectTEmployedPeopleInfoById" parameterType="Long" resultMap="TEmployedPeopleInfoResult">
select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks,avatar_address from t_employed_people_info select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks, avatar_address, work_type, professional_title, is_management_role, is_special_operation, other_certificate from t_employed_people_info
where employed_people_id = #{employedPeopleId} and is_del='0' where employed_people_id = #{employedPeopleId} and is_del='0'
</select> </select>
...@@ -85,6 +90,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -85,6 +90,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null">is_del,</if> <if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if> <if test="remarks != null">remarks,</if>
<if test="avatarAddress != null">avatar_address,</if> <if test="avatarAddress != null">avatar_address,</if>
<if test="workType != null">work_type,</if>
<if test="professionalTitle != null">professional_title,</if>
<if test="isManagementRole != null">is_management_role,</if>
<if test="isSpecialOperation != null">is_special_operation,</if>
<if test="otherCertificate != null">other_certificate,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="employedPeopleName != null">#{employedPeopleName},</if> <if test="employedPeopleName != null">#{employedPeopleName},</if>
...@@ -103,6 +113,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -103,6 +113,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if> <if test="remarks != null">#{remarks},</if>
<if test="avatarAddress != null">#{avatarAddress},</if> <if test="avatarAddress != null">#{avatarAddress},</if>
<if test="workType != null">#{workType},</if>
<if test="professionalTitle != null">#{professionalTitle},</if>
<if test="isManagementRole != null">#{isManagementRole},</if>
<if test="isSpecialOperation != null">#{isSpecialOperation},</if>
<if test="otherCertificate != null">#{otherCertificate},</if>
</trim> </trim>
</insert> </insert>
...@@ -125,6 +140,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -125,6 +140,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null">is_del = #{isDel},</if> <if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
<if test="avatarAddress != null">avatar_address = #{avatarAddress},</if> <if test="avatarAddress != null">avatar_address = #{avatarAddress},</if>
<if test="workType != null">work_type = #{workType},</if>
<if test="professionalTitle != null">professional_title = #{professionalTitle},</if>
<if test="isManagementRole != null">is_management_role = #{isManagementRole},</if>
<if test="isSpecialOperation != null">is_special_operation = #{isSpecialOperation},</if>
<if test="otherCertificate != null">other_certificate = #{otherCertificate},</if>
</trim> </trim>
where employed_people_id = #{employedPeopleId} where employed_people_id = #{employedPeopleId}
</update> </update>
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<span v-else>-</span> <span v-else>-</span>
</el-table-column> </el-table-column>
<el-table-column label="复检日期" align="center" prop="certificateChange" > <el-table-column label="复检日期" align="center" prop="certificateChange" >
<span slot-scope="scope" v-if="scope.row.certificateChange">{{scope.row.certificateChange}}</span> <span slot-scope="scope" v-if="scope.row.certificateChange" :style="getCertificateChangeStyle(scope.row.certificateChange)">{{scope.row.certificateChange}}</span>
<span v-else>-</span> <span v-else>-</span>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remarks" > <el-table-column label="备注" align="center" prop="remarks" >
...@@ -161,7 +161,6 @@ ...@@ -161,7 +161,6 @@
<!-- <i class="el-icon el-icon-view"></i>查看/下载--> <!-- <i class="el-icon el-icon-view"></i>查看/下载-->
<!-- </span>--> <!-- </span>-->
<!-- <span v-else>-</span>--> <!-- <span v-else>-</span>-->
<!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -300,6 +299,53 @@ ...@@ -300,6 +299,53 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="11">
<el-form-item label="工种" prop="workType">
<el-input v-model="form.workType" placeholder="请输入工种" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="职称" prop="professionalTitle">
<el-input v-model="form.professionalTitle" placeholder="请输入职称" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="是否管理角色" prop="isManagementRole">
<el-radio-group v-model="form.isManagementRole">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否特种作业人员" prop="isSpecialOperation">
<el-radio-group v-model="form.isSpecialOperation">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="其他证书">
<FileUpload
list-type="text"
@resFun="getOtherCertificateInfo"
@remove="removeOtherCertificate"
:file-arr="otherCertificateList">
</FileUpload>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="23"> <el-col :span="23">
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarks">
...@@ -421,7 +467,55 @@ ...@@ -421,7 +467,55 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="复检日期"> <el-form-item label="复检日期">
<span>{{ viewForm.certificateChange || '-' }}</span> <span :style="getCertificateChangeStyle(viewForm.certificateChange)">{{ viewForm.certificateChange || '-' }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="工种">
<span>{{ viewForm.workType || '-' }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="职称">
<span>{{ viewForm.professionalTitle || '-' }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="是否管理角色">
<span>{{ viewForm.isManagementRole === '1' || viewForm.isManagementRole === 1 ? '是' : '否' }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否特种作业人员">
<span>{{ viewForm.isSpecialOperation === '1' || viewForm.isSpecialOperation === 1 ? '是' : '否' }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="viewForm.otherCertificate">
<el-col :span="24">
<el-form-item label="其他证书">
<div style="display: flex; flex-wrap: wrap; gap: 10px;">
<div v-for="(url, index) in viewOtherCertificates(viewForm.otherCertificate)" :key="index" style="position: relative;">
<img :src="url" style="width: 150px; height: 150px; object-fit: cover; cursor: pointer; border: 1px solid #dcdfe6; border-radius: 4px;" @click="checkFile(url)">
</div>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row v-else>
<el-col :span="23">
<el-form-item label="其他证书">
<span v-if="viewForm.otherCertificate">
<el-link type="primary" @click="checkFile(viewForm.otherCertificate)">查看/下载</el-link>
</span>
<span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -523,6 +617,8 @@ export default { ...@@ -523,6 +617,8 @@ export default {
fileo :{ fileo :{
name: "", name: "",
url:"" }, url:"" },
// 其他证书文件列表
otherCertificateList: [],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -727,9 +823,57 @@ export default { ...@@ -727,9 +823,57 @@ export default {
this.form.dealPlan = ""; this.form.dealPlan = "";
this.fileList = []; this.fileList = [];
}, },
/**上传其他证书*/
getOtherCertificateInfo(res) {
if (!this.form.otherCertificate) {
this.form.otherCertificate = res.url;
} else {
this.form.otherCertificate += ';' + res.url;
}
this.otherCertificateList.push({
name: res.fileName,
url: res.url,
});
},
removeOtherCertificate(file) {
if (file && file.url) {
const urlToRemove = file.url;
const certificates = this.form.otherCertificate ? this.form.otherCertificate.split(';').filter(url => url) : [];
const updatedCertificates = certificates.filter(url => url !== urlToRemove);
this.form.otherCertificate = updatedCertificates.join(';');
const index = this.otherCertificateList.findIndex(item => item.url === urlToRemove);
if (index > -1) {
this.otherCertificateList.splice(index, 1);
}
} else {
this.form.otherCertificate = '';
this.otherCertificateList = [];
}
},
checkFile(url) { checkFile(url) {
window.open(url,'_blank'); window.open(url,'_blank');
}, },
/**查看多个其他证书*/
viewOtherCertificates(certificatesStr) {
if (!certificatesStr) return [];
return certificatesStr.split(';').filter(url => url);
},
/**判断复检日期是否需要红色标识*/
getCertificateChangeStyle(dateStr) {
if (!dateStr) {
return {};
}
const certificateDate = new Date(dateStr);
const now = new Date();
const oneMonthLater = new Date();
oneMonthLater.setMonth(now.getMonth() + 1);
if (certificateDate <= oneMonthLater) {
return { color: '#f56c6c', fontWeight: 'bold' };
}
return {};
},
/** 查询变更记录列表 */ /** 查询变更记录列表 */
getChangelogList(row) { getChangelogList(row) {
if (row && row.employedPeopleId) { if (row && row.employedPeopleId) {
...@@ -778,9 +922,15 @@ export default { ...@@ -778,9 +922,15 @@ export default {
isDel: null, isDel: null,
remarks: null, remarks: null,
avatarAddress:null, avatarAddress:null,
workType: null,
professionalTitle: null,
isManagementRole: '0',
isSpecialOperation: '0',
otherCertificate: null,
}; };
this.resetForm("form"); this.resetForm("form");
this.fileList = []; this.fileList = [];
this.otherCertificateList = [];
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
...@@ -833,6 +983,16 @@ export default { ...@@ -833,6 +983,16 @@ export default {
url: this.form.avatarAddress, url: this.form.avatarAddress,
}); });
} }
// 其他证书回显(支持多个)
if (this.form.otherCertificate) {
const certificates = this.form.otherCertificate.split(';').filter(url => url);
certificates.forEach((url, index) => {
this.otherCertificateList.push({
name: `其他证书${index + 1}`,
url: url,
});
});
}
this.open = true; this.open = true;
this.title = "修改从业人员信息"; this.title = "修改从业人员信息";
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment