1. 派遣查询修改
2. 车辆定位接口修改,会报空指针
3. 日志输出修改管理
4. 证书导出Png图片不显示bug修复
| | |
| | | //如果头像有 |
| | | if (null != list.get(i).getAvatar() && list.get(i).getAvatar() != "") { |
| | | if (list.get(i).getAvatar().contains("http:")) { |
| | | //获取图片格式 |
| | | int lastIndexOf = list.get(i).getAvatar().lastIndexOf("."); |
| | | String pictureType = list.get(i).getAvatar().substring(lastIndexOf + 1); |
| | | //画图的顶级管理器,一个sheet只能获取一个(一定要注意这点) |
| | | BufferedImage bufferImg = null; |
| | | //先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | try { |
| | | ImageIO.write(bufferImg, "jpg", byteArrayOut); |
| | | ImageIO.write(bufferImg, pictureType, byteArrayOut); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | //如果头像有 |
| | | if (null != list.get(i).getAvatar() && list.get(i).getAvatar() != "") { |
| | | if (list.get(i).getAvatar().contains("http:")) { |
| | | //获取图片格式 |
| | | int lastIndexOf = list.get(i).getAvatar().lastIndexOf("."); |
| | | String pictureType = list.get(i).getAvatar().substring(lastIndexOf + 1); |
| | | //画图的顶级管理器,一个sheet只能获取一个(一定要注意这点) |
| | | BufferedImage bufferImg = null; |
| | | //先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | try { |
| | | ImageIO.write(bufferImg, "jpg", byteArrayOut); |
| | | ImageIO.write(bufferImg, pictureType, byteArrayOut); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | <!--派遣记录分页数据--> |
| | | <select id="selectDispatcherPage" resultType="org.springblade.modules.dispatcher.vo.DispatcherVO"> |
| | | select |
| | | sd.*,bu.real_name securityName,sdu.name dispatcherCompany,bu.cardid idCardNo |
| | | sd.*,bu.real_name securityName,sdu.name dispatcherCompany,bu.cardid idCardNo,bd.dept_name deptName |
| | | from |
| | | sys_dispatcher sd |
| | | left join |
| | |
| | | blade_user bu |
| | | on |
| | | bu.id = sd.user_ids |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bd.id = bu.dept_id |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | |
| | | </if> |
| | | <if test="dispatcher.securityName!=null and dispatcher.securityName!=''"> |
| | | and bu.real_name like concat('%', #{dispatcher.securityName},'%') |
| | | </if> |
| | | <if test="dispatcher.deptName!=null and dispatcher.deptName!=''"> |
| | | and bd.dept_name like concat('%', #{dispatcher.deptName},'%') |
| | | </if> |
| | | <if test="dispatcher.cardid!=null and dispatcher.cardid!=''"> |
| | | and sd.cardid like concat('%', #{dispatcher.cardid},'%') |
| | |
| | | where |
| | | 1=1 |
| | | and dispatcher_unit_id = #{dispatcherUnitVO1.id} |
| | | and status = 0 |
| | | </select> |
| | | |
| | | <!--查询用的派遣信息--> |
| | |
| | | or ( sdu.start_time <= #{dispatcherUnit.overTime} and sdu.start_time >= #{dispatcherUnit.beginTime}) |
| | | </if> |
| | | </if> |
| | | <if test="dispatcherUnit.isExpire==1"> |
| | | and sdu.start_time <= now() |
| | | and sdu.end_time > now() |
| | | </if> |
| | | <if test="dispatcherUnit.isExpire==2"> |
| | | and sdu.end_time <= now() |
| | | </if> |
| | | </select> |
| | | |
| | | <!--自定义树--> |
| | |
| | | @Override |
| | | public IPage<DispatcherUnitVO> selectDispatcherUnitPage(IPage<DispatcherUnitVO> page, DispatcherUnitVO dispatcherUnitVO) { |
| | | List<DispatcherUnitVO> dispatcherUnitVOS = baseMapper.selectDispatcherUnitPage(page, dispatcherUnitVO); |
| | | // dispatcherUnitVOS.forEach(dispatcherUnitVO1 -> { |
| | | // //查询派遣记录条数 |
| | | // dispatcherUnitVO1.setNum(dispatcherService.getDispatcherCount(dispatcherUnitVO1)); |
| | | // }); |
| | | dispatcherUnitVOS.forEach(dispatcherUnitVO1 -> { |
| | | //查询派遣记录条数 |
| | | dispatcherUnitVO1.setNum(dispatcherService.getDispatcherCount(dispatcherUnitVO1)); |
| | | }); |
| | | return page.setRecords(dispatcherUnitVOS); |
| | | } |
| | | |
| | |
| | | * 辖区名称 |
| | | */ |
| | | private String jurisdictionName; |
| | | |
| | | /** |
| | | * 是否到期 |
| | | */ |
| | | private Integer isExpire; |
| | | } |
| | |
| | | res = HttpReqUtil.getInstance().doPost(url, params, null); |
| | | String a = "[" + res + "]"; |
| | | JSONArray jsonArray = JSONArray.fromObject(a); |
| | | String data = jsonArray.getJSONObject(0).get("data").toString(); |
| | | String b = "[" + data + "]"; |
| | | JSONArray jsonArrayb = JSONArray.fromObject(b); |
| | | String x = jsonArrayb.getJSONObject(0).get("x").toString(); |
| | | String y = jsonArrayb.getJSONObject(0).get("y").toString(); |
| | | String timestamp = jsonArrayb.getJSONObject(0).get("timestamp").toString(); |
| | | //实时位置实体类 |
| | | LiveLocation liveLocation = new LiveLocation(); |
| | | liveLocation.setType(2); |
| | | String carnumber = maps.get(i).get("carnumber").toString(); |
| | | liveLocation.setWorkerId(carnumber); |
| | | //经度 |
| | | liveLocation.setLongitude(x); |
| | | //纬度 |
| | | liveLocation.setLatitude(y); |
| | | Date date = timeStamp2Date(timestamp); |
| | | liveLocation.setRecordTime(date); |
| | | //先查询是否已有实时位置信息,如果有,则更新,没有则插入 |
| | | LiveLocation liveLocationInfo = liveLocationService.getLiveLocationInfo(liveLocation); |
| | | boolean status = false; |
| | | if (null == liveLocationInfo) { |
| | | //新增 |
| | | status = liveLocationService.save(liveLocation); |
| | | //数据推送 |
| | | String s1 = |
| | | "insert into sys_live_location(id,type,worker_id,longitude,latitude,record_time) " + |
| | | "values(" + "'" + liveLocation.getId() + "'" + "," + |
| | | "'" + liveLocation.getType() + "'" + "," + |
| | | "'" + liveLocation.getWorkerId() + "'" + "," + |
| | | "'" + liveLocation.getLongitude() + "'" + "," + |
| | | "'" + liveLocation.getLatitude() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | } else { |
| | | status = liveLocationService.updateById(liveLocationInfo); |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_live_location set type = " + "'" + liveLocationInfo.getType() + "'" + |
| | | ",worker_id = " + "'" + liveLocationInfo.getWorkerId() + "'" + |
| | | ",longitude = " + "'" + liveLocationInfo.getLongitude() + "'" + |
| | | ",latitude = " + "'" + liveLocationInfo.getLatitude() + "'" + |
| | | ",record_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocationInfo.getRecordTime()) + "'" + |
| | | " " + "where id = " + "'" + liveLocationInfo.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | String code = jsonArray.getJSONObject(0).get("code").toString(); |
| | | if (Integer.parseInt(code)==200) { |
| | | String data = jsonArray.getJSONObject(0).get("data").toString(); |
| | | String b = "[" + data + "]"; |
| | | JSONArray jsonArrayb = JSONArray.fromObject(b); |
| | | String x = jsonArrayb.getJSONObject(0).get("x").toString(); |
| | | String y = jsonArrayb.getJSONObject(0).get("y").toString(); |
| | | String timestamp = jsonArrayb.getJSONObject(0).get("timestamp").toString(); |
| | | //实时位置实体类 |
| | | LiveLocation liveLocation = new LiveLocation(); |
| | | liveLocation.setType(2); |
| | | String carnumber = maps.get(i).get("carnumber").toString(); |
| | | liveLocation.setWorkerId(carnumber); |
| | | //经度 |
| | | liveLocation.setLongitude(x); |
| | | //纬度 |
| | | liveLocation.setLatitude(y); |
| | | Date date = timeStamp2Date(timestamp); |
| | | liveLocation.setRecordTime(date); |
| | | //先查询是否已有实时位置信息,如果有,则更新,没有则插入 |
| | | LiveLocation liveLocationInfo = liveLocationService.getLiveLocationInfo(liveLocation); |
| | | boolean status = false; |
| | | if (null == liveLocationInfo) { |
| | | //新增 |
| | | status = liveLocationService.save(liveLocation); |
| | | //数据推送 |
| | | String s1 = |
| | | "insert into sys_live_location(id,type,worker_id,longitude,latitude,record_time) " + |
| | | "values(" + "'" + liveLocation.getId() + "'" + "," + |
| | | "'" + liveLocation.getType() + "'" + "," + |
| | | "'" + liveLocation.getWorkerId() + "'" + "," + |
| | | "'" + liveLocation.getLongitude() + "'" + "," + |
| | | "'" + liveLocation.getLatitude() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | } else { |
| | | status = liveLocationService.updateById(liveLocationInfo); |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_live_location set type = " + "'" + liveLocationInfo.getType() + "'" + |
| | | ",worker_id = " + "'" + liveLocationInfo.getWorkerId() + "'" + |
| | | ",longitude = " + "'" + liveLocationInfo.getLongitude() + "'" + |
| | | ",latitude = " + "'" + liveLocationInfo.getLatitude() + "'" + |
| | | ",record_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocationInfo.getRecordTime()) + "'" + |
| | | " " + "where id = " + "'" + liveLocationInfo.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | ExcelUtil.export(response, "保安员统计数据" + DateUtil.time(), "保安员统计数据表", list, ExportInformationSecurityStatistics.class); |
| | | } |
| | | |
| | | /** |
| | | * 保安员详情 |
| | | */ |
| | | @PostMapping("/selectUIn") |
| | | public R<IPage> selectUIn(String deptid, String name, String hold, String photo, String examinationtype, String dispatch, String soil, Query query) { |
| | | IPage list = informationService.selectUIn(Condition.getPage(query), deptid, name, hold, photo, examinationtype, dispatch, soil); |
| | | return R.data(list); |
| | | } |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<ExportInformationExcel> exportBusinessStatis(@Param("information") InformationVO information); |
| | | |
| | | /** |
| | | * 保安员详情 |
| | | * @param page |
| | | * @param deptid |
| | | * @param name |
| | | * @param hold |
| | | * @param photo |
| | | * @param examinationtype |
| | | * @param dispatch |
| | | * @param soil |
| | | * @return |
| | | */ |
| | | List<List> selectUIn(IPage<List> page, String deptid, String name, String hold, String photo, String examinationtype, String dispatch, String soil); |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!--保安人员详情--> |
| | | <select id="selectUIn" resultType="java.util.HashMap"> |
| | | SELECT |
| | | u.real_name, |
| | | u.securitynumber, |
| | | u.cardid, |
| | | u.phone, |
| | | u.hold, |
| | | u.soil, |
| | | u.photo, |
| | | u.examination_type, |
| | | u.dispatch, |
| | | bd.dept_name enterpriseName |
| | | FROM |
| | | blade_user u |
| | | LEFT JOIN blade_dept bd ON bd.id = u.dept_id |
| | | WHERE |
| | | u.role_id = '1412226235153731586' |
| | | AND u.is_deleted = 0 |
| | | AND u.`status` = 1 |
| | | and bd.is_deleted = 0 |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and bd.id in |
| | | ( |
| | | select id from blade_dept where id = #{deptid} |
| | | union all |
| | | (SELECT |
| | | id |
| | | FROM |
| | | ( |
| | | SELECT |
| | | t1.id,t1.parent_id,t1.dept_name, |
| | | IF |
| | | ( find_in_set( parent_id, @pids ) > 0, @pids := concat( @pids, ',', id ), 0 ) AS ischild |
| | | FROM |
| | | ( SELECT id, parent_id,dept_name FROM blade_dept t ORDER BY parent_id, id ) t1, |
| | | ( SELECT @pids := #{deptid} ) t2 |
| | | ) t3 |
| | | WHERE |
| | | ischild != 0 |
| | | ) |
| | | ) |
| | | </if> |
| | | <if test="name!=null and name!=''"> |
| | | and real_name like concat('%', #{name},'%') |
| | | </if> |
| | | <if test="hold!=null and hold!=''"> |
| | | <if test="hold==0"> |
| | | and hold=#{hold} |
| | | </if> |
| | | <if test="hold==1"> |
| | | and hold=#{hold} |
| | | </if> |
| | | </if> |
| | | <if test="photo!=null and photo!=''"> |
| | | <if test="photo==0"> |
| | | AND avatar is not null and avatar!="" |
| | | </if> |
| | | <if test="photo==1"> |
| | | AND (avatar is null or avatar = "") |
| | | </if> |
| | | </if> |
| | | <if test="examinationtype!=null and examinationtype!=''"> |
| | | and examination_type=#{examinationtype} |
| | | </if> |
| | | <if test="dispatch!=null and dispatch!=''"> |
| | | and dispatch=#{dispatch} |
| | | </if> |
| | | <if test="soil !=null and soil !=''"> |
| | | and soil =#{soil} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | * @return |
| | | */ |
| | | List<ExportInformationSecurityStatistics> exportSecurityStatisInfo(InformationVO information); |
| | | |
| | | /** |
| | | * 保安员详情 |
| | | * @param page |
| | | * @param deptid |
| | | * @param name |
| | | * @param hold |
| | | * @param photo |
| | | * @param examinationtype |
| | | * @param dispatch |
| | | * @param soil |
| | | * @return |
| | | */ |
| | | IPage selectUIn(IPage<List> page, String deptid, String name, String hold, String photo, String examinationtype, String dispatch, String soil); |
| | | } |
| | |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 保安员详情 |
| | | * @param page |
| | | * @param deptid |
| | | * @param name |
| | | * @param hold |
| | | * @param photo |
| | | * @param examinationtype |
| | | * @param dispatch |
| | | * @param soil |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage selectUIn(IPage<List> page, String deptid, String name, String hold, String photo, String examinationtype, String dispatch, String soil) { |
| | | return page.setRecords(baseMapper.selectUIn(page,deptid, name, hold, photo, examinationtype, dispatch,soil)); |
| | | } |
| | | } |
| | |
| | | # commandTimeout: 5000 |
| | | datasource: |
| | | # MySql |
| | | url: jdbc:mysql://223.82.109.183:2083/zhbaw-test?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | url: jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: zhba0728 |
| | | |
| | |
| | | </encoder> |
| | | </appender> |
| | | |
| | | <!-- 生成日志文件 --> |
| | | <appender name="INFO" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <!-- 日志文件输出的文件名 --> |
| | | <FileNamePattern>/home/zhongsong/log/info/info-%d{yyyy-MM-dd}.log</FileNamePattern> |
| | | <maxHistory>10</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
| | | <pattern>%n%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId}] [%logger{50}] %n%-5level: %msg%n</pattern> |
| | | </encoder> |
| | | <!-- 打印日志级别 --> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>INFO</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <!-- 生成日志文件 --> |
| | | <appender name="WARN" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <!-- 日志文件输出的文件名 --> |
| | | <FileNamePattern>/home/zhongsong/log/warn/warn-%d{yyyy-MM-dd}.log</FileNamePattern> |
| | | <maxHistory>30</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
| | | <pattern>%n%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId}] [%logger{50}] %n%-5level: %msg%n</pattern> |
| | | </encoder> |
| | | <!-- 打印日志级别 --> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>WARN</level> |
| | | <level>ERROR</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <if condition='property("ELK_MODE").toUpperCase().contains("TRUE")'> |
| | | <then> |
| | | <!-- 推送日志至elk --> |
| | |
| | | <appender name="INFO" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <!-- 日志文件输出的文件名 --> |
| | | <FileNamePattern>target/blade/log/info-%d{yyyy-MM-dd}.log</FileNamePattern> |
| | | <FileNamePattern>D:/log/info-%d{yyyy-MM-dd}.log</FileNamePattern> |
| | | </rollingPolicy> |
| | | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
| | | <pattern>%n%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId}] [%logger{50}] %n%-5level: %msg%n</pattern> |