package cn.com.sundy.manager.impl;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.log4j.Logger;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.WorkbookUtil;
import cn.com.sundy.util.StringUtil;
import cn.com.sundy.util.TimeSource;
import cn.com.sundy.util.Validate;
public class ExcelExportService {
private static Logger logger = Logger.getLogger(ExcelExportService.class);
private static final String SERIAL_ID = "serialId";
private static final String BASESTATION_SITENAME = "baseStationName";
private static final String BASESTATION_URBAN = "baseStationUrban";
private static final String WORKNO = "workno";
/**
* 创建工作簿
*
* @param fileName 工作簿名称
* @return 工作簿
*/
public static Workbook createWorkbook(String fileName) {
Workbook workbook = new HSSFWorkbook();
FileOutputStream fileOut = null;
try {
fileOut = new FileOutputStream(fileName);
workbook.write(fileOut);
fileOut.close();
return workbook;
} catch (IOException e) {
e.printStackTrace();
logger.error("创建工作簿失败:", e);
return null;
}
}
public static void main(String[] args) {
Workbook workbook = new HSSFWorkbook();
}
/**
* 填充数据并保存文件
*
* @param fileName
* @param exportData
* @return 服务器端路径
*/
public static File fillInData(String fileName, Map<String, List<Map<String, Object>>> exportData) {
if(Validate.isEmpty(exportData)) {
return null;
}
Workbook workbook = new HSSFWorkbook();
Iterator<Entry<String, List<Map<String, Object>>>> entries = exportData.entrySet().iterator();
while(entries.hasNext()) {
Entry<String, List<Map<String, Object>>> entry = entries.next();
if (Validate.isEmpty(entry)) {
continue;
}
String currentSheetName = null;
Sheet currentSheet = null;
// 填充数据
List<Map<String, Object>> contents = entry.getValue();
if (Validate.isEmpty(contents)) {
continue;
} else {
currentSheetName = WorkbookUtil.createSafeSheetName(entry.getKey());
currentSheet = workbook.createSheet(currentSheetName);
}
// Fill header in line-1
Row row = currentSheet.createRow(0);
Map<String, Object> firstDataRowMap = contents.get(0);
Iterator<String> keys = firstDataRowMap.keySet().iterator();
int indexRecorder = 0;
while (keys.hasNext()) {
String columnName = "";
String currentKey = keys.next();
if (SERIAL_ID.equals(currentKey)) {
columnName = "编号";
} else if (BASESTATION_SITENAME.equals(currentKey)) {
if ("直放站信息".equals(currentSheetName)) {
columnName = "信源基站";
} else {
columnName = "主站名称";
}
//未统一修改前先这么写
if ("巡检信息".equals(currentSheetName)) {
columnName = "基站名称";
}
if ("网络调整信息".equals(currentSheetName)) {
columnName = "基站名称";
}
//未统一修改前先这么写
if ("随工记录信息".equals(currentSheetName)) {
columnName = "基站名称";
}
if ("故障派单信息".equals(currentSheetName)) {
columnName = "基站名称";
}
if ("巡检计划信息".equals(currentSheetName)) {
columnName = "基站名称";
}
} else if (BASESTATION_URBAN.equals(currentKey)) {
if ("直放站信息".equals(currentSheetName)) {
columnName = "信源基站所属区域";
} else {
columnName = "主站所属区域";
}
//未统一修改前先这么写
if ("巡检信息".equals(currentSheetName)) {
columnName = "所属区域";
}
if ("网络调整信息".equals(currentSheetName)) {
columnName = "所属区域";
}
if ("随工记录信息".equals(currentSheetName)) {
columnName = "所属区域";
}
if ("故障派单信息".equals(currentSheetName)) {
columnName = "所属区域";
}
}else if (WORKNO.equals(currentKey)) {
if ("故障派单信息".equals(currentSheetName)) {
columnName = "工单编号";
}else{
columnName="工单号";
}
}else {
columnName = ColumnsDefination.convertToColumnName(currentKey);
}
Cell headerCell = row.createCell(indexRecorder);
headerCell.setCellValue(columnName);
headerCell.setCellStyle(getHeaderCellStyle(workbook));
indexRecorder ++;
}
for (int index=0; index < contents.size(); index++) {
Row newRow = currentSheet.createRow(index + 1);
Map<String, Object> currentLine = contents.get(index);
Iterator<Entry<String, Object>> cells = currentLine.entrySet().iterator();
int indexCount = 0;
while(cells.hasNext()) {
Entry<String, Object> cell = cells.next();
Cell currentCell = newRow.createCell(indexCount);
Object value = cell.getValue();
if (value instanceof String) {
currentCell.setCellValue(StringUtil.toString(value));
} else if (value instanceof Date) {
//时间转换格式不正确
currentCell.setCellValue((TimeSource.getDate19((Date) value)));
} else if (value instanceof Byte || value instanceof Short
|| value instanceof Integer || value instanceof Long
|| value instanceof Float || value instanceof Double) {
currentCell.setCellValue(Double.parseDouble(value.toString()));
}
indexCount++;
}
}
}
// 写入文件
FileOutputStream fileOutputStream = null;
File exportFile = null;
try {
exportFile = new File(fileName);
if (!exportFile.exists() || !exportFile.isFile()) {
File parent = exportFile.getParentFile();
if (!parent.exists() || !parent.isDirectory()) {
parent.mkdirs();
exportFile.createNewFile();
}
} else {
exportFile.delete();
}
fileOutputStream = new FileOutputStream(exportFile);
workbook.write(fileOutputStream);
fileOutputStream.close();
} catch (IOException e) {
e.printStackTrace();
logger.error("创建工作簿失败:", e);
return null;
}
return exportFile;
}
/**
* 导出的Excel列头样式
*
* @return
*/
private static CellStyle getHeaderCellStyle(Workbook workbook) {
CellStyle cellStyle = workbook.createCellStyle();
// Border Style
cellStyle.setBorderRight(CellStyle.BORDER_THIN);
cellStyle.setRightBorderColor(IndexedColors.BLACK.getIndex());
cellStyle.setBorderBottom(CellStyle.BORDER_THIN);
cellStyle.setBottomBorderColor(IndexedColors.BLACK.getIndex());
cellStyle.setBorderLeft(CellStyle.BORDER_THIN);
cellStyle.setLeftBorderColor(IndexedColors.BLACK.getIndex());
cellStyle.setBorderTop(CellStyle.BORDER_THIN);
cellStyle.setTopBorderColor(IndexedColors.BLACK.getIndex());
// Background Color: light blue
cellStyle.setFillBackgroundColor(IndexedColors.LIGHT_BLUE.getIndex());
// Font Style
Font font = workbook.createFont();
font.setFontName("微软雅黑");
cellStyle.setAlignment(CellStyle.ALIGN_CENTER);
cellStyle.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
cellStyle.setFont(font);
return cellStyle;
}
/**
* 列定义
*
* @author JiangTao
*/
public static class ColumnsDefination {
public static Map<String, String> columnEntityMapping;
static {
columnEntityMapping = new LinkedHashMap<String, String>();
}
// 基站基本信息
public static Map<String, String> siteColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FSitenameBasestation", "基站名称");
columnEntityMapping.put("FLongitudeBasestation", "经度");
columnEntityMapping.put("FLatitudeBasestation", "纬度");
columnEntityMapping.put("FTypeBasestation", "基站类型");
columnEntityMapping.put("FServerTypeBasetation", "站点类型");
columnEntityMapping.put("FDwstarttimeBasetation", "代维开始时间");
columnEntityMapping.put("FDwendtimeBasetation", "代维终止时间");
columnEntityMapping.put("FDwoldmanuBasetation", "原代维厂家");
columnEntityMapping.put("FDwnewmanuBasetation", "现代维厂家");
columnEntityMapping.put("FAccesslocBasestation", "门禁接电位置");
columnEntityMapping.put("FAddressBasestation", "详细地址");
columnEntityMapping.put("FAreatypeBasestation", "区域类型");
columnEntityMapping.put("FBatterydefenceBasestation", "电池防盗");
columnEntityMapping.put("FBsgradeBasestation", "基站级别");
columnEntityMapping.put("FBsstatusBasestation", "基站状态");
columnEntityMapping.put("FFormatsBasestation", "基站制式");
columnEntityMapping.put("FContactproperBasestation", "业主联系方式");
columnEntityMapping.put("FDoorlockBasestation", "院门院锁");
columnEntityMapping.put("FEngineroomlocBasestation", "机房位置");
columnEntityMapping.put("FEngineroomstruBasestation", "机房结构");
columnEntityMapping.put("FGroundtypeBasestation", "地面类型");
columnEntityMapping.put("FGeograenvirBasestation", "地理环境");
columnEntityMapping.put("FHidtroubletipBasestation", "隐患提示");
columnEntityMapping.put("FCellulartypeBasestation", "蜂窝类型");
columnEntityMapping.put("FHousenoBasestation", "门牌号");
columnEntityMapping.put("FInnerorouterBasestation", "业主院内");
columnEntityMapping.put("FMoniteralarmBasestation", "摄相头/报警器");
columnEntityMapping.put("FOpendoormethodBasestation", "开门方式");
columnEntityMapping.put("FOutwalllayerBasestation", "机房外墙隔温层");
columnEntityMapping.put("FPittedtimeBasestation", "进站时间");
columnEntityMapping.put("FRoomareaBasestation", "机房面积");
columnEntityMapping.put("FShareoperatorBasestation", "共享运营商");
columnEntityMapping.put("FUrbanBasestation", "所属区域");
columnEntityMapping.put("FVehiclereachBasestation", "车辆能否到达");
columnEntityMapping.put("FWallBasestation", "围墙");
columnEntityMapping.put("FWaterproofBasestation", "防水屋顶");
columnEntityMapping.put("FWaytoentryBasestation", "进站方式");
columnEntityMapping.put("FWaytoentryBasestation", "进站方式");
columnEntityMapping.put("FNoteBasestation", "基站备注信息");
return columnEntityMapping;
}
// 主设备信息
public static Map<String, String> mainDeviceColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FVillageMaindevice", "小区");
columnEntityMapping.put("FCgiMaindevice", "CGI");
columnEntityMapping.put("FManuMaindevice", "设备厂商");
columnEntityMapping.put("FFrequencychannelMaindevice", "频段");
columnEntityMapping.put("FTypeMaindevice", "设备类型");
columnEntityMapping.put("FCarrierMaindevice", "载频类型");
columnEntityMapping.put("FConfigMaindevice", "设备配置");
columnEntityMapping.put("FRrunoMaindevice", "RRU数目");
columnEntityMapping.put("FCarrierApplyMaindevice", "载频类型(使用)");
columnEntityMapping.put("FCarrierApplyNumMaindevice", "载频数量(使用)");
columnEntityMapping.put("FTypeApplyMaindevice", "设备类型(使用)");
columnEntityMapping.put("FTypeApplyNumMaindevice", "设备数量(使用)");
columnEntityMapping.put("FCombinerApplyMaindevice", "合路器类型(使用)");
columnEntityMapping.put("FCombinerApplyNumMaindevice", "合路器数量(使用)");
columnEntityMapping.put("FCarrierFreeMaindevice", "载频类型(空闲)");
columnEntityMapping.put("FCarrierFreeNumMaindevice", "载频数量(空闲)");
columnEntityMapping.put("FTypeFreeMaindevice", "设备类型(空闲)");
columnEntityMapping.put("FTypeFreeNumMaindevice", "设备数量(空闲)");
columnEntityMapping.put("FCombinerFreeMaindevice", "合路器类型(空闲)");
columnEntityMapping.put("FCombinerFreeNumMaindevice", "合路器数量(空闲)");
columnEntityMapping.put("FNoteMaindevice", "主设备备注信息");
return columnEntityMapping;
}
// 传输信息
public static Map<String, String> transColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FMicrowavemanuTrans", "微波设备厂家");
columnEntityMapping.put("FMicrowavemodelTrans", "微波设备型号");
columnEntityMapping.put("FOpticalmanuTrans", "光端机厂家");
columnEntityMapping.put("FOpticalmodelTrans", "光瑞机型号");
columnEntityMapping.put("FTransaccessmethodTrans", "传输接入方式");
columnEntityMapping.put("FTranscabmanuTrans", "传输柜厂家");
columnEntityMapping.put("FTranscabmodelTrans", "传输柜型号");
columnEntityMapping.put("FTransconnpowerTrans", "传输接电位置");
columnEntityMapping.put("FNoteTrans", "传输备注信息");
return columnEntityMapping;
}
// 天馈接地信息
public static Map<String, String> feederColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FAntennagainFeeder", "天线增益");
columnEntityMapping.put("FAntennalenFeeder", "天线长度");
columnEntityMapping.put("FAntennaheiFeeder", "天线挂高");
columnEntityMapping.put("FAntennamanuFeeder", "天线厂家");
columnEntityMapping.put("FAntennamodelFeeder", "天线型号");
columnEntityMapping.put("FAntennanoFeeder", "天线数量");
columnEntityMapping.put("FAntennawidFeeder", "天线间距");
columnEntityMapping.put("FAntennarateFeeder", "天线频率");
columnEntityMapping.put("FAntennarateFeeder", "天线频率");
columnEntityMapping.put("FDistrictFeeder", "所在小区");
columnEntityMapping.put("FFeedermanuFeeder", "馈线厂家");
columnEntityMapping.put("FFeedernoFeeder", "馈线条数");
columnEntityMapping.put("FFeedertypeFeeder", "馈线类型");
columnEntityMapping.put("FFeederlenFeeder", "馈线长度");
columnEntityMapping.put("FPlatformFeeder", "所在平台");
columnEntityMapping.put("FPolarizationFeeder", "极化方式");
columnEntityMapping.put("FNoteFeeder", "天馈/接地备注信息");
return columnEntityMapping;
}
// 铁塔信息
public static Map<String, String> towerColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FLightlodlineTower", "避雷针是否有拉线");
columnEntityMapping.put("FLightlodmanuTower", "避雷针厂家");
columnEntityMapping.put("FLightlodmodelTower", "避雷针型号");
columnEntityMapping.put("FFirstptnoTower", "平台1天线数量");
columnEntityMapping.put("FGroundlineTower", "室外地线排完好");
columnEntityMapping.put("FLaddertypeTower", "爬梯类型");
columnEntityMapping.put("FPlatformnoTower", "平台数量");
columnEntityMapping.put("FRemainingrodnoTower", "剩余抱杆数量");
columnEntityMapping.put("FSecondptnoTower", "平台2天线数量");
columnEntityMapping.put("FThirdptnoTower", "平台3天线数量");
columnEntityMapping.put("FAttrTower", "铁塔归属");
columnEntityMapping.put("FHeightTower", "铁塔高度");
columnEntityMapping.put("FManuTower", "铁塔厂家");
columnEntityMapping.put("FTypeTower", "铁塔类型");
columnEntityMapping.put("FCorrosionTower", "铁塔是否锈蚀");
columnEntityMapping.put("FGroundresistanceTower", "铁塔地阻值");
columnEntityMapping.put("FNoteTower", "铁塔备注信息");
return columnEntityMapping;
}
// 电源
public static Map<String, String> powerColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FAcintrowayPower", "交流引入方式");
columnEntityMapping.put("FActypePower", "交流电类型");
columnEntityMapping.put("FAcattrPower", "交流电归属");
columnEntityMapping.put("FMeterlocPower", "电表位置");
columnEntityMapping.put("FDistriboxmanuPower", "配电箱厂家");
columnEntityMapping.put("FDistriboxmodelPower", "配电箱型号");
columnEntityMapping.put("FSwpowermanuPower", "开关电源厂家");
columnEntityMapping.put("FSwpowermodelPower", "开关电源型号");
columnEntityMapping.put("FSpdmanuPower", "防雷器厂家");
columnEntityMapping.put("FSpdmodelPower", "防雷器型号");
columnEntityMapping.put("FPowermodelPower", "电源模块型号");
columnEntityMapping.put("FPowernoPower", "电源模块数量");
columnEntityMapping.put("FLightprotmodelPower", "防雷模块型号");
columnEntityMapping.put("FLightprotnoPower", "防雷模块数量");
columnEntityMapping.put("FFuseusednoPower", "熔丝使用数量");
columnEntityMapping.put("FFuseleftnoPower", "熔丝剩余数量");
columnEntityMapping.put("FRemainswnoPower", "开关剩余数量");
columnEntityMapping.put("FBatterymanuPower", "蓄电池厂家");
columnEntityMapping.put("FBatterymodelPower", "蓄电池型号");
columnEntityMapping.put("FBatterynoPower", "电池数量");
columnEntityMapping.put("FIntactPower", "电池是否完好");
columnEntityMapping.put("FSinglegroupcapacityPower", "单组容量");
columnEntityMapping.put("FSinglevolPower", "单体电压等级");
columnEntityMapping.put("FInstallmethodPower", "安装方式");
columnEntityMapping.put("FNotePower", "电源备注信息");
return columnEntityMapping;
}
// 空调信息
public static Map<String, String> airColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FManuAircondition", "空调厂家");
columnEntityMapping.put("FModelAircondition", "空调型号");
columnEntityMapping.put("FProddateAircondition", "生产日期");
columnEntityMapping.put("FCallkaiAircondition", "来电自启功能");
columnEntityMapping.put("FEleauxheatAircondition", "电辅热功能");
columnEntityMapping.put("FCapacityAircondition", "空调容量");
columnEntityMapping.put("FCoolingcapAircondition", "制冷量");
columnEntityMapping.put("FPowersupplyAircondition", "空调供电方式");
columnEntityMapping.put("FEnergysavingAircondition", "是否加节能");
columnEntityMapping.put("FExternalhoodAircondition", "是否有外机罩");
columnEntityMapping.put("FNoteAircondition", "空调备注信息");
return columnEntityMapping;
}
// 监控信息
public static Map<String, String> monitorColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FManuMonitor", "监控厂家");
columnEntityMapping.put("FModelMonitor", "监控设备型号");
columnEntityMapping.put("FAccessMonitor", "门禁告警");
columnEntityMapping.put("FSmokeMonitor", "烟感告警");
columnEntityMapping.put("FFloodMonitor", "水浸告警");
columnEntityMapping.put("FInfraredMonitor", "红外告警");
columnEntityMapping.put("FTemperMonitor", "温度告警");
columnEntityMapping.put("FDcMonitor", "直流告警");
columnEntityMapping.put("FAcMonitor", "交流告警");
columnEntityMapping.put("FAlarmMonitor", "监控器告警");
columnEntityMapping.put("FNoteMonitor", "监控备注信息");
return columnEntityMapping;
}
// 灭火器
public static Map<String, String> fireExtColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FControlproddateFireext", "出厂日期");
columnEntityMapping.put("FExpirationdateFireext", "过期时间");
columnEntityMapping.put("FStateFireext", "状态");
columnEntityMapping.put("FReplacementdateFireext", "更换时间");
columnEntityMapping.put("FEntrydateFireext", "录入时间");
columnEntityMapping.put("FNoteFireext", "灭火器备注信息");
return columnEntityMapping;
}
// 室分
public static Map<String, String> roomBranchExtColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FDevicemanuRoombranch", "室分设备厂家");
columnEntityMapping.put("FDevicemodelRoombranch", "室分设备类型");
columnEntityMapping.put("FPowersupplymodelRoombranch", "供电类型");
columnEntityMapping.put("FSourcecellRoombrahch", "信源小区");
columnEntityMapping.put("FCoverareatypeRoombrahch", "覆盖方式");
columnEntityMapping.put("FCoverareaRoombrahch", "覆盖区域");
columnEntityMapping.put("FMonitorcardnoRoombrahch", "监控卡号");
columnEntityMapping.put("FRemotedevicelocationRoombrahch", "远端设备位置");
columnEntityMapping.put("FNeRoombranch", "系统所含网元");
columnEntityMapping.put("FIsornotareaRoombranch", "是否涉及场地租赁");
columnEntityMapping.put("FAreabelongtoRoombranch", "场地归属");
columnEntityMapping.put("FRenttypeRoombranch", "租赁费结算方式");
columnEntityMapping.put("FIsornotelerateRoombranch", "是否涉及电费");
columnEntityMapping.put("FEleratebelongtoRoombranch", "电费归属");
columnEntityMapping.put("FEleratetypeRoombranch", "电费结算方式");
columnEntityMapping.put("FMaindevicemodelRoombranch", "室分设备型号");
columnEntityMapping.put("FTranwayRoombranch", "传输方式");
columnEntityMapping.put("FInstalllocationRoombranch", "主设备安装位置");
columnEntityMapping.put("FInstalltypeRoombaranch", "主设备安装方式及挂高");
columnEntityMapping.put("FNoteRoombranch", "室分备注信息");
return columnEntityMapping;
}
// rru
public static Map<String, String> rruColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FStationnameRru", "RRU拉远站名");
columnEntityMapping.put("FLocRru", "拉远位置");
columnEntityMapping.put("FNumRru", "RRU拉远数量");
columnEntityMapping.put("FManuRru", "设备厂家");
columnEntityMapping.put("FModelRru", "设备型号");
columnEntityMapping.put("FCableaccessmethodRru", "光缆接入方式");
columnEntityMapping.put("FCoverareatypeRru", "覆盖区域类型");
columnEntityMapping.put("FPowersupplyRru", "RRU供电方式");
columnEntityMapping.put("FNoteRru", "RRU备注信息");
return columnEntityMapping;
}
// 直放站信息
public static Map<String, String> repeaterColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FStationnameRpt", "站名");
columnEntityMapping.put("FAddressRpt", "详细站址");
columnEntityMapping.put("FLinkmannametelRpt", "站点联系人及电话");
columnEntityMapping.put("FMaindevicemanuRpt", "主设备厂家");
columnEntityMapping.put("FCovertypeRpt", "覆盖方式");
columnEntityMapping.put("FTransporttypeRpt", "传输方式");
columnEntityMapping.put("FNetoptimidevicetypeRpt", "网优设备类型");
columnEntityMapping.put("FTanoRpt", "干放数量");
columnEntityMapping.put("FPowersupplyRpt", "直放站供电方式");
columnEntityMapping.put("FMaindevicemodelRpt", "主设备型号");
columnEntityMapping.put("FDeviceinstalllocationRpt", "主设备设备安装位置");
columnEntityMapping.put("FTalocationRpt", "干放安装位置");
columnEntityMapping.put("FCoverarearangeRpt", "覆盖区域及范围");
columnEntityMapping.put("FBasestationdistrictnoRpt", "信源基站小区号");
columnEntityMapping.put("FCidRpt", "CID");
columnEntityMapping.put("FNetworkcidRpt", "网管近端ID");
columnEntityMapping.put("FMonitorsimnoRpt", "直放站监控SIM卡号码");
columnEntityMapping.put("FTamonitorsimnoRpt", "干放监控SIM卡号码");
columnEntityMapping.put("FDistalidRpt", "远端远端ID");
columnEntityMapping.put("FLongitudeRpt", "直放站经度");
columnEntityMapping.put("FLatitudeRpt", "直放站纬度");
columnEntityMapping.put("FGroundstateRpt", "接地情况");
columnEntityMapping.put("FSupportwlanRpt", "支持WLAN");
columnEntityMapping.put("FSupportxngRpt", "录入XNG");
columnEntityMapping.put("FSupportomcRpt", "录入OMC");
columnEntityMapping.put("FNoteRpt", "直放站备注信息");
return columnEntityMapping;
}
/**
* 故障派单
*
* @param columnEntityMapping
* @return
*/
public static Map<String, String> faultColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
//columnEntityMapping.put("FWorkordernoFaultsentlist", "工单编号");
columnEntityMapping.put("FCityFaultsentlist", "地区");
columnEntityMapping.put("FStateFaultsentlist", "状态");
columnEntityMapping.put("FDateFaultsentlist", "日期");
columnEntityMapping.put("FRequesttypeFaultsentlist", "故障请求类型");
columnEntityMapping.put("FLocationFaultsentlist", "故障发生位置");
columnEntityMapping.put("FLevelFaultsentlist", "故障级别");
columnEntityMapping.put("FDescriptFaultsentlist", "故障描述");
columnEntityMapping.put("FProcessresultFaultsentlist", "处理过程及结果");
columnEntityMapping.put("FRecipientFaultsentlis", "工单接收人");
columnEntityMapping.put("FFieldengineerFaultsentlist", "现场工程师");
columnEntityMapping.put("FCarnoFaultsentlist", "车牌号");
columnEntityMapping.put("FReceipttimeFaultsentlist", "接收时间");
columnEntityMapping.put("FArrivetimeFaultsentlist", "到站时间");
columnEntityMapping.put("FCompletetimeFaultsentlist", "计划完成时间");
columnEntityMapping.put("FDealtimeFaultsentlist", "处理结束时间");
columnEntityMapping.put("FDisclaimerFaulistentlist", "免责时间(小时)");
columnEntityMapping.put("FLastedFaultsentlist", "障碍历时(小时)");
columnEntityMapping.put("FReceivingstateFaultsentlist", "接收状态");
columnEntityMapping.put("FTeamFaultsentlist", "维护队伍");
columnEntityMapping.put("FNoteFaultsentlist", "备注");
return columnEntityMapping;
}
/**
* 人员信息
*
* @param columnEntityMapping
* @return
*/
public static Map<String, String> personColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FId", "员工号");
columnEntityMapping.put("FName", "姓名");
columnEntityMapping.put("FSex", "性别");
columnEntityMapping.put("FOrgnize", "部门");
columnEntityMapping.put("FProjectplace", "项目所在地");
columnEntityMapping.put("FPosition", "岗位名称");
columnEntityMapping.put("FTitle", "职称");
columnEntityMapping.put("FSkill", "技能证书");
columnEntityMapping.put("FJkr", "是否原工商局");
columnEntityMapping.put("FInsurance", "保险");
columnEntityMapping.put("FMoved", "异动");
columnEntityMapping.put("FMobile", "移动电话");
columnEntityMapping.put("FIdcard", "身份证号");
columnEntityMapping.put("FNationality", "民族");
columnEntityMapping.put("FInduction", "入职日期");
columnEntityMapping.put("FTrialbegin", "试用期起");
columnEntityMapping.put("FTrialend", "试用期止");
columnEntityMapping.put("FFullmember", "转正日期");
columnEntityMapping.put("FCasualty", "意外伤害险");
columnEntityMapping.put("FLeavejob", "离职日期");
columnEntityMapping.put("FWork", "工作经历");
columnEntityMapping.put("FTrain", "培训经历");
columnEntityMapping.put("FDegree", "学历");
columnEntityMapping.put("FUniversity", "毕业学校");
columnEntityMapping.put("FProfessional", "专业");
columnEntityMapping.put("FGraduationtime", "毕业时间");
columnEntityMapping.put("FTel", "家庭电话");
columnEntityMapping.put("FEmail", "个人邮箱");
columnEntityMapping.put("FContact", "应急联系人");
columnEntityMapping.put("FContacttel", "应急联系人方式");
columnEntityMapping.put("FLastmodyTime", "最后修改时间");
columnEntityMapping.put("FRemark", "备注");
return columnEntityMapping;
}
/**
* 违章信息
*
* @param columnEntityMapping
* @return
*/
public static Map<String, String> violationColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FLicenseViolation", "车牌号");
columnEntityMapping.put("FResultViolation", "违章内容");
columnEntityMapping.put("FCheckerViolation", "查询人员");
columnEntityMapping.put("FQuerytimeViolation", "查询时间");
columnEntityMapping.put("FNoteViolation", "备注");
columnEntityMapping.put("FDateViolation", "违章日期");
columnEntityMapping.put("FPlaceViolation", "违章地点");
columnEntityMapping.put("FDealstatusViolation", "处理状态");
return columnEntityMapping;
}
/**
* 司机信息
*
* @param columnEntityMapping
* @return
*/
public static Map<String, String> driverColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FAreaDriver", "地区");
columnEntityMapping.put("FStaffDriver", "司机编号");
columnEntityMapping.put("FNameDriver", "司机姓名");
columnEntityMapping.put("FStatusDriver", "工作状态");
columnEntityMapping.put("FTelDriver", "电话");
columnEntityMapping.put("FCardnoDriver", "驾驶车辆车牌号");
columnEntityMapping.put("FLicenceDriver", "驾驶证号");
columnEntityMapping.put("FDriverStatusDriver", "驾驶证状态");
columnEntityMapping.put("FPermitDriver", "准驾车型");
columnEntityMapping.put("FFirstDriver", "初次领证日期");
columnEntityMapping.put("FInceptDriver", "有效起始日期");
columnEntityMapping.put("FValidityDriver", "有效期");
columnEntityMapping.put("FOtherDriver", "其他证件");
columnEntityMapping.put("FNoteDriver", "备注");
return columnEntityMapping;
}
/**
* 司机信息
*
* @param columnEntityMapping
* @return
*/
public static Map<String, String> vehicleColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FRegionVehicle", "归属地区");
columnEntityMapping.put("FManuVehicle", "车辆名称");
columnEntityMapping.put("FLicenseVehicle", "车牌号");
columnEntityMapping.put("FDistinguishVehicle", "车辆识别号");
columnEntityMapping.put("FEngineVehicle", "发动机号");
columnEntityMapping.put("FOilsVehicle", "油类");
columnEntityMapping.put("FStatusVehicle", "目前状态");
columnEntityMapping.put("FPurchasingVehicle", "购买日期");
columnEntityMapping.put("FLicenceVehicle", "行驶证有效期");
columnEntityMapping.put("FForceVehicle", "强制险");
columnEntityMapping.put("FBusinessVehicle", "商业险");
columnEntityMapping.put("FBelongVehicle", "目前资产归宿");
columnEntityMapping.put("FDriverVehicle", "司机姓名");
columnEntityMapping.put("FTelVehicle", "电话");
columnEntityMapping.put("FCaptainVehicle", "归属队长");
columnEntityMapping.put("FTypeVehicle", "车辆类别");
columnEntityMapping.put("FDriverFullTimeVehicle", "司机兼专职情况");
columnEntityMapping.put("FAnnualinspeVehicle", "车辆年检时间");
columnEntityMapping.put("FAgentVehicle", "经办人");
columnEntityMapping.put("FAffiliatedVechile", "附属物品");
columnEntityMapping.put("FNoteVehicle", "备注");
return columnEntityMapping;
}
/**
* 发电记录信息
*
* @param columnEntityMapping
* @return
*/
public static Map<String, String> electricityColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FAreaElectricity", "地区");
columnEntityMapping.put("FSitenameElectricity", "基站名称");
columnEntityMapping.put("FSitetypeElectricity", "基站类型");
columnEntityMapping.put("FCellulartypeElectricity", "蜂窝类型");
columnEntityMapping.put("FReceivertimeElectricity", "接到通知时间");
columnEntityMapping.put("FStartElectricity", "发电开始时间");
columnEntityMapping.put("FEndElectricity", "发电结束时间");
columnEntityMapping.put("FLastElectricity", "发电历时(分钟)");
columnEntityMapping.put("FBaseChargeElectricity", "基本费用/车次");
columnEntityMapping.put("FCosthrElectricity", "费用/小时");
columnEntityMapping.put("FDurationCostElectricity", "时长费用");
columnEntityMapping.put("FCostTotalElectricity", "费用合计");
columnEntityMapping.put("FCarnoElectricity", "车牌号");
columnEntityMapping.put("FNameElectricity", "发电人员");
columnEntityMapping.put("FEngineElectricity", "发电机编号");
columnEntityMapping.put("FEngineMoniElectricity", "发电机有无监控");
columnEntityMapping.put("FNoteElectricity", "备注");
return columnEntityMapping;
}
// 巡检信息
public static Map<String, String> pollingColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FAreaPolling", "地区");
columnEntityMapping.put("FDatePolling", "日期");
columnEntityMapping.put("FPullinPolling", "进站时间");
columnEntityMapping.put("FLeavePolling", "离开时间");
columnEntityMapping.put("FNamePolling", "巡检人员");
columnEntityMapping.put("FCarnoPolling", "车牌号");
columnEntityMapping.put("FCompletePolling", "巡检是否完成");
columnEntityMapping.put("FTeamPolling", "维护队伍");
columnEntityMapping.put("FRowIndoorPolling", "室内地排");
columnEntityMapping.put("FLineIndoorPolling", "室内地线");
columnEntityMapping.put("FRowOutdoorPolling", "室外地排");
columnEntityMapping.put("FLineOutdoorPolling", "室外地线");
columnEntityMapping.put("FGroundOutdoorPolling", "室内地面");
columnEntityMapping.put("FTowerGroundPolling", "塔下地面");
columnEntityMapping.put("FBackFillPolling", "回填土");
columnEntityMapping.put("FBasestationDoorPolling", "基站门");
columnEntityMapping.put("FRailPolling", "围栏");
columnEntityMapping.put("FCablePolling", "光缆、电缆搭挂铁塔");
columnEntityMapping.put("FMobileHomePolling", "活动房");
columnEntityMapping.put("FCemetRoomPolling", "水泥房");
columnEntityMapping.put("FGasExtinguisherPolling", "气体灭火器");
columnEntityMapping.put("FExtinguisherPolling", "灭火器");
columnEntityMapping.put("FStrongElectricityPolling", "强电");
columnEntityMapping.put("FTowerFeedPolling", "铁塔、天馈");
columnEntityMapping.put("FLightningPolling", "塔上避雷针");
columnEntityMapping.put("FBatteryPolling", "蓄电池");
columnEntityMapping.put("FAirPolling", "空调");
columnEntityMapping.put("FHoodPolling", "外机罩");
columnEntityMapping.put("FSwitchpowerPolling", "开关电源");
columnEntityMapping.put("FSwitchPolling", "开关");
columnEntityMapping.put("FLightPolling", "灯");
columnEntityMapping.put("FIndoorPolling", "室内");
columnEntityMapping.put("FOutdoorPolling", "室外");
columnEntityMapping.put("FVideoPolling", "视频监控");
columnEntityMapping.put("FEnergyPolling", "节能设备");
columnEntityMapping.put("FArresterPolling", "室内避雷器");
columnEntityMapping.put("FMonitorPolling", "监控器");
columnEntityMapping.put("FNotePolling", "备注");
return columnEntityMapping;
}
// 随工记录信息
public static Map<String, String> workColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FCityWorkrecord", "地区");
columnEntityMapping.put("FWorktypeWorkrecord", "工作类型");
columnEntityMapping.put("FPersonWorkrecord", "执行人员");
columnEntityMapping.put("FCarWorkrecord", "执行车辆");
columnEntityMapping.put("FFinishstatusWorkrecord", "完成情况");
columnEntityMapping.put("FBegintimeWorkrecord", "工单开始时间");
columnEntityMapping.put("FFinishtimeWorkrecord", "计划完成时间");
columnEntityMapping.put("FEndtimeWorkrecord", "工单结束时间");
columnEntityMapping.put("FDuringWorkrecord", "历时(小时)");
columnEntityMapping.put("FReasonWorkrecord", "未完成原因");
columnEntityMapping.put("FNoteWorkrecord", "备注");
return columnEntityMapping;
}
// 网络调整信息
public static Map<String, String> networkColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FDateNetwork", "日期");
// columnEntityMapping.put("FOrderNetwork", "工单号");
columnEntityMapping.put("FCityNetwork", "地区");
columnEntityMapping.put("FAdjustNetwork", "网络调整类型");
columnEntityMapping.put("FFirsttypeNetwork", "原始站型");
columnEntityMapping.put("FAirtypeNetwork", "目标站型");
columnEntityMapping.put("FCarfreNetwork", "增减载频数量");
columnEntityMapping.put("FCduNetwork", "增减CDU数量");
columnEntityMapping.put("FDxuNetwork", "增减DXU数量");
columnEntityMapping.put("FMuNetwork", "MU/DUG数量");
columnEntityMapping.put("FRuNetwork", "RU/RUS数量");
columnEntityMapping.put("FTransNetwork", "增减传输数量");
columnEntityMapping.put("FEmNetwork", "E1板/2M线");
columnEntityMapping.put("FCabinetNetwork", "增加机柜数");
columnEntityMapping.put("FNeighborhoodNetwork", "增加小区数");
columnEntityMapping.put("FAntennaNetwork", "调整天线数量");
columnEntityMapping.put("FFinishstatusNetwork", "完成情况");
columnEntityMapping.put("FFinishdateNetwork", "完成日期");
columnEntityMapping.put("FMaintainerNetwork", "现场维护人员");
columnEntityMapping.put("FCarnoNetwork", "车牌号");
columnEntityMapping.put("FReasonNetwork", "未完成原因");
columnEntityMapping.put("FNoteNetwork", "备注");
return columnEntityMapping;
}
// 额外工作量信息
public static Map<String, String> extraworkColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FCityExtra", "城市");
columnEntityMapping.put("FSitenameExtra", "基站名称");
columnEntityMapping.put("FProjectExtra", "项目");
columnEntityMapping.put("FBegintimeExtra", "工期开始时间");
columnEntityMapping.put("FEndtimeExtra", "工期结束时间");
columnEntityMapping.put("FApplymanExtra", "申请人");
columnEntityMapping.put("FManExtra", "投入人力");
columnEntityMapping.put("FManhourExtra", "耗费总人时");
columnEntityMapping.put("FSitenoExtra", "涉及基站数量");
columnEntityMapping.put("FCarExtra", "投入车辆");
columnEntityMapping.put("FCarhourExtra", "耗费总车时");
columnEntityMapping.put("FCostExtra", "额外费用");
columnEntityMapping.put("FNoteExtra", "备注");
return columnEntityMapping;
}
// 天线调整信息
public static Map<String, String> feederadjustColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
// columnEntityMapping.put("FAdjustnoFeederadjust", "调整编号");
columnEntityMapping.put("FNettypeFeederadjust", "网络类型");
columnEntityMapping.put("FChannelFeederadjust", "频段");
columnEntityMapping.put("FApplytimeFeederadjust", "申请时间");
columnEntityMapping.put("FAdjusttimeFeederadjust", "调整时间");
columnEntityMapping.put("FVillagenameFeederadjust", "小区名");
columnEntityMapping.put("FVillagenoFeederadjust", "小区号");
columnEntityMapping.put("FModelFeederadjust", "天线型号");
columnEntityMapping.put("FContentFeederadjust", "调整内容");
columnEntityMapping.put("FReasonFeederadjust", "调整原因");
columnEntityMapping.put("FFinishstatusFeederadjust", "完成情况");
columnEntityMapping.put("FEffectFeederadjust", "调整效果");
columnEntityMapping.put("FPersonFeederadjust", "申请人");
columnEntityMapping.put("FNoteFeederadjust", "备注");
return columnEntityMapping;
}
// 物资管理信息
public static Map<String, String> materialsColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FRegionMaterials", "地区");
columnEntityMapping.put("FWarehousingdateMaterials", "入库日期");
columnEntityMapping.put("FNumberMaterials", "物资编码");
columnEntityMapping.put("FStateMaterials", "物品状态");
columnEntityMapping.put("FSortMaterials", "物品分类");
columnEntityMapping.put("FManufacturersMaterials", "物品厂家");
columnEntityMapping.put("FNameMaterials", "物品名称");
columnEntityMapping.put("FSpecificationMaterials", "物品型号、规格");
columnEntityMapping.put("FQuantityMaterials", "数量");
columnEntityMapping.put("FProposerMaterials", "采购申请人");
columnEntityMapping.put("FExecutorMaterials", "采购执行人");
columnEntityMapping.put("FManagementMterials", "物品管理责任人");
columnEntityMapping.put("FUserMaterials", "物品使用人");
columnEntityMapping.put("FDepreciabletimeMaterials", "折旧年限");
columnEntityMapping.put("FNoteMaterials", "备注");
return columnEntityMapping;
}
/**
* 巡检计划信息
*
* @param columnEntityMapping
* @return
*/
public static Map<String, String> inspectionColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FAreaInspection", "地区");
columnEntityMapping.put("FPersonInspection", "巡检人");
columnEntityMapping.put("FDateInspection", "计划巡检日期");
columnEntityMapping.put("FTeamInspection", "维护队伍");
columnEntityMapping.put("FNoteInspection", "备注");
return columnEntityMapping;
}
// 仪器仪表信息
public static Map<String, String> meterColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FRegionMeter", "地区");
columnEntityMapping.put("FManuMeter", "厂家");
columnEntityMapping.put("FNameMeter", "名称");
columnEntityMapping.put("FModelMeter", "规格型号");
columnEntityMapping.put("FPurchasedateMeter", "采购日期");
columnEntityMapping.put("FAmountMeter", "数量");
columnEntityMapping.put("FStatusMeter", "当前状态");
columnEntityMapping.put("FNoteMeter", "备注");
return columnEntityMapping;
}
// 车辆行驶信息
public static Map<String, String> vehiclerunColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FRegionVehiclerun", "地区");
columnEntityMapping.put("FDateVehiclerun", "日期");
columnEntityMapping.put("FLicenseVehiclerun", "车牌号");
columnEntityMapping.put("FStaffVehiclerun", "司机");
columnEntityMapping.put("FMileagebeginVehiclerun", "起始里程数");
columnEntityMapping.put("FMileageendVehiclerun", "结束里程数");
columnEntityMapping.put("FMileageacountVehiclerun", "行驶里程数");
columnEntityMapping.put("FUsemanVehiclerun", "使用人");
columnEntityMapping.put("FWorkcontentVehiclerun", "工作内容");
columnEntityMapping.put("FWorkordernoVehiclerun", "工单号");
columnEntityMapping.put("FNoteVehiclerun", "备注");
return columnEntityMapping;
}
// 车辆加油信息
public static Map<String, String> vehiclerefuelColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FRegionVehiclerefuel", "地区");
columnEntityMapping.put("FDateVehiclerefuel", "加油日期");
columnEntityMapping.put("FLicenseVehiclerefuel", "车牌号");
columnEntityMapping.put("FStaffVehiclerefuel", "司机");
columnEntityMapping.put("FMileageVehiclerefuel", "加油当时里程");
columnEntityMapping.put("FPriceVehiclerefuel", "单价");
columnEntityMapping.put("FAmountVehiclerefuel", "数量");
columnEntityMapping.put("FCostVehiclerefuel", "金额");
columnEntityMapping.put("FRefuelplaceVehiclerefuel", "加油地点");
columnEntityMapping.put("FRefuelmanVehiclerefuel", "加油人");
columnEntityMapping.put("FNoteVehiclerefuel", "备注");
return columnEntityMapping;
}
// 合同信息
public static Map<String, String> insuranceColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FPersonidInsurance", "员工号");
columnEntityMapping.put("FStautsInsurance", "状态");
columnEntityMapping.put("FTypeInsurance", "合同类型");
columnEntityMapping.put("FBegintimeInsurance", "合同开始时间");
columnEntityMapping.put("FEndtimeInsurance", "合同结束时间");
columnEntityMapping.put("FBelongInsurance", "当期合同归属");
return columnEntityMapping;
}
// 油机加油
public static Map<String, String> oilmachineFillColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("regionOilmachinefill", "地区");
columnEntityMapping.put("numberOilmachinefill", "油机编码");
columnEntityMapping.put("dateOilmachinefill", "加油日期");
columnEntityMapping.put("personOilmachinefill", "加油人");
columnEntityMapping.put("amountOilmachinefill", "加油量");
columnEntityMapping.put("priceOilmachinefill", "单价");
columnEntityMapping.put("costOilmachinefill", "金额");
columnEntityMapping.put("noteOilmachinefill", "备注");
return columnEntityMapping;
}
// 油机管理
public static Map<String, String> oilmachinemanageColumns(Map<String, String> columnEntityMapping) {
if (Validate.isNull(columnEntityMapping)) {
columnEntityMapping = new LinkedHashMap<String, String>();
} else {
columnEntityMapping.clear();
}
columnEntityMapping.put("FRegionOilmachinemanage", "地区");
columnEntityMapping.put("FNumberOilmachinemanage", "油机编号");
columnEntityMapping.put("FPersonOilmachinemanage", "负责人");
columnEntityMapping.put("FStatusOilmachinemanage", "当前状态");
columnEntityMapping.put("FModelOilmachinemanage", "油机型号");
columnEntityMapping.put("FVolumeOilmachinemanage", "油箱容量");
columnEntityMapping.put("FDateOilmachinemanage", "购买日期");
columnEntityMapping.put("FManuOilmachinemanage", "生产厂家");
columnEntityMapping.put("FOldyearOilmachinemanage", "折旧年限");
columnEntityMapping.put("FItemsOilmachinemanage", "附属物品");
columnEntityMapping.put("FNoteOilmachinemanage", "备注");
return columnEntityMapping;
}
/**
* 属性名转为显示名称
*
* @param fieldName
* @return
*/
public static String convertToColumnName(String fieldName) {
Map<String, String> combinedMap = new HashMap<String, String>();
combinedMap.putAll(
ColumnsDefination.siteColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.airColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.feederColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.fireExtColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.mainDeviceColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.monitorColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.powerColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.repeaterColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.roomBranchExtColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.rruColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.towerColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.transColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.faultColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.personColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.violationColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.driverColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.vehicleColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.electricityColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.pollingColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.workColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.networkColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.extraworkColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.feederadjustColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.inspectionColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.meterColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.materialsColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.vehiclerunColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.vehiclerefuelColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.insuranceColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.oilmachinemanageColumns(ColumnsDefination.columnEntityMapping));
combinedMap.putAll(
ColumnsDefination.oilmachineFillColumns(ColumnsDefination.columnEntityMapping));
if (Validate.isEmpty(combinedMap.get(fieldName))) {
return "";
}
return combinedMap.get(fieldName);
}
}
}