| | |
| | | public final static String ID = "id"; |
| | | public final static String Point_Name = "点位名称(可修改)"; |
| | | public final static String Serial_Number = "国标码(不可修改)"; |
| | | public final static String Area = "区县(不可修改)"; |
| | | public final static String IP = "点位IP(可修改)"; |
| | | public final static String Province_Tag = "是否省厅标签(可修改)"; |
| | | public final static String Impotrant_Command_Image = "是否重点指挥图像(可修改)"; |
| | |
| | | |
| | | // 可以将这些已知的键放入一个集合中,方便检查 |
| | | public static final Set<String> KNOWN_KEYS = new HashSet<>(Arrays.asList( |
| | | ID,Point_Name, IP, Serial_Number, Province_Tag, Impotrant_Command_Image, Dept_Tag |
| | | ID,Point_Name, IP, Serial_Number,Area, Province_Tag, Impotrant_Command_Image, Dept_Tag |
| | | )); |
| | | } |
| | |
| | | @ColumnWidth(30) |
| | | @ExcelProperty("点位IP(可修改)") |
| | | private String pointIP; |
| | | @ColumnWidth(30) |
| | | @ExcelProperty("区县(不可修改)") |
| | | private String area; |
| | | |
| | | @ColumnWidth(40) |
| | | @ExcelProperty("当前运维单位(导入界面可改)") |
| | |
| | | */ |
| | | @Override |
| | | public void exportIndex(HttpServletResponse response, CheckResultExportDTO exportDTO) throws IOException { |
| | | // String date = exportDTO.getDate(); |
| | | //如果请求参数时间为空,查这条记录的时间 |
| | | // if (StringUtils.isEmpty(exportDTO.getDate()) && CollectionUtils.isEmpty(exportDTO.getQuarter())) { |
| | | // SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM"); |
| | | // if (exportDTO.getId() != null) { |
| | | // CheckScore checkScore = getById(exportDTO.getId()); |
| | | // Date createTime = checkScore.getCreateTime(); |
| | | // date = formatter.format(createTime); |
| | | // } else { |
| | | // //防止卡片页面导出不传scoreId,导致报错 |
| | | // date = formatter.format(new Date()); |
| | | // } |
| | | // } |
| | | //TODO:标签bug修复 |
| | | //没有标签默认全导 |
| | | if(CollectionUtils.isEmpty(exportDTO.getExamineTags())){ |
| | | exportDTO.setExamineTags(Arrays.asList(0,1,2)); |
| | |
| | | if (examineTag == 0) { |
| | | checkIndexCar.setProvinceTag(Boolean.TRUE); |
| | | } |
| | | |
| | | checkIndexCars.addAll(indexCarService.selectCheckIndexCarList(checkIndexCar)); |
| | | } |
| | | //计算平均值放在excel最后 |
| | |
| | | checkIndexCarVOS.add(excelVo); |
| | | } |
| | | ExcelExp e1 = new ExcelExp("车辆考核指标数据", checkIndexCarVOS, CheckIndexCarVO.class); |
| | | |
| | | //人脸 |
| | | List<CheckIndexFace> checkIndexFaces = new ArrayList<>(); |
| | | for (Integer examineTag : exportDTO.getExamineTags()) { |
| | |
| | | checkIndexFaceVOS.add(excelVo); |
| | | } |
| | | ExcelExp e2 = new ExcelExp("人脸考核指标数据", checkIndexFaceVOS, CheckIndexFaceVO.class); |
| | | |
| | | //视频 |
| | | List<CheckIndexVideo> checkIndexVideos = new ArrayList<>(); |
| | | for (Integer examineTag : exportDTO.getExamineTags()) { |
| | |
| | | import com.ycl.system.domain.SysUserRole; |
| | | import com.ycl.system.entity.SysRole; |
| | | import com.ycl.system.entity.SysUser; |
| | | import com.ycl.system.mapper.SysConfigMapper; |
| | | import com.ycl.system.mapper.SysRoleMapper; |
| | | import com.ycl.system.mapper.SysUserMapper; |
| | | import com.ycl.system.mapper.SysUserRoleMapper; |
| | | import com.ycl.system.page.PageUtil; |
| | | import com.ycl.utils.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.crypto.password.PasswordEncoder; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | private final SysUserMapper sysUserMapper; |
| | | private final SysUserRoleMapper sysUserRoleMapper; |
| | | private final SysRoleMapper sysRoleMapper; |
| | | |
| | | private final SysConfigMapper sysConfigMapper; |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | |
| | | */ |
| | | public void fullUser(SysUser sysUser, YwPeopleForm form) { |
| | | sysUser.setUserName(form.getYwPersonAccount()); |
| | | sysUser.setPassword(SecurityUtils.encryptPassword("123456")); |
| | | String password = sysConfigMapper.checkConfigKeyUnique("sys.user.initPassword").getConfigValue(); |
| | | sysUser.setPassword(SecurityUtils.encryptPassword(password)); |
| | | sysUser.setStatus("0"); |
| | | sysUser.setFirstLogin((short) 0); |
| | | sysUser.setNickName(form.getYwPersonName()); |
| | |
| | | headers.add(PointHeaderConstant.ID); |
| | | headers.add(PointHeaderConstant.Point_Name); |
| | | headers.add(PointHeaderConstant.Serial_Number); |
| | | headers.add(PointHeaderConstant.Area); |
| | | headers.add(PointHeaderConstant.IP); |
| | | headers.add(PointHeaderConstant.Province_Tag); |
| | | headers.add(PointHeaderConstant.Impotrant_Command_Image); |
| | |
| | | list.add(export.getId()); |
| | | list.add(export.getPointName()); |
| | | list.add(export.getSerialNumber()); |
| | | list.add(export.getArea()); |
| | | list.add(export.getPointIP()); |
| | | list.add(export.getProvinceTagString()); |
| | | list.add(export.getImportantCommandImageTagString()); |
| | |
| | | yu.unit_name, |
| | | yp.start_time, |
| | | yp.end_time, |
| | | d.area, |
| | | CASE WHEN yp.province_tag = 0 THEN '否' ELSE '是' END AS provinceTagString, |
| | | CASE WHEN yp.important_tag = 0 THEN '否' ELSE '是' END AS importantTagString, |
| | | CASE WHEN yp.important_command_image_tag = 0 THEN '否' ELSE '是' END AS importantCommandImageTagString, |
| | |
| | | t_yw_point yp |
| | | INNER JOIN t_monitor m ON yp.serial_number = m.serial_number |
| | | LEFT JOIN t_yw_unit yu ON yu.id = yp.unit_id |
| | | LEFT JOIN sys_dept d ON yp.dept_id = d.dept_id |
| | | <where> |
| | | yp.examine_status = 1 |
| | | <if test="query.pointName != null and query.pointName != ''"> |