Merge remote-tracking branch 'origin/master'
# Conflicts:
# ycl-common/src/main/java/com/ycl/service/oss/impl/OssServiceImpl.java
| | |
| | | ossClient.shutdown(); |
| | | // æä¸ä¼ çæä»¶è·¯å¾è¿å ï¼æå¨æ¼æ¥ï¼ |
| | | // è¿é设置å¾çæææ¶é´ æè®¾ç½®äº30å¹´ |
| | | Date expiration = new Date(System.currentTimeMillis() + (long)(946080000 * 1000)); |
| | | Date expiration = new Date(System.currentTimeMillis() + (long) 946080000 * 1000); |
| | | String url = ossClient.generatePresignedUrl(bucketName, fileName, expiration).toString(); |
| | | |
| | | return url; |
| | |
| | | ossClient.shutdown(); |
| | | // æä¸ä¼ çæä»¶è·¯å¾è¿å ï¼æå¨æ¼æ¥ï¼ |
| | | // è¿é设置å¾çæææ¶é´ æè®¾ç½®äº30å¹´ |
| | | Date expiration = new Date(System.currentTimeMillis() + (long)(946080000 * 1000)); |
| | | Date expiration = new Date(System.currentTimeMillis() + (long) 946080000 * 1000); |
| | | String url = ossClient.generatePresignedUrl(bucketName, fileName, expiration).toString(); |
| | | System.out.println("ossä¸ä¼ æåï¼" + url); |
| | | |
| | | URL urlO = new URL(url); |
| | | HttpURLConnection conn = (HttpURLConnection) urlO.openConnection(); |
| | | conn.setRequestMethod("GET"); |
| | | conn.setConnectTimeout(10 * 1000); |
| | | conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)"); |
| | | |
| | | InputStream inputStream2 = conn.getInputStream();// éè¿è¾å
¥æµè·åå¾çæ°æ® |
| | | |
| | | byte[] data = readInputStream(inputStream2); |
| | | |
| | | System.out.println("è·åå¾çæå:" + url); |
| | | // URL urlO = new URL(url); |
| | | // HttpURLConnection conn = (HttpURLConnection) urlO.openConnection(); |
| | | // conn.setRequestMethod("GET"); |
| | | // conn.setConnectTimeout(10 * 1000); |
| | | // conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)"); |
| | | // |
| | | // InputStream inputStream2 = conn.getInputStream();// éè¿è¾å
¥æµè·åå¾çæ°æ® |
| | | // |
| | | // byte[] data = readInputStream(inputStream2); |
| | | // |
| | | // System.out.println("è·åå¾çæå:" + url); |
| | | return url; |
| | | } catch (Exception e) { |
| | | System.out.println("osså¼å¸¸ï¼" + e.getMessage()); |
| | |
| | | @GetMapping("/team_index") |
| | | public CommonResult<List<TeamIndex>> teamIndex(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | LambdaQueryWrapper<TeamConstruction> queryWrapper = new LambdaQueryWrapper<TeamConstruction>().eq(TeamConstruction::getStatus, 1).eq(TeamConstruction::getIsDelete, 0); |
| | | List<TeamConstruction> list = teamConstructionService.list(queryWrapper); |
| | | List<TeamIndex> teamIndexList = BeanUtil.copyToList(list, TeamIndex.class); |
| | | |
| | | // LambdaQueryWrapper<TeamConstruction> queryWrapper = new LambdaQueryWrapper<TeamConstruction>().eq(TeamConstruction::getStatus, 1).eq(TeamConstruction::getIsDelete, 0); |
| | | // List<TeamConstruction> list = teamConstructionService.list(queryWrapper); |
| | | // List<TeamIndex> teamIndexList = BeanUtil.copyToList(list, TeamIndex.class); |
| | | // teamIndexList.forEach(o -> { |
| | | // o.setStepTimely(0.0); |
| | | // o.setStepDelayed(0.0); |
| | | // o.setStepOvertime(0.0); |
| | | // o.setHandleTimely(0.0); |
| | | // o.setHandleDelayed(0.0); |
| | | // o.setHandleOvertime(0.0); |
| | | // o.setNoHandle(0.0); |
| | | // }); |
| | | List<TeamIndex> teamIndexList = teamConstructionService.teamIndex(params.getBeginTime(), params.getEndTime()); |
| | | teamIndexList.forEach(o -> { |
| | | o.setStepTimely(0.6); |
| | | o.setStepDelayed(0.3); |
| | | o.setStepOvertime(0.1); |
| | | o.setHandleTimely(0.6); |
| | | o.setHandleDelayed(0.2); |
| | | o.setHandleOvertime(0.1); |
| | | o.setNoHandle(0.1); |
| | | |
| | | o.setAllocation(20 * ((double) o.getPunctualityCount() / (double) o.getAllCount()) |
| | | + 18 * ((double) o.getOverCount() / (double) o.getAllCount()) |
| | | + 15 * ((double) o.getNoHandleCount() / (double) o.getAllCount())); |
| | | o.setHandle(20 * ((double) o.getPunctualityCount() / (double) o.getAllCount()) |
| | | + 5 * ((double) o.getOverCount() / (double) o.getAllCount()) |
| | | - 2 * ((double) o.getNoHandleCount() / (double) o.getAllCount())); |
| | | |
| | | o.setOnline(0.0); |
| | | o.setDuration(0.0); |
| | | o.setDistance(0.0); |
| | | }); |
| | | return CommonResult.success(teamIndexList); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | public class AlarmController { |
| | | private IVideoAlarmReportService videoAlarmReportService; |
| | | |
| | | private static Integer index = 0; |
| | | |
| | | @Autowired |
| | | private VideoUtil videoUtil; |
| | | |
| | |
| | | // @GetMapping(value = "/img") |
| | | @ResponseBody |
| | | public byte[] getImages(HttpServletResponse response, @RequestParam String fileUrl, @RequestParam String OSSAccessKeyId, @RequestParam String Signature) { |
| | | |
| | | index = 0; |
| | | return getBytes(fileUrl, OSSAccessKeyId, Signature); |
| | | |
| | | } |
| | | |
| | | private byte[] getBytes(String fileUrl, String OSSAccessKeyId, String Signature) { |
| | | try { |
| | | if (index < 10) { |
| | | index++; |
| | | System.out.println("getImagesè·åå¾çå°åï¼" + fileUrl + "&OSSAccessKeyId=" + OSSAccessKeyId + "&Signature=" + Signature); |
| | | URL url = new URL(fileUrl + "&OSSAccessKeyId=" + OSSAccessKeyId + "&Signature=" + Signature); |
| | | HttpURLConnection conn = (HttpURLConnection) url.openConnection(); |
| | | conn.setRequestMethod("GET"); |
| | | conn.setConnectTimeout(10 * 1000); |
| | | conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)"); |
| | | |
| | | System.out.println("getImagesè·åå¾çå°åï¼" + fileUrl + "&OSSAccessKeyId=" + OSSAccessKeyId + "&Signature=" + Signature); |
| | | URL url = new URL(fileUrl + "&OSSAccessKeyId=" + OSSAccessKeyId + "&Signature=" + Signature); |
| | | HttpURLConnection conn = (HttpURLConnection) url.openConnection(); |
| | | conn.setRequestMethod("GET"); |
| | | conn.setConnectTimeout(10 * 1000); |
| | | conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)"); |
| | | InputStream inputStream = conn.getInputStream();// éè¿è¾å
¥æµè·åå¾çæ°æ® |
| | | |
| | | InputStream inputStream = conn.getInputStream();// éè¿è¾å
¥æµè·åå¾çæ°æ® |
| | | byte[] data = readInputStream(inputStream); |
| | | System.out.println("getImagesè·åå¾çæå"); |
| | | |
| | | |
| | | byte[] data = readInputStream(inputStream); |
| | | System.out.println("getImagesè·åå¾çæå"); |
| | | |
| | | |
| | | System.out.println("getImages -å¾ç64"); |
| | | System.out.println(Base64.getEncoder().encodeToString(data)); |
| | | return data; |
| | | |
| | | return data; |
| | | } |
| | | } catch (Exception e) { |
| | | System.out.println("getImagesè·åå¾ç失败ï¼" + e.getMessage()); |
| | | System.out.println(index + "getImagesè·åå¾ç失败ï¼" + e.getMessage()); |
| | | getBytes(fileUrl, OSSAccessKeyId, Signature); |
| | | // e.printStackTrace(); |
| | | } |
| | | return null; |
| | |
| | | private Integer upUndergraduatePeopleNumber; |
| | | |
| | | /** |
| | | * æ¬ç§å¦åå以ä¸äººæ° |
| | | * æè¯äººæ° |
| | | */ |
| | | @TableField("holder_number") |
| | | @ExcelProperty(value = "æè¯äººæ°", index = 3) |
| | | private Integer holderNumber; |
| | | |
| | | /** |
| | | * æ§æ³äººåæ»æ° |
| | | */ |
| | | @TableField("law_enforcement_officer") |
| | | @ExcelProperty(value = "æ§æ³äººåæ»æ°", index = 4) |
| | | private Integer lawEnforcementOfficer; |
| | | /** |
| | | * 45å²ä»¥ä¸äººæ° |
| | | */ |
| | | @TableField("under_forty_five_people_number") |
| | | @ExcelProperty(value = "45å²ä»¥ä¸äººæ°", index = 4) |
| | | @ExcelProperty(value = "45å²ä»¥ä¸äººæ°", index = 5) |
| | | private Integer underFortyFivePeopleNumber; |
| | | |
| | | /** |
| | | * æ³å¾èä¸èµæ ¼è¯äººæ° |
| | | */ |
| | | @TableField("legal_professional_qualification_certificate_people_number") |
| | | @ExcelProperty(value = "æ³å¾èä¸èµæ ¼è¯äººæ°", index = 5) |
| | | @ExcelProperty(value = "æ³å¾èä¸èµæ ¼è¯äººæ°", index = 6) |
| | | private Integer legalProfessionalQualificationCertificatePeopleNumber; |
| | | |
| | | /** |
| | | * 鿥æ°é |
| | | */ |
| | | @TableField("report_number") |
| | | @ExcelProperty(value = "鿥æ°é", index = 6) |
| | | @ExcelProperty(value = "鿥æ°é", index = 7) |
| | | private Integer reportNumber; |
| | | |
| | | /** |
| | | * è¿çºªè¡ä¸ºæ°é |
| | | */ |
| | | @TableField("disciplinary_offence_number") |
| | | @ExcelProperty(value = "è¿çºªè¡ä¸ºæ°é", index = 7) |
| | | @ExcelProperty(value = "è¿çºªè¡ä¸ºæ°é", index = 8) |
| | | private Integer disciplinaryOffenceNumber; |
| | | |
| | | /** |
| | | * è¿æ³ç¯ç½ªè¡ä¸ºæ°é |
| | | */ |
| | | @TableField("criminal_offense_number") |
| | | @ExcelProperty(value = "è¿æ³ç¯ç½ªè¡ä¸ºæ°é", index = 8) |
| | | @ExcelProperty(value = "è¿æ³ç¯ç½ªè¡ä¸ºæ°é", index = 9) |
| | | private Integer criminalOffenseNumber; |
| | | |
| | | /** |
| | | * æ¯ææ¡ä»¶æ°é |
| | | */ |
| | | @TableField("month_case_number") |
| | | @ExcelProperty(value = "æ¯ææ¡ä»¶æ°é", index = 9) |
| | | @ExcelProperty(value = "æ¯ææ¡ä»¶æ°é", index = 10) |
| | | private Integer monthCaseNumber; |
| | | |
| | | /** |
| | | * æ¯ææ¡ä»¶æ°é |
| | | */ |
| | | @TableField("month_index_number") |
| | | @ExcelProperty(value = "æ¯æææ æ°", index = 10) |
| | | @ExcelProperty(value = "æ¯æææ æ°", index = 11) |
| | | private Integer monthIndexNumber; |
| | | |
| | | /** |
| | | * æªè¶
æ¶æ¡ä»¶æ°é |
| | | */ |
| | | @TableField("no_timeout_case_number") |
| | | @ExcelProperty(value = "æªè¶
æ¶æ¡ä»¶æ°é", index = 11) |
| | | @ExcelProperty(value = "æªè¶
æ¶æ¡ä»¶æ°é", index = 12) |
| | | private Integer noTimeoutCaseNumber; |
| | | |
| | | /** |
| | | * å¤è¯æè¯è®¼æ°é |
| | | */ |
| | | @TableField("review_or_lawsuit_number") |
| | | @ExcelProperty(value = "å¤è¯æè¯è®¼æ°é", index = 12) |
| | | @ExcelProperty(value = "å¤è¯æè¯è®¼æ°é", index = 13) |
| | | private Integer reviewOrLawsuitNumber; |
| | | |
| | | /** |
| | |
| | | @TableField("update_time") |
| | | @ExcelIgnore |
| | | private LocalDateTime updateTime; |
| | | |
| | | |
| | | @TableField("region_id") |
| | | @ExcelIgnore |
| | | private Long regionId; |
| | | } |
| | |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_team_construction") |
| | | public class TeamIndex extends TeamConstruction implements Serializable { |
| | | |
| | | private Double stepTimely; |
| | |
| | | private Double handleOvertime; |
| | | private Double noHandle; |
| | | |
| | | /** |
| | | * æ¥æ¶å°å±ä¿¡æ¯ææ¥ä¸å¿ä¸æ´¾ä»»å¡ï¼åçå¹¶åæ´¾æ¶æ |
| | | */ |
| | | private Double allocation; |
| | | |
| | | /** |
| | | * å¤ç½®äººåæ¥ååæ´¾åçå¤çé度 |
| | | */ |
| | | private Double handle; |
| | | |
| | | /** |
| | | * ä¸ééåæ§æ³è®°å½ä»ªæ¯æ¥å¨çº¿ç |
| | | */ |
| | | private Double online; |
| | | |
| | | /** |
| | | * ä¸ééåæ§æ³è®°å½ä»ªæ¯æ¥å¹³åæ¶é¿ |
| | | */ |
| | | private Double duration; |
| | | |
| | | /** |
| | | * ä¸ééåæ§æ³è®°å½ä»ªæ¯æ¥å¹³åå½éè·ç¦» |
| | | */ |
| | | private Double distance; |
| | | /** |
| | | * æ¡ä»¶æ»æ° |
| | | */ |
| | | private Integer allCount; |
| | | /** |
| | | * åæ¶æ¡ä»¶ |
| | | */ |
| | | private Integer punctualityCount; |
| | | /** |
| | | * è¶
æ¶æ¡ä»¶ |
| | | */ |
| | | private Integer overCount; |
| | | /** |
| | | * æªå¤çæ¡ä»¶ |
| | | */ |
| | | private Integer noHandleCount; |
| | | } |
| | |
| | | |
| | | import com.ycl.entity.cockpitManage.TeamConstruction; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.entity.cockpitManage.TeamIndex; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TeamConstructionMapper extends BaseMapper<TeamConstruction> { |
| | | |
| | | List<TeamIndex> teamIndex(@Param("beginTime") String beginTime, @Param("endTime") String endTime); |
| | | } |
| | |
| | | public void saveFromVideo(List<VideoAlarmReport> videoAlarmReports) { |
| | | for (VideoAlarmReport videoAlarmReport : videoAlarmReports) { |
| | | VideoPoint videoPoint = null; |
| | | LambdaQueryWrapper<VideoPoint> queryWrapper = new LambdaQueryWrapper<VideoPoint>().eq(VideoPoint::getPlatResourceId, videoAlarmReport.getPlatResourceId()); |
| | | LambdaQueryWrapper<VideoPoint> queryWrapper = new LambdaQueryWrapper<VideoPoint>() |
| | | .eq(VideoPoint::getPlatResourceId, videoAlarmReport.getPlatResourceId()) |
| | | .or().eq(VideoPoint::getCode, videoAlarmReport.getPlatResourceId()); |
| | | List<VideoPoint> pointList = videoPointService.list(queryWrapper); |
| | | if (pointList.size() > 0) { |
| | | videoPoint = pointList.get(0); |
| | |
| | | |
| | | import com.ycl.entity.cockpitManage.TeamConstruction; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.entity.cockpitManage.TeamIndex; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface ITeamConstructionService extends IService<TeamConstruction> { |
| | | |
| | | List<TeamIndex> teamIndex(String beginTime, String endTime); |
| | | } |
| | |
| | | package com.ycl.service.cockpitManage.impl; |
| | | |
| | | import com.ycl.entity.cockpitManage.TeamConstruction; |
| | | import com.ycl.entity.cockpitManage.TeamIndex; |
| | | import com.ycl.mapper.cockpitManage.TeamConstructionMapper; |
| | | import com.ycl.service.cockpitManage.ITeamConstructionService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TeamConstructionServiceImpl extends ServiceImpl<TeamConstructionMapper, TeamConstruction> implements ITeamConstructionService { |
| | | |
| | | @Override |
| | | public List<TeamIndex> teamIndex(String beginTime, String endTime) { |
| | | return baseMapper.teamIndex(beginTime, endTime); |
| | | } |
| | | } |
| | |
| | | InputStream inputStream = new ByteArrayInputStream(data); |
| | | try { |
| | | // 妿List<AlarmDataParam>åç |
| | | if (alarmParam.getAlarmData()!=null && alarmParam.getAlarmData().size()!=0) { |
| | | if (alarmParam.getAlarmData() != null && alarmParam.getAlarmData().size() != 0) { |
| | | |
| | | BufferedImage image = ImageIO.read(inputStream); |
| | | Graphics2D g2 = (Graphics2D) image.getGraphics(); |
| | | g2.setColor(Color.RED); |
| | | g2.setStroke(new BasicStroke(3.0f)); |
| | | BufferedImage image = ImageIO.read(inputStream); |
| | | Graphics2D g2 = (Graphics2D) image.getGraphics(); |
| | | g2.setColor(Color.RED); |
| | | g2.setStroke(new BasicStroke(3.0f)); |
| | | |
| | | List<AlarmDataParam> alarmData = alarmParam.getAlarmData(); |
| | | List<AlarmDataParam> alarmData = alarmParam.getAlarmData(); |
| | | |
| | | alarmData.forEach(new Consumer<AlarmDataParam>() { |
| | | @Override |
| | | public void accept(AlarmDataParam alarmDataParam) { |
| | | List<AlarmObject> alarmObject = alarmDataParam.getAlarmObject(); |
| | | alarmObject.forEach(new Consumer<AlarmObject>() { |
| | | @Override |
| | | public void accept(AlarmObject alarmObject) { |
| | | ObjectRect rect = alarmObject.getObjectRect(); |
| | | g2.drawRect(rect.getX(), rect.getY(), rect.getW(), rect.getH()); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | alarmData.forEach(new Consumer<AlarmDataParam>() { |
| | | @Override |
| | | public void accept(AlarmDataParam alarmDataParam) { |
| | | List<AlarmObject> alarmObject = alarmDataParam.getAlarmObject(); |
| | | alarmObject.forEach(new Consumer<AlarmObject>() { |
| | | @Override |
| | | public void accept(AlarmObject alarmObject) { |
| | | ObjectRect rect = alarmObject.getObjectRect(); |
| | | g2.drawRect(rect.getX(), rect.getY(), rect.getW(), rect.getH()); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | ByteArrayOutputStream os = new ByteArrayOutputStream(); |
| | | ImageIO.write(image, extension, os); |
| | | inputStream = new ByteArrayInputStream(os.toByteArray()); |
| | | ByteArrayOutputStream os = new ByteArrayOutputStream(); |
| | | ImageIO.write(image, extension, os); |
| | | inputStream = new ByteArrayInputStream(os.toByteArray()); |
| | | |
| | | } |
| | | picData = ossService.uploadImages(inputStream, extension); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.out.println("ä¿åæ¥è¦æ°æ®å¤±è´¥---å¾çä¸ä¼ 失败ï¼" + e.getMessage()); |
| | | // e.printStackTrace(); |
| | | } |
| | | } |
| | | List<VideoAlarmReport> videoAlarmReports = new ArrayList<>(); |
| | |
| | | this.updateById(videoAlarmReport); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | System.out.println("ä¿åæ¥è¦æ°æ®å¤±è´¥ï¼" + e.getMessage()); |
| | | // e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | |
| | | timeout: 0 |
| | | |
| | | datasource: |
| | | url: jdbc:mysql://42.193.1.25:3306/sccg0318?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false |
| | | url: jdbc:mysql://42.193.1.25:3306/sccg?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false |
| | | username: root |
| | | password: 321$YcYl@1970! |
| | | type: com.alibaba.druid.pool.DruidDataSource |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.mapper.cockpitManage.TeamConstructionMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.entity.cockpitManage.TeamConstruction"> |
| | | <id column="id" property="id"/> |
| | | <result column="name" property="name"/> |
| | | <result column="people_number" property="peopleNumber"/> |
| | | <result column="up_undergraduate_people_number" property="upUndergraduatePeopleNumber"/> |
| | | <result column="under_forty_five_people_number" property="underFortyFivePeopleNumber"/> |
| | | <result column="legal_professional_qualification_certificate_people_number" |
| | | property="legalProfessionalQualificationCertificatePeopleNumber"/> |
| | | <result column="report_number" property="reportNumber"/> |
| | | <result column="disciplinary_offence_number" property="disciplinaryOffenceNumber"/> |
| | | <result column="criminal_offense_number" property="criminalOffenseNumber"/> |
| | | <result column="month_case_number" property="monthCaseNumber"/> |
| | | <result column="month_index_number" property="monthIndexNumber"/> |
| | | <result column="no_timeout_case_number" property="noTimeoutCaseNumber"/> |
| | | <result column="review_or_lawsuit_number" property="reviewOrLawsuitNumber"/> |
| | | <result column="holder_number" property="holderNumber"/> |
| | | <result column="law_enforcement_officer" property="lawEnforcementOfficer"/> |
| | | </resultMap> |
| | | <resultMap id="VOMap" extends="BaseResultMap" type="com.ycl.entity.cockpitManage.TeamIndex"> |
| | | |
| | | <result column="all_count" property="allCount"/> |
| | | <result column="no_handle_count" property="noHandleCount"/> |
| | | <result column="over_count" property="overCount"/> |
| | | <result column="punctuality_count" property="punctualityCount"/> |
| | | </resultMap> |
| | | <select id="teamIndex" resultMap="VOMap"> |
| | | SELECT tc.id,tc.name, tc.people_number, tc.up_undergraduate_people_number, tc.under_forty_five_people_number, tc.legal_professional_qualification_certificate_people_number, tc.report_number, tc.disciplinary_offence_number,tc.criminal_offense_number, tc.month_case_number, tc.month_index_number, tc.no_timeout_case_number,tc.review_or_lawsuit_number, tc.holder_number, tc.law_enforcement_officer , |
| | | count(bc.id) all_count, |
| | | sum(case WHEN (dr.state =1 and (dr.limit_time > dr.end_time or dr.limit_time is null) ) THEN 1 ELSE 0 END) punctuality_count, |
| | | sum(case WHEN (dr.state =1 and dr.limit_time < dr.end_time and dr.end_time is not null ) THEN 1 ELSE 0 END) over_count, |
| | | sum(case WHEN (dr.state =1 and dr.limit_time < dr.end_time and dr.end_time is null ) THEN 1 ELSE 0 END) no_handle_count |
| | | from ums_team_construction tc |
| | | LEFT JOIN ums_base_case bc on tc.region_id = bc.street_id |
| | | <if test="beginTime!=null and beginTime!=''"> |
| | | and bc.alarm_time between #{beginTime} and #{endTime} |
| | | </if> |
| | | LEFT JOIN ums_dispose_record dr on bc.id = dr.base_case_id |
| | | |
| | | GROUP BY tc.id,tc.name, tc.people_number, tc.up_undergraduate_people_number, tc.under_forty_five_people_number, tc.legal_professional_qualification_certificate_people_number, tc.report_number, tc.disciplinary_offence_number,tc.criminal_offense_number, tc.month_case_number, tc.month_index_number, tc.no_timeout_case_number,tc.review_or_lawsuit_number, tc.holder_number, tc.law_enforcement_officer |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |