From e72766e5c5cceae416c0fa17ef075a01cd3fd396 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 13 八月 2025 09:34:34 +0800
Subject: [PATCH] 检验任务筛选增加人员字段+检验和复核支持样品编号的修改
---
cnas-server/src/main/java/com/yuanchu/mom/service/impl/DeviceServiceImpl.java | 1192 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 1,183 insertions(+), 9 deletions(-)
diff --git a/cnas-server/src/main/java/com/yuanchu/mom/service/impl/DeviceServiceImpl.java b/cnas-server/src/main/java/com/yuanchu/mom/service/impl/DeviceServiceImpl.java
index 4715647..f1723fd 100644
--- a/cnas-server/src/main/java/com/yuanchu/mom/service/impl/DeviceServiceImpl.java
+++ b/cnas-server/src/main/java/com/yuanchu/mom/service/impl/DeviceServiceImpl.java
@@ -1,19 +1,48 @@
package com.yuanchu.mom.service.impl;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson2.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.deepoove.poi.XWPFTemplate;
+import com.deepoove.poi.config.Configure;
import com.yuanchu.mom.common.GetLook;
import com.yuanchu.mom.common.PrintChina;
-import com.yuanchu.mom.mapper.DeviceMapper;
-import com.yuanchu.mom.pojo.Device;
+import com.yuanchu.mom.dto.*;
+import com.yuanchu.mom.exception.ErrorException;
+import com.yuanchu.mom.mapper.*;
+import com.yuanchu.mom.pojo.*;
+import com.yuanchu.mom.service.DataConfigService;
import com.yuanchu.mom.service.DeviceService;
+import com.yuanchu.mom.service.DocumentService;
+import com.yuanchu.mom.utils.DataAcquisition;
+import com.yuanchu.mom.utils.HackLoopTableRenderPolicy;
import com.yuanchu.mom.utils.QueryWrappers;
+import com.yuanchu.mom.vo.Result;
import lombok.AllArgsConstructor;
+import org.apache.logging.log4j.util.Strings;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.stream.Collectors;
/**
* 璁惧(Device)琛ㄦ湇鍔″疄鐜扮被
@@ -26,19 +55,45 @@
private DeviceMapper deviceMapper;
+ private EnumServiceImpl enumService;
+
+ private UserMapper userMapper;
+
+ private StructureItemParameterMapper structureItemParameterMapper;
+
+ @Autowired
+ private DataConfigService dataConfigService;
+
+ private QrShowServiceImpl qrShowService;
+
+ private InsSampleMapper insSampleMapper;
+
+ private DocumentService documentService;
+
+ private DeviceMetricRecordMapper deviceMetricRecordMapper;
+
+ private DeviceMaintenanceMapper deviceMaintenanceMapper;
+
@Override
- public Map<String, Object> selectDeviceParameter(Page page, Device itemParameter) {
+ public List<User> selectUserList() {
+ List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().like(User::getDepartLimsId, "1"));
+ return users;
+ }
+
+ @Override
+ public Map<String, Object> selectDeviceParameter(Page page, DeviceDto itemParameter,Boolean laboratoryNameIsNull) {
Map<String, Object> map = new HashMap<>();
- map.put("head", PrintChina.printChina(Device.class));
+ map.put("head", PrintChina.printChina(DeviceDto.class));
Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectDeviceParameter");
- if(map1.get("look")==1) itemParameter.setCreateUser(map1.get("userId"));
- map.put("body", deviceMapper.selectDeviceParameter(page, QueryWrappers.queryWrappers(itemParameter)));
+ if (map1.get("look") == 1) itemParameter.setCreateUser(map1.get("userId"));
+ IPage<DeviceDto> iPage = deviceMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(itemParameter),laboratoryNameIsNull);
+ map.put("body", iPage);
return map;
}
@Override
public int addDeviceParameter(Device itemParameter) {
- return deviceMapper.insert(itemParameter);
+ return deviceMapper.insert(itemParameter);
}
@Override
@@ -46,15 +101,1134 @@
return deviceMapper.deleteById(id);
}
+ @Transactional(rollbackFor = Exception.class)
@Override
public int upDeviceParameter(Device itemParameter) {
+ // 鍒犻櫎鏁伴噰闆嗛厤缃暟鎹�
+ dataConfigService.deleteDataConfig();
return deviceMapper.updateById(itemParameter);
}
@Override
public List<Device> selectEquipmentOverview() {
- return deviceMapper.selectEquipmentOverview();
+ return deviceMapper.selectEquipmentOverview(new Page(1, 10), QueryWrappers.queryWrappers(new Device()));
}
-}
+ @Override
+ public List<Device> authorizedPerson() {
+ return deviceMapper.authorizedPerson();
+ }
+ @Override
+ public List<Device> search(Integer status, String deviceName, String specificationModel, String largeCategory) {
+ return deviceMapper.search(status, deviceName, specificationModel, largeCategory);
+ }
+
+ @Override
+ public List<Device> selectDevicePrincipal() {
+ return deviceMapper.selectDevicePrincipal();
+ }
+
+ @Override
+ public List<Device> selectDeviceByCategory(String inspectionItem, String inspectionItemSubclass) {
+ List<Integer> id;
+ try {
+ if (ObjectUtils.isEmpty(inspectionItemSubclass)) {
+// id = structureItemParameterMapper.selectOne(Wrappers.<StructureItemParameter>lambdaQuery()
+// .eq(StructureItemParameter::getInspectionItem, inspectionItem)
+// .last("limit 1").select(StructureItemParameter::getId)).getId();
+ id = structureItemParameterMapper.selectList(Wrappers.<StructureItemParameter>lambdaQuery()
+ .eq(StructureItemParameter::getInspectionItem, inspectionItem)
+ .select(StructureItemParameter::getId)).stream().map(StructureItemParameter::getId).collect(Collectors.toList());
+
+ }else {
+// id = structureItemParameterMapper.selectOne(Wrappers.<StructureItemParameter>lambdaQuery()
+// .eq(StructureItemParameter::getInspectionItem, inspectionItem)
+// .eq(StructureItemParameter::getInspectionItemSubclass, inspectionItemSubclass)
+// .last("limit 1").select(StructureItemParameter::getId)).getId();
+ id = structureItemParameterMapper.selectList(Wrappers.<StructureItemParameter>lambdaQuery()
+ .eq(StructureItemParameter::getInspectionItem, inspectionItem)
+ .eq(StructureItemParameter::getInspectionItemSubclass, inspectionItemSubclass)
+ .select(StructureItemParameter::getId)).stream().map(StructureItemParameter::getId).collect(Collectors.toList());
+ }
+ } catch (Exception e) {
+ return null;
+ }
+ List<Device> devices = deviceMapper.selectList(Wrappers.<Device>lambdaQuery()
+ .eq(Device::getDeviceStatus, 0)
+ .isNotNull(Device::getInsProductIds));
+ List<Device> devices2 = new ArrayList<>();
+ for (Device device : devices) {
+ String[] ids = device.getInsProductIds().split(",");
+ for (String i : ids) {
+ if (ObjectUtils.isNotEmpty(i)) {
+ if (id.contains(Integer.parseInt(i))) {
+ devices2.add(device);
+ break;
+ }
+ }
+ }
+ }
+ return devices2;
+ }
+
+ @Override
+ public Device selectDeviceByCode(Integer id) {
+ DeviceDto deviceDto = deviceMapper.selectDeviceByCode(id);
+ List<Integer> ids = new ArrayList<>();
+ if (Strings.isNotEmpty(deviceDto.getAuthorizedPerson())) {
+ if (deviceDto.getAuthorizedPerson().equals("null")) {
+ deviceDto.setAuthorizedPerson("[]");
+ }
+ ids = JSON.parseArray(deviceDto.getAuthorizedPerson(), Integer.class);
+ }
+ String name = "";
+ if (!ids.isEmpty()) {
+ name = userMapper.selectBatchIds(ids).stream().map(User::getName).collect(Collectors.joining(","));
+ }
+ deviceDto.setAuthorizedPersonName(name);
+ //鏌ヨ璁惧鏍″噯淇℃伅
+ DeviceMetricRecord calibrate = qrShowService.getDeviceMetricRecord(id, "calibrate");
+ //deviceDto.setCalibrationDate(qrShowService.formatDate(calibrate.getCalibrationDate(),"yyyy-MM-dd"));
+ deviceDto.setCalibrateNo(calibrate.getCertificateSerialNumber());
+
+ // 鍒颁簡鍋滅敤鏃ユ湡锛岃嚜鍔ㄥ皢鐘舵�佹敼涓哄仠鐢�
+ if (deviceDto.getNextCalibrationDate() != null) {
+ if (LocalDateTime.now().isAfter(deviceDto.getNextCalibrationDate())) {
+ List<Enums> enums = enumService.selectEnumByCategory("璁惧鐘舵��");
+ List<Enums> status = enums.stream().filter(item -> item.getLabel().equals("鍋滅敤")).collect(Collectors.toList());
+ deviceDto.setDeviceStatus(Integer.parseInt(status.get(0).getValue()));
+ deviceMapper.updateById(deviceDto);
+ }
+ }
+ return deviceDto;
+ }
+
+ @Override
+ public Result<?> dataAcquisition(HttpServletRequest request, Integer id, String entrustCode, String sampleCode) {
+ // 闃叉鍥炵幆鍦板潃鍙樹负IPv6
+ String ip = DataAcquisition.getIp(request);
+ List<Device> device = baseMapper.selectList(Wrappers.<Device>lambdaQuery()
+ .eq(Device::getIp, ip));
+ // 1銆佹楠�
+ if(device.size() > 1) {
+ String str = "";
+ for (Device device1 : device) {
+ str += device1.getDeviceName() + "锛�";
+ }
+ throw new ErrorException("IP锛�" + ip + "閰嶇疆浜嗚澶囧涓澶囷細" + str + "锛屾棤娉曡繘琛屾暟閲囷紒");
+ }
+ if (ObjectUtils.isEmpty(device)) {
+ throw new ErrorException("鏈粰璇P锛�" + ip + "閰嶇疆璁惧锛屾棤娉曡繘琛屾暟閲囷紒");
+ }
+ List<Map<String, Object>> inspectionItemSubclass = baseMapper.getInspectionItemSubclass(id);
+ if (ObjectUtils.isEmpty(device.get(0).getFileType()) || ObjectUtils.isEmpty(device.get(0).getCollectUrl())) {
+ throw new ErrorException("鏈粰璇ワ細" + device.get(0).getDeviceName() + "璁惧閰嶇疆閲囬泦璺緞鎴栨枃浠跺悗缂�锛�");
+ }
+ // 2銆佸彇璁惧鍏宠仈鐨勬楠岄」锛屾楠屽瓙椤�
+ List<DataConfig> list1 = new ArrayList<>();
+ inspectionItemSubclass.forEach(i -> {
+ List<DataConfig> list = dataConfigService.list(Wrappers.<DataConfig>lambdaQuery()
+ .eq(DataConfig::getDeviceId, device.get(0).getId())
+ .eq(DataConfig::getInspectionItem, i.get("inspection_item"))
+ .eq(DataConfig::getInspectionItemSubclass, i.get("inspection_item_subclass"))
+ .orderBy(false, false, DataConfig::getId));
+ list1.addAll(list);
+ });
+ List<DataConfig> collect = list1.stream().distinct().collect(Collectors.toList());
+ // 3銆侀噰闆嗭紝鍙栨暟鎹�
+ Map<String, Object> map = DataAcquisition.dataAcquisitionEntrance(collect, device.get(0), entrustCode, sampleCode, ip);
+ // 4銆侀�犲惊鐜鏁帮紝鍙備笌鍏紡璁$畻
+ if (ObjectUtils.isNotEmpty(map)) {
+ Map<String, Object> frequency = DataAcquisition.createFrequency(entrustCode, sampleCode, map);
+ return Result.success(frequency);
+ } else {
+ return Result.success(null);
+ }
+ }
+
+ @Override
+ public List<ADto> menu() {
+ //鏌ヨ鎵�鏈夎澶囦俊鎭�
+ List<Device> devices = baseMapper.selectList(null);
+ List<String> name = devices.stream().map(Device::getDeviceName).collect(Collectors.toList());
+
+ //鏌ヨ鎵�鏈夌敤鎴蜂俊鎭�
+ List<User> users = userMapper.selectList(null);
+ List<String> collect = users.stream().map(User::getName).collect(Collectors.toList());
+ String menu="[\n" +
+ "\t{\n" +
+ "\t\tk: 0,\n" +
+ "\t\tv: \"涓汉棣栭〉\",\n" +
+ "\t\ti: \"font icon-shouyefill\",\n" +
+ "\t\tself: true,\n" +
+ "\t\tc: [{\n" +
+ "\t\t\tk: 0,\n" +
+ "\t\t\tv: \"涓汉棣栭〉\",\n" +
+ "\t\t\ti: \"font icon-shouyefill\",\n" +
+ "\t\t\tu: \"index-index\"\n" +
+ "\t\t}]\n" +
+ "\t},\n" +
+ "\t{\n" +
+ "\t\tv: \"涓氬姟绠$悊\",\n" +
+ "\t\ti: \"font icon-kexueyanjiuheshiyankaifa\",\n" +
+ "\t\tp: \"selectInsOrderParameter selectInsOrderPlanList pageInsReport costStatistics selectWarehouse\",\n" +
+ "\t\tc: [\n" +
+ " {\n" +
+ " v: \"鍘熸潗鏂欐楠屼笅鍗昞",\n" +
+ " i: \"font icon-erjidaohang\",\n" +
+ " u: \"b1-material-inspection-order\",\n" +
+ " p: \"selectInsOrderParameter\"\n" +
+ " },\n" +
+ " {\n" +
+ "\t\t\tv: \"妫�楠屼笅鍗昞",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b1-inspection-order\",\n" +
+ "\t\t\tp: \"selectInsOrderParameter\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"妫�楠屼换鍔",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b1-inspect-order-plan\",\n" +
+ "\t\t\tp: \"selectInsOrderPlanList\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鎶ュ憡缂栧埗\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b1-report-preparation\",\n" +
+ "\t\t\tp: \"pageInsReport\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璐圭敤缁熻\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b1-expenses\",\n" +
+ "\t\t\tp: \"costStatistics\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏍峰搧绠$悊\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b1-sample\",\n" +
+ "\t\t\tp: \"selectWarehouse\"\n" +
+ "\t\t},{\n" +
+ "\t\t\tv: \"涓嶅悎鏍肩鐞哱",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b1-unpass\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}\n" +
+ "\t]\n" +
+ "\t},\n" +
+ "\t{\n" +
+ "\t\tv: \"鏍囧噯闆哱",\n" +
+ "\t\ti: \"font icon-biaozhunji\",\n" +
+ "\t\tp: \"selectStandardTreeList selectStandardTemplatePageList\",\n" +
+ "\t\tc: [{\n" +
+ "\t\t\tv: \"鏍囧噯搴揬",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b2-standard\",\n" +
+ "\t\t\tp: \"selectStandardTreeList\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鍘熷璁板綍妯℃澘\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b2-standard-template\",\n" +
+ "\t\t\tp: \"selectStandardTemplatePageList\"\n" +
+ "\t\t}]\n" +
+ "\t},\n" +
+ "\t{\n" +
+ "\t\tv: \"缁╂晥绠$悊\",\n" +
+ "\t\ti: \"font icon-jixiaoguanli\",\n" +
+ "\t\tp: \"\",\n" +
+ "\t\tc: [{\n" +
+ "\t\t\tv: \"宸ユ椂绠$悊\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b3-work-time-management\",\n" +
+ "\t\t\tp: \"selectAuxiliaryWorkingHours\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳鑰冨嫟\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳鑰冭瘎\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b3-personnel-evaluation\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳鑰冩牳\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鎶�鑳界瓑绾",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"宸ヨ祫缁撶畻\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鐝\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b3-classes\",\n" +
+ "\t\t\tp: \"performanceShiftPage performanceShiftPageYear\"\n" +
+ "\t\t}]\n" +
+ "\t},\n" +
+ "\t{\n" +
+ "\t\tv: \"缁熻鍥捐〃\",\n" +
+ "\t\ti: \"font icon-tongjitubiao\",\n" +
+ "\t\tp: \"\",\n" +
+ "\t\tc: [{\n" +
+ "\t\t\tv: \"瀹為獙瀹よ绱燶",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"姣忔棩涓氬姟缁熻\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b4-daily-business-statistics\",\n" +
+ "\t\t\tp: \"businessStatisticsByDay\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"妫�娴嬮」鐩粺璁",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b4-inspection-item-statistics\",\n" +
+ "\t\t\tp: \"testProductByDay\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏍峰搧缂洪櫡鎸囨暟\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"b4-sample-defects\",\n" +
+ "\t\t\tp: \"selectSampleDefects\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鑰楁潗缁熻\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳宸ヤ綔鎶ヨ〃\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}]\n" +
+ "\t},\n" +
+ "\t{\n" +
+ "\t\tv: \"鐢靛瓙鐪嬫澘\",\n" +
+ "\t\ti: \"font icon-dianzikanban-fan\",\n" +
+ "\t\tp: \"\",\n" +
+ "\t\tc: [{\n" +
+ "\t\t\tv: \"瀹㈡埛鎺ュ緟\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浠诲姟灞曠ず\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧鐘舵�佸強楗卞拰搴",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}]\n" +
+ "\t},\n" +
+ "\t{\n" +
+ "\t\tv: \"绯荤粺鍔熻兘\",\n" +
+ "\t\ti: \"el-icon-s-tools\",\n" +
+ "\t\tp: \"\",\n" +
+ "\t\tc: [{\n" +
+ "\t\t\tv: \"鏁版嵁瀛楀吀\",\n" +
+ "\t\t\ti: \"el-icon-s-tools\",\n" +
+ "\t\t\tu: \"enums\",\n" +
+ "\t\t\tp: \"selectEnumList\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"瑙掕壊绠$悊\",\n" +
+ "\t\t\ti: \"el-icon-s-tools\",\n" +
+ "\t\t\tu: \"role-manage\",\n" +
+ "\t\t\tp: \"selectRoleLists\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鐢ㄦ埛绠$悊\",\n" +
+ "\t\t\ti: \"el-icon-s-tools\",\n" +
+ "\t\t\tu: \"person-manage\",\n" +
+ "\t\t\tp: \"selectUserList\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"瀹㈡埛绠$悊\",\n" +
+ "\t\t\ti: \"el-icon-s-tools\",\n" +
+ "\t\t\tu: \"custom_manage\",\n" +
+ "\t\t\tp: \"selectCustomPageList\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"绯荤粺鏃ュ織\",\n" +
+ "\t\t\ti: \"el-icon-s-tools\",\n" +
+ "\t\t\tu: \"system-log\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"娑堟伅璇︽儏\",\n" +
+ "\t\t\ti: \"el-icon-s-tools\",\n" +
+ "\t\t\tu: \"notice-detail\",\n" +
+ "\t\t\tp: \"abcd\"\n" +
+ "\t\t}]\n" +
+ "\t},\n" +
+ "\t{\n" +
+ "\t\tv: \"4 閫氱敤瑕佹眰\",\n" +
+ "\t\ti: \"font icon-tongyongyaoqiu\",\n" +
+ "\t\tp: \"\",\n" +
+ "\t\tc: [{\n" +
+ "\t\t\t\tv: \"閫氱敤瑕佹眰\",\n" +
+ "\t\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\t\tu: \"\",\n" +
+ "\t\t\t\tg: \"4 閫氱敤瑕佹眰\",\n" +
+ "\t\t\t\tp: \"\"\n" +
+ "\t\t\t},\n" +
+ "\t\t\t{\n" +
+ "\t\t\t\tv: \"鍏鎬",\n" +
+ "\t\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\t\tu: \"\",\n" +
+ "\t\t\t\tg: \"4.1 鍏鎬",\n" +
+ "\t\t\t\tp: \"\"\n" +
+ "\t\t\t},\n" +
+ "\t\t\t{\n" +
+ "\t\t\t\tv: \"淇濆瘑鎬",\n" +
+ "\t\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\t\tu: \"\",\n" +
+ "\t\t\t\tg: \"4.2 淇濆瘑鎬",\n" +
+ "\t\t\t\tp: \"\"\n" +
+ "\t\t\t}\n" +
+ "\t\t]\n" +
+ "\t},\n" +
+ "\t{\n" +
+ "\t\tv: \"5 缁撴瀯瑕佹眰\",\n" +
+ "\t\ti: \"font icon-jiegouyaoqiu\",\n" +
+ "\t\tp: \"\",\n" +
+ "\t\tc: [{\n" +
+ "\t\t\tv: \"瀹為獙瀹ょ殑娉曞緥鍦颁綅\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"A瀹為獙瀹ょ殑娉曞緥鍦颁綅\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鍏ㄦ潈璐熻矗鐨勭鐞嗗眰\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"B鍏ㄦ潈璐熻矗鐨勭鐞嗗眰\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"瀹為獙瀹よ祫璐╘",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a5-laboratory-qualifications\",\n" +
+ "\t\t\tg: \"C鑳藉姏鑼冨洿鍜岃祫璐╘",\n" +
+ "\t\t\tp: \"getCertificationDetail\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鑳藉姏鑼冨洿\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a5-capacity-scope\",\n" +
+ "\t\t\tg: \"C鑳藉姏鑼冨洿鍜岃祫璐╘",\n" +
+ "\t\t\tp: \"selectItemParameterList selectTestObjectList\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鍦烘墍鎴栬鏂絓",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a5-laboratory-management\",\n" +
+ "\t\t\tg: \"D鍦烘墍鎴栬鏂絓",\n" +
+ "\t\t\tp: \"selectItemParameter\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"缁勭粐鐩稿叧鏂囦欢\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"E缁勭粐鐩稿叧鏂囦欢\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳宀椾綅浠昏亴\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"F浜哄憳宀椾綅浠昏亴\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"娌熼�氬拰瀹h疮\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"G娌熼�氬拰瀹h疮\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}]\n" +
+ "\t}, {\n" +
+ "\t\tv: \"6 璧勬簮瑕佹眰\",\n" +
+ "\t\ti: \"font icon-ziyuanyaoqiu\",\n" +
+ "\t\tp: \"\",\n" +
+ "\t\tc: [{\n" +
+ "\t\t\tv: \"鎬诲垯\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.1 鎬诲垯\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳鎬昏\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a6-personnel-overview\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"selectPersonnelOverview\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳鏄庣粏\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a6-personnel-detail\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"selectDepartmentLim\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳鍩硅\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳鐩戠潱\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"宀椾綅鑱岃矗\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳鍩烘湰淇℃伅\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"宸ヤ綔灞ュ巻\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"濂栨儵璁板綍\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鍩硅璁板綍\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鐩戠潱璁板綍\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浠昏亴鎺堟潈璁板綍\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浜哄憳鑳藉姏鐩戞帶璁板綍\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"娌熼�氳褰昞",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.2 浜哄憳\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"澶栨潵浜哄憳绠$悊\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a6-external-personnel-management\",\n" +
+ "\t\t\tg: \"6.3 璁炬柦鍜岀幆澧冩潯浠禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"瀹為獙瀹よ鏂藉満鎵�淇℃伅\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.3 璁炬柦鍜岀幆澧冩潯浠禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁炬柦鍜岀幆澧冩潯浠惰姹俓",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.3 璁炬柦鍜岀幆澧冩潯浠禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鐜鏉′欢寮曠敤\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.3 璁炬柦鍜岀幆澧冩潯浠禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"瀹夊叏鍖轰唬琛ㄦ鏌",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.3 璁炬柦鍜岀幆澧冩潯浠禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"瀹夊叏鍐呭姟\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.3 璁炬柦鍜岀幆澧冩潯浠禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"搴熺墿澶勭悊浜ゆ帴璁板綍\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a6-waste-handover\",\n" +
+ "\t\t\tg: \"6.3 璁炬柦鍜岀幆澧冩潯浠禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧鎬昏\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a6-device-overview\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"selectDeviceParameter\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧宸ュ叿鏄庣粏\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a6-device-management\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"selectDeviceParameter\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璧勬簮棰勫畾\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浣滀笟鎸囧涔",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧杩愯鎬昏\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧妗f\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧楠屾敹\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧鏍″噯\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧鏍告煡\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧缁存姢\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧鍊熺敤\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧鏁呴殰\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"浣跨敤璁板綍\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁惧鍋滅敤/鍚敤\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.4 璁惧\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"閲忓�兼函婧愯鍒抃",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.5 璁¢噺婧簮鎬",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏍囧噯鐗╄川娓呭崟\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a6-standard-material-list\",\n" +
+ "\t\t\tg: \"6.5 璁¢噺婧簮鎬",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏍囧噯鐗╄川楠屾敹\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.5 璁¢噺婧簮鎬",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏍囧噯鐗╄川棰嗙敤\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a6-standard-material-requisition\",\n" +
+ "\t\t\tg: \"6.5 璁¢噺婧簮鎬",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"杩囨湡鏍囨牱澶勭疆\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.5 璁¢噺婧簮鎬",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏈嶅姟鍜屼緵搴斿搧閲囪喘\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.6 澶栭儴鎻愪緵鐨勪骇鍝佸拰鏈嶅姟\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t},{\n" +
+ "\t\t\tv: \"渚涘簲鍟嗙鐞哱",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"6.6 澶栭儴鎻愪緵鐨勪骇鍝佸拰鏈嶅姟\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}]\n" +
+ "\t},\n" +
+ "\t{\n" +
+ "\t\tv: \"7 杩囩▼瑕佹眰\",\n" +
+ "\t\ti: \"font icon-guochengyaoqiu\",\n" +
+ "\t\tp: \"\",\n" +
+ "\t\tc: [{\n" +
+ "\t\t\tv: \"妫�楠屽鎵樺崟\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.1 瑕佹眰銆佹爣涔﹀拰鍚堝悓璇勫\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鍚堝悓璇勫\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.1 瑕佹眰銆佹爣涔﹀拰鍚堝悓璇勫\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"瀹為獙瀹ょ殑妫�娴嬭兘鍔涙。妗圽",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"a7-standard-method\",\n" +
+ "\t\t\tg: \"7.2 鏂规硶鐨勯�夋嫨銆侀獙璇佸拰纭\",\n" +
+ "\t\t\tp: \"selectStandardMethodList\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏍囧噯鏌ユ柊\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.2 鏂规硶鐨勯�夋嫨銆侀獙璇佸拰纭\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏍囧噯鏂规硶鐨勫彉鏇碶",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.2 鏂规硶鐨勯�夋嫨銆侀獙璇佸拰纭\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏂规硶楠岃瘉\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.2 鏂规硶鐨勯�夋嫨銆侀獙璇佸拰纭\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鎶芥牱\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.3 鎶芥牱\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"妫�娴嬫垨鏍″噯鐗╁搧鐨勫缃甛",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.4 妫�娴嬫垨鏍″噯鐗╁搧鐨勫缃甛",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鎶�鏈褰昞",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.5 鎶�鏈褰昞",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"娴嬮噺涓嶇‘瀹氬害鐨勮瘎瀹歕",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.6 娴嬮噺涓嶇‘瀹氬害鐨勮瘎瀹歕",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"纭繚缁撴灉鏈夋晥鎬",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.7 纭繚缁撴灉鏈夋晥鎬",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鎶ュ憡缁撴灉\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.8 鎶ュ憡缁撴灉\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鎶曡瘔璇︽儏\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.9 鎶曡瘔\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鎶曡瘔鎯呭喌姹囨�昏〃\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.9 鎶曡瘔\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"涓嶇鍚堥」\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.10 涓嶇鍚堝伐浣淺",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"涓嶇鍚堥」鐨勫垎甯僜",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.10 涓嶇鍚堝伐浣淺",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏁版嵁鎺у埗鍜屼俊鎭鐞哱",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"7.11 鏁版嵁鎺у埗鍜屼俊鎭鐞哱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}]\n" +
+ "\t},\n" +
+ "\t{\n" +
+ "\t\tv: \"8 浣撶郴绠$悊瑕佹眰\",\n" +
+ "\t\ti: \"font icon-guanlitixiyaoqiu\",\n" +
+ "\t\tp: \"\",\n" +
+ "\t\tc: [{\n" +
+ "\t\t\tv: \"鏂瑰紡\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.1 鏂瑰紡\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"绠$悊浣撶郴鏂囦欢\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.2 绠$悊浣撶郴鏂囦欢\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏂囦欢娓呭崟\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.3 绠$悊浣撶郴鏂囦欢鐨勬帶鍒禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏂囦欢鍙楁帶\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.3 绠$悊浣撶郴鏂囦欢鐨勬帶鍒禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏂囦欢鍙戞斁鍥炴敹\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.3 绠$悊浣撶郴鏂囦欢鐨勬帶鍒禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏂囦欢鍙樻洿\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.3 绠$悊浣撶郴鏂囦欢鐨勬帶鍒禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鏂囦欢浣滃簾\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.3 绠$悊浣撶郴鏂囦欢鐨勬帶鍒禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"璁板綍鐨勬帶鍒禱",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.4 璁板綍鐨勬帶鍒禱",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"搴斿椋庨櫓鍜屾満閬囩殑鎺柦\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.5 搴斿椋庨櫓鍜屾満閬囩殑鎺柦\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"瀹㈡埛鍩烘湰淇℃伅绠$悊\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.6 鏀硅繘\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"瀹㈡埛婊℃剰搴",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.6 鏀硅繘\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"绾犳鎺柦\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.7 绾犳鎺柦\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"鍐呭绠$悊\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.8 鍐呭绠$悊\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}, {\n" +
+ "\t\t\tv: \"绠$悊璇勫\",\n" +
+ "\t\t\ti: \"font icon-erjidaohang\",\n" +
+ "\t\t\tu: \"\",\n" +
+ "\t\t\tg: \"8.9 绠$悊璇勫\",\n" +
+ "\t\t\tp: \"\"\n" +
+ "\t\t}]\n" +
+ "\t}\n" +
+ "]";
+ List<ADto> aDtos = JSONArray.parseArray(menu, ADto.class);
+ List<BDto> bDtos = aDtos.get(9).getC();
+ for (String s : name) {
+ BDto bDto = new BDto();
+ bDto.setV(s);
+ bDto.setI("font icon-erjidaohang");
+ bDto.setU("a6-device-overview");
+ bDto.setG("6.4 璁惧");
+ bDto.setP("selectDeviceParameter");
+ bDtos.add(bDto);
+ }
+ for (String s : collect) {
+ BDto bDto = new BDto();
+ bDto.setV(s);
+ bDto.setI("font icon-erjidaohang");
+ bDto.setU("a6-personnel-overview");
+ bDto.setG("6.2 浜哄憳");
+ bDto.setP("selectPersonnelOverview");
+ bDtos.add(bDto);
+ }
+
+ return aDtos;
+ }
+
+ @Override
+ public List<Map<String, Object>> treeDevice(String deviceName) {
+ List<Map<String, Object>> listMap = deviceMapper.treeDevice(deviceName);
+ return listMap;
+ }
+
+ @Override
+ public Result<?> determineWhetherToCollectData(String managementNumber, HttpServletRequest request) {
+ String ip = DataAcquisition.getIp(request);
+ Device device = baseMapper.selectOne(Wrappers.<Device>lambdaQuery()
+ .eq(Device::getIp, ip));
+ if (ObjectUtils.isEmpty(device)) {
+ return Result.success(false);
+ }
+ if (ObjectUtils.isEmpty(device.getFileType()) || ObjectUtils.isEmpty(device.getCollectUrl())) {
+ return Result.success(false);
+ } else {
+ return Result.success(true);
+ }
+ }
+
+ @Override
+ public void exportDeviceFile(Integer deviceId, HttpServletResponse response) {
+
+ // 璁惧淇℃伅
+ Device device = baseMapper.selectById(deviceId);
+ // 璁惧妗f
+ List<Document> documentList = documentService.list(Wrappers.<Document>lambdaQuery().eq(Document::getDeviceId, deviceId));
+ // 璁惧鏍″噯琛�
+ List<DeviceMetricRecord> deviceMetricRecordList = deviceMetricRecordMapper.selectList(Wrappers.<DeviceMetricRecord>lambdaQuery().eq(DeviceMetricRecord::getDeviceId, deviceId));
+ // 璁惧缁翠慨琛�
+ List<DeviceMaintenance> deviceMaintenanceList = deviceMaintenanceMapper.selectList(Wrappers.<DeviceMaintenance>lambdaQuery().eq(DeviceMaintenance::getDeviceId, deviceId));
+
+
+ // 杩斿洖缁檞ord鐨勬暟鎹垪琛� 鍒嗕负宸﹀彸涓ゅ垪鏁版嵁
+ List<DocumentExportWordDto> documentExportWordDtoList = new ArrayList<>();
+ // 缁欐。妗堝姞搴忓彿 骞跺乏鍙冲垎涓哄乏鍙充袱鍒楀湪word涓樉绀�
+ extracted(documentList, documentExportWordDtoList);
+
+
+ // 灏嗘牎鍑嗚〃鍜岀淮淇〃鏀惧叆涓�涓璞′腑鏂逛究word琛ㄦ牸涓樉绀�
+ List<DeviceMetricRecordAndMaintenanceDto> deviceMetricRecordAndMaintenanceDtoList = getDeviceMetricRecordAndMaintenanceDtoList(deviceMetricRecordList, deviceMaintenanceList);
+
+
+ // 鑾峰彇璺緞
+ InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-document.docx");
+ Configure configure = Configure.builder()
+ .bind("document", new HackLoopTableRenderPolicy())
+ .bind("deviceMetricRecordAndMaintenanceDtoList", new HackLoopTableRenderPolicy())
+ .build();
+ XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render(
+ new HashMap<String, Object>() {{
+ put("device", device);
+ put("document", documentExportWordDtoList); // 妗f
+ put("deviceMetricRecordAndMaintenanceDtoList", deviceMetricRecordAndMaintenanceDtoList); // 鏍″噯琛� 鍜� 缁翠慨琛�
+ }});
+
+ try {
+ response.setContentType("application/msword");
+ String fileName = URLEncoder.encode(
+ device.getDeviceName() + "妗f", "UTF-8");
+ response.setHeader("Content-disposition",
+ "attachment;filename=" + fileName + ".docx");
+ OutputStream os = response.getOutputStream();
+ template.write(os);
+ os.flush();
+ os.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException("瀵煎嚭澶辫触");
+ }
+ }
+
+ private List<DeviceMetricRecordAndMaintenanceDto> getDeviceMetricRecordAndMaintenanceDtoList(List<DeviceMetricRecord> deviceMetricRecordList, List<DeviceMaintenance> deviceMaintenanceList) {
+ // 璁惧鏍″噯琛ㄥ拰璁惧缁翠慨琛ㄧ殑闆嗗悎
+ List<DeviceMetricRecordAndMaintenanceDto> deviceMetricRecordAndMaintenanceDtoList = new ArrayList<>();
+ // 璁惧鏍″噯琛ㄥ拰璁惧缁翠慨琛ㄧ殑闀垮害鍙兘涓嶄竴鏍� 鍙栨渶澶у�� 涓嶅鐨勭敤绌烘暟鎹~鍏�
+ int metricRecordSize = deviceMetricRecordList.size();
+ int maintenanceSize = deviceMaintenanceList.size();
+ int size = Math.max(metricRecordSize, maintenanceSize);
+ // 缁� 鏍¢獙鍜岀淮淇璞� 璧嬪��
+ for (int i = 0; i < size; i++) {
+ // 鏍¢獙鍜岀淮淇璞�
+ DeviceMetricRecordAndMaintenanceDto deviceMetricRecordAndMaintenanceDto = new DeviceMetricRecordAndMaintenanceDto();
+ // 璁剧疆搴忓彿
+ deviceMetricRecordAndMaintenanceDto.setIndex(i + 1);
+
+ // 鏍″噯琛ㄦ暟鎹�
+ if (metricRecordSize > i) {
+ // 璁剧疆鏃ユ湡鏍煎紡
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ // 鑾峰彇璁惧鏍″噯琛ㄦ暟鎹�
+ DeviceMetricRecord deviceMetricRecord = deviceMetricRecordList.get(i);
+ // 璁剧疆鏍″噯鏃ユ湡
+ deviceMetricRecordAndMaintenanceDto.setCalibrationDateString(sdf.format(deviceMetricRecord.getCalibrationDate()));
+ // 璁剧疆璇佷功缂栧彿
+ deviceMetricRecordAndMaintenanceDto.setCertificateNumber(deviceMetricRecord.getCertificateSerialNumber());
+ // 璁剧疆鏈夋晥鏈�
+ deviceMetricRecordAndMaintenanceDto.setValidityDateString(sdf.format(deviceMetricRecord.getNextCalibrationDate()));
+ // 璁剧疆鏍″噯鏈夋晥鏃ユ湡
+ deviceMetricRecordAndMaintenanceDto.setValidityDateString(sdf.format(deviceMetricRecord.getConfirmDate()));
+ // 璁剧疆妫�楠岀粨鏋�
+ deviceMetricRecordAndMaintenanceDto.setJudgement(deviceMetricRecord.getStatus());
+ }
+
+ // 缁翠慨琛ㄦ暟鎹�
+ if (maintenanceSize > i) {
+ // 鑾峰彇璁惧缁翠慨琛ㄦ暟鎹�
+ DeviceMaintenance deviceMaintenance = deviceMaintenanceList.get(i);
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+ // 缁翠慨鏃ユ湡
+ deviceMetricRecordAndMaintenanceDto.setMaintenanceDateString(deviceMaintenance.getDate().format(dateTimeFormatter));
+ // 澶勭悊鏂规硶
+ deviceMetricRecordAndMaintenanceDto.setHandlingMethod(deviceMaintenance.getContent());
+ // 澶囨敞
+ deviceMetricRecordAndMaintenanceDto.setComments(deviceMaintenance.getComments());
+ }
+
+ deviceMetricRecordAndMaintenanceDtoList.add(deviceMetricRecordAndMaintenanceDto);
+ }
+ return deviceMetricRecordAndMaintenanceDtoList;
+ }
+
+ /**
+ * 缁欐。妗堝姞搴忓彿 骞跺乏鍙冲垎涓哄乏鍙充袱鍒楀湪word涓樉绀�
+ *
+ * @param documentList 妗f鍒楄〃
+ * @param documentExportWordDtoList 杩斿洖缁檞ord鐨勬暟鎹垪琛�
+ */
+ private static void extracted(List<Document> documentList, List<DocumentExportWordDto> documentExportWordDtoList) {
+ // 缁欐。妗堝姞搴忓彿 骞朵笖鍒嗕负宸﹀彸涓や釜鍒楄〃鍦╳ord涓樉绀�
+ for (int i = 0; i < documentList.size(); i++) {
+ // 鍒涘缓word琛ㄦ牸涓竴琛岀殑鏁版嵁瀵硅薄
+ DocumentExportWordDto documentExportWordDto = new DocumentExportWordDto();
+ // 鑾峰彇妗f淇℃伅
+ Document document = documentList.get(i);
+ // 鏍煎紡鍖栨棩鏈�
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+ // 鏍规嵁搴忓彿 鍒嗗埆鍔犲叆涓や釜鍒楄〃
+ if (i % 2 == 0) {
+ // 濂囨暟鍦ㄥ乏鍒�
+ documentExportWordDto.setIndex1(i + 1);
+ documentExportWordDto.setName1(document.getName());
+ documentExportWordDto.setQuantity1(document.getQuantity());
+ documentExportWordDto.setPageCount1(document.getPageCount());
+ documentExportWordDto.setArchiveDateString1(document.getProvideDate().format(dateTimeFormatter));
+ } else {
+ // 鍋舵暟鍦ㄥ彸鍒�
+ documentExportWordDto.setIndex2(i + 1);
+ documentExportWordDto.setName2(document.getName());
+ documentExportWordDto.setQuantity2(document.getQuantity());
+ documentExportWordDto.setPageCount2(document.getPageCount());
+ documentExportWordDto.setArchiveDateString2(document.getProvideDate().format(dateTimeFormatter));
+ }
+ // 鎶婁竴琛屾暟鎹璞″姞鍏ュ垪琛�
+ documentExportWordDtoList.add(documentExportWordDto);
+ }
+ }
+
+ @Override
+ public void exportEquipmentDetails(HttpServletResponse response) {
+ List<Device> deviceList = baseMapper.selectList(null);
+ List<DeviceExport> deviceExportList = new ArrayList<>();
+
+ int index = 1;
+ for (Device device : deviceList) {
+ Integer equipmentManager = device.getEquipmentManager();
+ String equipmentManagerName = null;
+ if (equipmentManager != null) {
+ User user = userMapper.selectById(equipmentManager);
+ if (user != null) {
+ equipmentManagerName = user.getName();
+ }
+ }
+ DeviceExport deviceExport = new DeviceExport();
+ BeanUtils.copyProperties(device, deviceExport);
+ deviceExport.setIndex(index);
+ deviceExport.setEquipmentManagerName(equipmentManagerName);
+ deviceExportList.add(deviceExport);
+ index++;
+ }
+
+ // 鑾峰彇璺緞
+ InputStream inputStream = this.getClass().getResourceAsStream("/static/word/quipment-details.docx");
+ Configure configure = Configure.builder()
+ .bind("deviceList", new HackLoopTableRenderPolicy())
+ .build();
+ XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render(
+ new HashMap<String, Object>() {{
+ put("deviceList", deviceExportList);
+ }});
+
+ try {
+ response.setContentType("application/msword");
+ String fileName = URLEncoder.encode(
+ "浠櫒璁惧涓�瑙堣〃", "UTF-8");
+ response.setHeader("Content-disposition",
+ "attachment;filename=" + fileName + ".docx");
+ OutputStream os = response.getOutputStream();
+ template.write(os);
+ os.flush();
+ os.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException("瀵煎嚭澶辫触");
+ }
+ }
+}
--
Gitblit v1.9.3