| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | 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.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.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 设备(Device)表服务实现类 |
| | |
| | | |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | private UserMapper userMapper; |
| | | |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | @Autowired |
| | | private DataConfigService dataConfigService; |
| | | |
| | | 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 |
| | |
| | | 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(String code) { |
| | | return deviceMapper.selectOne(Wrappers.<Device>lambdaQuery().eq(Device::getFactoryNo, code).last("limit 1")); |
| | | } |
| | | |
| | | @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("未给该IP:" + 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: \"沟通和宣贯\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"G沟通和宣贯\",\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: \"设备档案\",\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); |
| | | // 设备档案 |
| | | 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)); |
| | | |
| | | |
| | | // 返回给word的数据列表 分为左右两列数据 |
| | | 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); // 档案 |
| | | put("deviceMetricRecordAndMaintenanceDtoList", deviceMetricRecordAndMaintenanceDtoList); // 校准表 和 维修表 |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | device.getDeviceName() + "档案", "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 档案列表 |
| | | * @param documentExportWordDtoList 返回给word的数据列表 |
| | | */ |
| | | private static void extracted(List<Document> documentList, List<DocumentExportWordDto> documentExportWordDtoList) { |
| | | // 给档案加序号 并且分为左右两个列表在word中显示 |
| | | for (int i = 0; i < documentList.size(); i++) { |
| | | // 创建word表格中一行的数据对象 |
| | | DocumentExportWordDto documentExportWordDto = new DocumentExportWordDto(); |
| | | // 获取档案信息 |
| | | 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("导出失败"); |
| | | } |
| | | } |
| | | } |