Commit 2abf4f95 authored by wanghao's avatar wanghao

1 安全台账-安全装置台账 去掉身份证号信息,及把 装置类型展示列表中。

parent 14b138a0
...@@ -329,11 +329,6 @@ public class TDetectorUserController extends BaseController ...@@ -329,11 +329,6 @@ public class TDetectorUserController extends BaseController
file = ResourceUtils.getFile("/data/java/baseversion/importTemplate/燃气用户错误导入数据模版.xlsx"); file = ResourceUtils.getFile("/data/java/baseversion/importTemplate/燃气用户错误导入数据模版.xlsx");
} }
InputStream inp = new FileInputStream(file);
// 获取文件名
String filename = file.getName();
List<TDetectorUser> tDetectorUsers = tDetectorUserService.queryErrorDetectorUserList(); List<TDetectorUser> tDetectorUsers = tDetectorUserService.queryErrorDetectorUserList();
List<UserManageGasUserExportVo> userManageGasUserExportVos = new ArrayList<>(); List<UserManageGasUserExportVo> userManageGasUserExportVos = new ArrayList<>();
......
...@@ -33,7 +33,6 @@ public class TSafeEquipmentStandingBook extends BaseEntity ...@@ -33,7 +33,6 @@ public class TSafeEquipmentStandingBook extends BaseEntity
private String userAddress; private String userAddress;
/** 身份证号 */ /** 身份证号 */
@Excel(name = "身份证号")
private String idCard; private String idCard;
/** 联系电话 */ /** 联系电话 */
...@@ -43,6 +42,9 @@ public class TSafeEquipmentStandingBook extends BaseEntity ...@@ -43,6 +42,9 @@ public class TSafeEquipmentStandingBook extends BaseEntity
/** 安全装置类型 */ /** 安全装置类型 */
private String equipmentType; private String equipmentType;
@Excel(name = "安全装置")
private String equipmentTypeExplainDict;
/** 安装时间 */ /** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
...@@ -202,6 +204,14 @@ public class TSafeEquipmentStandingBook extends BaseEntity ...@@ -202,6 +204,14 @@ public class TSafeEquipmentStandingBook extends BaseEntity
this.enterpriseName = enterpriseName; this.enterpriseName = enterpriseName;
} }
public String getEquipmentTypeExplainDict() {
return equipmentTypeExplainDict;
}
public void setEquipmentTypeExplainDict(String equipmentTypeExplainDict) {
this.equipmentTypeExplainDict = equipmentTypeExplainDict;
}
@Override @Override
public String toString() { public String toString() {
return "TSafeEquipmentStandingBook{" + return "TSafeEquipmentStandingBook{" +
......
...@@ -4,8 +4,10 @@ import java.util.List; ...@@ -4,8 +4,10 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.zehong.common.core.domain.entity.SysDictData;
import com.zehong.common.core.domain.entity.SysRole; import com.zehong.common.core.domain.entity.SysRole;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.DictUtils;
import com.zehong.common.utils.SecurityUtils; import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.form.TSafeEquipmentStandingBookForm; import com.zehong.system.domain.form.TSafeEquipmentStandingBookForm;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -35,7 +37,30 @@ public class TSafeEquipmentStandingBookServiceImpl implements ITSafeEquipmentSta ...@@ -35,7 +37,30 @@ public class TSafeEquipmentStandingBookServiceImpl implements ITSafeEquipmentSta
@Override @Override
public TSafeEquipmentStandingBook selectTSafeEquipmentStandingBookById(Long safeEquipmentId) public TSafeEquipmentStandingBook selectTSafeEquipmentStandingBookById(Long safeEquipmentId)
{ {
return tSafeEquipmentStandingBookMapper.selectTSafeEquipmentStandingBookById(safeEquipmentId); TSafeEquipmentStandingBook tSafeEquipmentStandingBook = tSafeEquipmentStandingBookMapper.selectTSafeEquipmentStandingBookById(safeEquipmentId);
// 获取 安全装置类型 字段数据
List<SysDictData> equipmentTypeDictDatas = DictUtils.getDictCache("t_equipment_type");
Map<String, List<SysDictData>> collect = equipmentTypeDictDatas.stream().collect(Collectors.groupingBy(SysDictData::getDictValue));
String equipmentType = tSafeEquipmentStandingBook.getEquipmentType();
StringBuilder stringBuilder = new StringBuilder();
String[] split = equipmentType.split(",");
for (int i = 0; i < split.length; i++) {
String s = split[i];
List<SysDictData> sysDictData = collect.get(s);
if (sysDictData.size() > 0) {
String dictLabel = sysDictData.get(0).getDictLabel();
if (i == split.length - 1) {
stringBuilder.append(dictLabel);
} else {
stringBuilder.append(dictLabel).append(",");
}
}
}
tSafeEquipmentStandingBook.setEquipmentTypeExplainDict(stringBuilder.toString());
return tSafeEquipmentStandingBook;
} }
/** /**
...@@ -52,7 +77,32 @@ public class TSafeEquipmentStandingBookServiceImpl implements ITSafeEquipmentSta ...@@ -52,7 +77,32 @@ public class TSafeEquipmentStandingBookServiceImpl implements ITSafeEquipmentSta
tSafeEquipmentStandingBook.setEnterpriseId(SecurityUtils.getLoginUser().getUser().getDeptId()); tSafeEquipmentStandingBook.setEnterpriseId(SecurityUtils.getLoginUser().getUser().getDeptId());
} }
return tSafeEquipmentStandingBookMapper.selectTSafeEquipmentStandingBookList(tSafeEquipmentStandingBook); // 获取 安全装置类型 字段数据
List<SysDictData> equipmentTypeDictDatas = DictUtils.getDictCache("t_equipment_type");
Map<String, List<SysDictData>> collect = equipmentTypeDictDatas.stream().collect(Collectors.groupingBy(SysDictData::getDictValue));
List<TSafeEquipmentStandingBook> tSafeEquipmentStandingBooks = tSafeEquipmentStandingBookMapper.selectTSafeEquipmentStandingBookList(tSafeEquipmentStandingBook);
if (tSafeEquipmentStandingBooks.size() > 0) {
for (TSafeEquipmentStandingBook safeEquipmentStandingBook : tSafeEquipmentStandingBooks) {
String equipmentType = safeEquipmentStandingBook.getEquipmentType();
StringBuilder stringBuilder = new StringBuilder();
String[] split = equipmentType.split(",");
for (int i = 0; i < split.length; i++) {
String s = split[i];
List<SysDictData> sysDictData = collect.get(s);
if (sysDictData.size() > 0) {
String dictLabel = sysDictData.get(0).getDictLabel();
if (i == split.length - 1) {
stringBuilder.append(dictLabel);
} else {
stringBuilder.append(dictLabel).append(",");
}
}
}
safeEquipmentStandingBook.setEquipmentTypeExplainDict(stringBuilder.toString());
}
}
return tSafeEquipmentStandingBooks;
} }
/** /**
......
...@@ -497,15 +497,7 @@ ...@@ -497,15 +497,7 @@
<span>仅允许导入xls、xlsx格式文件。</span> <span>仅允许导入xls、xlsx格式文件。</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link> <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
<br> <br>
<!-- <el-form>
<el-form-item>
<div style="width: 100%; text-align: center;">
<el-button type="primary" @click="downloadImportError">下载错误数据</el-button>
<el-button type="danger" @click="clearImportErrorMethod">清除错误数据</el-button>
</div>
</el-form-item>
</el-form> -->
<el-divider v-if="this.importError > 0 " content-position="left">错误数据导出分隔</el-divider> <el-divider v-if="this.importError > 0 " content-position="left">错误数据导出分隔</el-divider>
...@@ -521,12 +513,7 @@ ...@@ -521,12 +513,7 @@
> >
<span>下载导入时错误数据</span> <span>下载导入时错误数据</span>
</el-button> </el-button>
</el-badge> </el-badge>
<!-- <el-link v-if="this.importError > 0" type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="downloadImportError">下载错误数据</el-link>
<el-link v-if="this.importError > 0" type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="clearImportErrorMethod">清除错误数据</el-link> -->
</div> </div>
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-form label-width="170px"> <el-form label-width="170px">
<el-row class="el-row-table"> <el-row class="el-row-table">
<el-col :span="11"> <el-col :span="12">
<el-form-item label="用户名称:" > <el-form-item label="用户名称:" >
<span v-if="detailInfo.userName">{{ detailInfo.userName }}</span> <span v-if="detailInfo.userName">{{ detailInfo.userName }}</span>
<span v-else>-</span> <span v-else>-</span>
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="身份证号:" > <el-form-item label="所属企业:" >
<span v-if="detailInfo.idCard">{{ detailInfo.idCard }}</span> <span v-if="detailInfo.enterpriseName">{{ detailInfo.enterpriseName }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="23"> <el-col :span="24">
<el-form-item label="详细地址:" > <el-form-item label="详细地址:" >
<span v-if="detailInfo.userAddress">{{ detailInfo.userAddress }}</span> <span v-if="detailInfo.userAddress">{{ detailInfo.userAddress }}</span>
<span v-else>-</span> <span v-else>-</span>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="装置类型:" > <el-form-item label="装置类型:" >
<span v-if="detailInfo.equipments">{{ detailInfo.equipments }}</span> <span v-if="detailInfo.equipmentTypeExplainDict">{{ detailInfo.equipmentTypeExplainDict }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -74,12 +74,6 @@ ...@@ -74,12 +74,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="所属企业" >
<span v-if="detailInfo.enterpriseName">{{ detailInfo.enterpriseName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-dialog> </el-dialog>
......
...@@ -9,16 +9,7 @@ ...@@ -9,16 +9,7 @@
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<!--<el-form-item label="身份证号" prop="idCard">
<el-input
v-model="queryParams.idCard"
placeholder="请输入身份证号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item label="联系电话" prop="linkMobile"> <el-form-item label="联系电话" prop="linkMobile">
<el-input <el-input
v-model="queryParams.linkMobile" v-model="queryParams.linkMobile"
...@@ -73,11 +64,11 @@ ...@@ -73,11 +64,11 @@
<el-table v-loading="loading" :data="equipmentList" > <el-table v-loading="loading" :data="equipmentList" >
<el-table-column label="用户名称" align="center" prop="userName" width="200px"/> <el-table-column label="用户名称" align="center" prop="userName" width="200px"/>
<el-table-column label="身份证号" align="center" prop="idCard" width="180px"/>
<el-table-column label="联系电话" align="center" prop="linkMobile"/> <el-table-column label="联系电话" align="center" prop="linkMobile"/>
<el-table-column label="所属企业" align="center" prop="enterpriseName" :formatter="enterpriseFormat" :show-overflow-tooltip="true"/> <el-table-column label="所属企业" align="center" prop="enterpriseName" :formatter="enterpriseFormat" :show-overflow-tooltip="true"/>
<el-table-column label="详细地址" align="center" prop="userAddress" width="380px"/> <el-table-column label="详细地址" align="center" prop="userAddress" width="380px"/>
<el-table-column label="安装时间" align="center" prop="installTime"/> <el-table-column label="安装时间" align="center" prop="installTime"/>
<el-table-column label="装置类型" align="center" prop="equipmentTypeExplainDict"/>
<el-table-column label="品牌名称" align="center" prop="brandName"/> <el-table-column label="品牌名称" align="center" prop="brandName"/>
<el-table-column label="操作" align="center" width="180px"> <el-table-column label="操作" align="center" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -128,8 +119,15 @@ ...@@ -128,8 +119,15 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="身份证号" prop="idCard"> <el-form-item label="装置类型" prop="equipments">
<el-input v-model="form.idCard" placeholder="请输入身份证号" /> <el-select placeholder="请选择装置类型" v-model="form.equipments" multiple filterable clearable style="width: 100%" onchange="change()">
<el-option
v-for="dict in options"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -163,19 +161,17 @@ ...@@ -163,19 +161,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11">
<el-form-item label="装置类型" prop="equipments"> <el-col span="11">
<el-select placeholder="请选择装置类型" v-model="form.equipments" multiple filterable clearable style="width: 100%" onchange="change()"> <el-form-item label="所属企业" prop="enterpriseId">
<el-option <el-select v-model="form.enterpriseId" placeholder="请在下拉框中选择名称" maxlength="255" style="width: 100%;">
v-for="dict in options" <el-option v-for="item in enterpriseList" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId">
:key="dict.dictValue" </el-option>
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="用户类型"> <el-form-item label="用户类型">
<el-select v-model="form.userType" placeholder="请选择用户类型" style="width: 100%;"> <el-select v-model="form.userType" placeholder="请选择用户类型" style="width: 100%;">
...@@ -193,14 +189,6 @@ ...@@ -193,14 +189,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="12">
<el-form-item label="所属企业" prop="enterpriseId">
<el-select v-model="form.enterpriseId" placeholder="请在下拉框中选择名称" maxlength="255" style="width: 100%;">
<el-option v-for="item in enterpriseList" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
......
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