From 6371f17b2056b6e4010cbdc60965d5eac12a5d98 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 15 十月 2024 18:27:29 +0800 Subject: [PATCH] 考核导出bug,人脸上传及时bug --- ycl-server/src/main/java/com/ycl/calculate/CarSnapshopDataCalculation.java | 28 +++++++- ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml | 5 + ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexCar.java | 2 ycl-server/src/main/java/com/ycl/calculate/FaceSnapshotDataCalculation.java | 26 ++++++-- ycl-server/src/main/java/com/ycl/task/CheckScoreTask.java | 1 ycl-pojo/src/main/java/com/ycl/platform/domain/entity/WorkOrderCheckImg.java | 2 ycl-pojo/src/main/java/com/ycl/platform/base/CheckIndex.java | 5 + ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java | 72 +++++++++++++++-------- ycl-pojo/src/main/java/com/ycl/platform/domain/dto/CheckResultExportDTO.java | 2 ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml | 5 + ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml | 5 + ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexFace.java | 2 12 files changed, 109 insertions(+), 46 deletions(-) diff --git a/ycl-pojo/src/main/java/com/ycl/platform/base/CheckIndex.java b/ycl-pojo/src/main/java/com/ycl/platform/base/CheckIndex.java index 1cc37c8..e62c054 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/base/CheckIndex.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/base/CheckIndex.java @@ -53,7 +53,10 @@ @TableField(exist = false) public List<Integer> deptIds; @TableField(exist = false) - public Integer examineTagQuery; + public Boolean provinceTag; + @TableField(exist = false) + public Boolean deptTag; + @TableField(exist = false) public List<Integer> examineCategories; /** 璇锋眰鍙傛暟 */ diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/dto/CheckResultExportDTO.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/dto/CheckResultExportDTO.java index 90d2e95..0ee09c3 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/domain/dto/CheckResultExportDTO.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/dto/CheckResultExportDTO.java @@ -17,7 +17,7 @@ /** 閮ㄩ棬ids 鐢ㄤ簬鍗$墖椤靛鍑� */ private List<Integer> deptIds; - /** 鑰冩牳鏍囩0/1 鐪佸巺/甯傚眬 鐢ㄤ簬鍗$墖椤靛鍑� */ + /** 鑰冩牳鏍囩0/1/2 鐪佸巺/鍖哄幙/鍏畨 鐢ㄤ簬鍗$墖椤靛鍑� */ private List<Integer> examineTags; /** 鏄惁闇�瑕佸钩鍧囧�� 鐢ㄤ簬鍗$墖椤靛鍑� */ private Boolean average; diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexCar.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexCar.java index 8adc025..1431db4 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexCar.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexCar.java @@ -103,7 +103,7 @@ }else { checkIndexCarVo.setCreateTimeStr(checkIndexCar.getCreateTimeStr()); } - checkIndexCarVo.setExamineTagStr(CheckConstants.Examine_Tag_Province.equals(checkIndexCarVo.getExamineTag()) ? "鐪佸巺鑰冩牳" : CheckConstants.Examine_Tag_County.equals(checkIndexCarVo.getExamineTag()) ? "鍖哄幙鑰冩牳" : "鍏畨閮ㄨ�冩牳"); + checkIndexCarVo.setExamineTagStr(CheckConstants.Examine_Tag_Province.equals(checkIndexCar.getExamineTag()) ? "鐪佸巺鑰冩牳" : CheckConstants.Examine_Tag_County.equals(checkIndexCar.getExamineTag()) ? "鍖哄幙鑰冩牳" : "鍏畨閮ㄨ�冩牳"); checkIndexCarVo.setSiteOnlineText(checkIndexCar.getSiteOnline().multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP) + "%"); checkIndexCarVo.setVehicleCaptureAccuracyText(checkIndexCar.getVehicleCaptureAccuracy().multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP) + "%"); checkIndexCarVo.setDeviceDirectoryConsistentText(checkIndexCar.getDeviceDirectoryConsistent().multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP) + "%"); diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexFace.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexFace.java index 083bcc0..f41950e 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexFace.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexFace.java @@ -93,7 +93,7 @@ checkIndexFaceVo.setCreateTimeStr(checkIndexFace.getCreateTimeStr()); } checkIndexFaceVo.setDeptName(checkIndexFace.getDeptName()); - checkIndexFaceVo.setExamineTagStr(CheckConstants.Examine_Tag_Province.equals(checkIndexFaceVo.getExamineTag()) ? "鐪佸巺鑰冩牳" : CheckConstants.Examine_Tag_County.equals(checkIndexFaceVo.getExamineTag()) ? "鍖哄幙鑰冩牳" : "鍏畨閮ㄨ�冩牳"); + checkIndexFaceVo.setExamineTagStr(CheckConstants.Examine_Tag_Province.equals(checkIndexFace.getExamineTag()) ? "鐪佸巺鑰冩牳" : CheckConstants.Examine_Tag_County.equals(checkIndexFace.getExamineTag()) ? "鍖哄幙鑰冩牳" : "鍏畨閮ㄨ�冩牳"); checkIndexFaceVo.setSiteOnlineText(checkIndexFace.getSiteOnline().multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP) + "%"); checkIndexFaceVo.setFaceInformationCollectionAccuracyText(checkIndexFace.getFaceInformationCollectionAccuracy().multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP) + "%"); checkIndexFaceVo.setFacePictureAvailabilityText(checkIndexFace.getFacePictureAvailability().multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP) + "%"); diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/WorkOrderCheckImg.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/WorkOrderCheckImg.java index e0bfc64..fcf794b 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/WorkOrderCheckImg.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/WorkOrderCheckImg.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.util.Date; @@ -28,5 +29,6 @@ private String imgUrl; @TableField("create_time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime; } diff --git a/ycl-server/src/main/java/com/ycl/calculate/CarSnapshopDataCalculation.java b/ycl-server/src/main/java/com/ycl/calculate/CarSnapshopDataCalculation.java index 4b9b085..98c4b3e 100644 --- a/ycl-server/src/main/java/com/ycl/calculate/CarSnapshopDataCalculation.java +++ b/ycl-server/src/main/java/com/ycl/calculate/CarSnapshopDataCalculation.java @@ -90,11 +90,21 @@ int provinceTotalSites = 0; //鍖哄幙鎬荤偣浣嶆暟 int countyTotalSites = 0; + //鍚屾湡鐪佸巺鎶撴媿閲� + int lastProvinceSnap = 0; + //鍚屾湡鍖哄幙鎶撴媿閲� + int lastCountySnap = 0; //浠庡瓧鍏搁噷绛涢�夌渷鍘呭�� - int lastProvinceSnap = Integer.parseInt(lastSnap.stream().filter(sysDictData -> CheckConstants.SNAP_PROVINCE_CAR.equals(sysDictData.getDictLabel())).findFirst().get().getDictValue()); + Optional<SysDictData> first = lastSnap.stream().filter(sysDictData -> CheckConstants.SNAP_PROVINCE_CAR.equals(sysDictData.getDictLabel())).findFirst(); + if (first.isPresent()) { + lastProvinceSnap = Integer.parseInt(first.get().getDictValue()); + } //浠庡瓧鍏搁噷绛涢�夊尯鍘垮�� - int lastCountySnap = Integer.parseInt(lastSnap.stream().filter(sysDictData -> CheckConstants.SNAP_COUNTY_CAR.equals(sysDictData.getDictLabel())).findFirst().get().getDictValue());; - + Optional<SysDictData> first2 = lastSnap.stream().filter(sysDictData -> CheckConstants.SNAP_COUNTY_CAR.equals(sysDictData.getDictLabel())).findFirst(); + if (first2.isPresent()) { + lastCountySnap = Integer.parseInt(first2.get().getDictValue()); + } + log.info("鐪佸巺鍚屾湡锛歿}锛屽尯鍘垮悓鏈燂細{}",lastProvinceSnap,lastCountySnap); //璁$畻鎬绘暟 for (Map.Entry<String, AreaStats> entry : areaStatsMap.entrySet()) { String key = entry.getKey(); @@ -105,6 +115,7 @@ countyTotalSites += value.totalSites; } } + log.info("鐪佸巺鎬绘暟锛歿}锛屽尯鍘挎�绘暟锛歿}",provinceTotalSites,countyTotalSites); //鍔犳潈鎿嶄綔,琛ュ厖鍚屾湡鎶撴媿閲� for (Map.Entry<String, AreaStats> entry : areaStatsMap.entrySet()) { String key = entry.getKey(); @@ -114,16 +125,23 @@ if (value.totalSites == 0) { value.lastSnapCount = 0; } else { - value.lastSnapCount = (value.totalSites / provinceTotalSites) * lastProvinceSnap; + BigDecimal result = new BigDecimal(value.totalSites) + .divide(new BigDecimal(provinceTotalSites), 2, RoundingMode.HALF_UP) + .multiply(new BigDecimal(lastProvinceSnap)); + value.lastSnapCount = result.setScale(0, RoundingMode.HALF_UP).intValue(); } } else { //鍖哄幙 if (value.totalSites == 0) { value.lastSnapCount = 0; } else { - value.lastSnapCount = (value.totalSites / countyTotalSites) * lastCountySnap; + BigDecimal result = new BigDecimal(value.totalSites) + .divide(new BigDecimal(countyTotalSites), 2, RoundingMode.HALF_UP) + .multiply(new BigDecimal(lastCountySnap)); + value.lastSnapCount = result.setScale(0, RoundingMode.HALF_UP).intValue(); } } + log.info("璁$畻鐨勬暟鎹細鎬荤偣浣嶆暟锛歿}锛屾�绘姄鎷嶉噺锛歿}锛屽悓鏈熸姄鎷嶉噺锛歿}",value.totalSites,value.totalDataSum,value.lastSnapCount); } } diff --git a/ycl-server/src/main/java/com/ycl/calculate/FaceSnapshotDataCalculation.java b/ycl-server/src/main/java/com/ycl/calculate/FaceSnapshotDataCalculation.java index dceb4c8..209fc63 100644 --- a/ycl-server/src/main/java/com/ycl/calculate/FaceSnapshotDataCalculation.java +++ b/ycl-server/src/main/java/com/ycl/calculate/FaceSnapshotDataCalculation.java @@ -101,12 +101,20 @@ int provinceTotalSites = 0; //鍖哄幙鎬荤偣浣嶆暟 int countyTotalSites = 0; + //鍚屾湡鐪佸巺鎶撴媿閲� + int lastProvinceSnap = 0; + //鍚屾湡鍖哄幙鎶撴媿閲� + int lastCountySnap = 0; //浠庡瓧鍏搁噷绛涢�夌渷鍘呭�� - int lastProvinceSnap = Integer.parseInt(lastSnap.stream().filter(sysDictData -> CheckConstants.SNAP_PROVINCE_FACE.equals(sysDictData.getDictLabel())).findFirst().get().getDictValue()); + Optional<SysDictData> first = lastSnap.stream().filter(sysDictData -> CheckConstants.SNAP_PROVINCE_FACE.equals(sysDictData.getDictLabel())).findFirst(); + if (first.isPresent()) { + lastProvinceSnap = Integer.parseInt(first.get().getDictValue()); + } //浠庡瓧鍏搁噷绛涢�夊尯鍘垮�� - int lastCountySnap = Integer.parseInt(lastSnap.stream().filter(sysDictData -> CheckConstants.SNAP_COUNTY_FACE.equals(sysDictData.getDictLabel())).findFirst().get().getDictValue()); - ; - + Optional<SysDictData> first2 = lastSnap.stream().filter(sysDictData -> CheckConstants.SNAP_COUNTY_FACE.equals(sysDictData.getDictLabel())).findFirst(); + if (first2.isPresent()) { + lastCountySnap = Integer.parseInt(first2.get().getDictValue()); + } //璁$畻鎬绘暟 for (Map.Entry<String, AreaStats> entry : areaStatsMap.entrySet()) { String key = entry.getKey(); @@ -126,14 +134,20 @@ if (value.totalSites == 0) { value.lastSnapCount = 0; } else { - value.lastSnapCount = (value.totalSites / provinceTotalSites) * lastProvinceSnap; + BigDecimal result = new BigDecimal(value.totalSites) + .divide(new BigDecimal(provinceTotalSites), 2, RoundingMode.HALF_UP) + .multiply(new BigDecimal(lastProvinceSnap)); + value.lastSnapCount = result.setScale(0, RoundingMode.HALF_UP).intValue(); } } else { //鍖哄幙 if (value.totalSites == 0) { value.lastSnapCount = 0; } else { - value.lastSnapCount = (value.totalSites / countyTotalSites) * lastCountySnap; + BigDecimal result = new BigDecimal(value.totalSites) + .divide(new BigDecimal(countyTotalSites), 2, RoundingMode.HALF_UP) + .multiply(new BigDecimal(lastCountySnap)); + value.lastSnapCount = result.setScale(0, RoundingMode.HALF_UP).intValue(); } } } diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java index cca9a63..d12887c 100644 --- a/ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java +++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java @@ -317,22 +317,29 @@ // date = formatter.format(new Date()); // } // } - + //TODO:鏍囩bug淇 + //娌℃湁鏍囩榛樿鍏ㄥ + if(CollectionUtils.isEmpty(exportDTO.getExamineTags())){ + exportDTO.setExamineTags(Arrays.asList(0,1,2)); + } /** 瀵间笁寮爏heet */ //杞﹁締 - CheckIndexCar checkIndexCar = new CheckIndexCar(); -// checkIndexCar.setDate(date); - checkIndexCar.setQuarter(exportDTO.getQuarter()); - checkIndexCar.setDeptId(exportDTO.getDeptId()); - checkIndexCar.setDeptIds(exportDTO.getDeptIds()); - //鏉冮檺鎺у埗 鍙兘鏌ョ湅宸插彂甯� - roleControl(checkIndexCar); List<CheckIndexCar> checkIndexCars = new ArrayList<>(); + //杞﹁締鍜屼汉鑴告病鏈夊叕瀹夐儴 for (Integer examineTag : exportDTO.getExamineTags()) { + if(examineTag ==2) continue; + CheckIndexCar checkIndexCar = new CheckIndexCar(); +// checkIndexCar.setDate(date); + checkIndexCar.setQuarter(exportDTO.getQuarter()); + checkIndexCar.setDeptId(exportDTO.getDeptId()); + checkIndexCar.setDeptIds(exportDTO.getDeptIds()); + //鏉冮檺鎺у埗 鍙兘鏌ョ湅宸插彂甯� + roleControl(checkIndexCar); checkIndexCar.setExamineTag(Short.valueOf(examineTag + "")); if (examineTag == 0) { - checkIndexCar.setExamineTagQuery(1); + checkIndexCar.setProvinceTag(Boolean.TRUE); } + checkIndexCars.addAll(indexCarService.selectCheckIndexCarList(checkIndexCar)); } //璁$畻骞冲潎鍊兼斁鍦╡xcel鏈�鍚� @@ -368,18 +375,19 @@ } ExcelExp e1 = new ExcelExp("杞﹁締鑰冩牳鎸囨爣鏁版嵁", checkIndexCarVOS, CheckIndexCarVO.class); //浜鸿劯 - CheckIndexFace checkIndexFace = new CheckIndexFace(); -// checkIndexFace.setDate(date); - checkIndexFace.setQuarter(exportDTO.getQuarter()); - checkIndexFace.setDeptId(exportDTO.getDeptId()); - checkIndexFace.setDeptIds(exportDTO.getDeptIds()); - //鏉冮檺鎺у埗 鍙兘鏌ョ湅宸插彂甯� - roleControl(checkIndexFace); List<CheckIndexFace> checkIndexFaces = new ArrayList<>(); for (Integer examineTag : exportDTO.getExamineTags()) { + if(examineTag ==2) continue; + CheckIndexFace checkIndexFace = new CheckIndexFace(); +// checkIndexFace.setDate(date); + checkIndexFace.setQuarter(exportDTO.getQuarter()); + checkIndexFace.setDeptId(exportDTO.getDeptId()); + checkIndexFace.setDeptIds(exportDTO.getDeptIds()); + //鏉冮檺鎺у埗 鍙兘鏌ョ湅宸插彂甯� + roleControl(checkIndexFace); checkIndexFace.setExamineTag(Short.valueOf(examineTag + "")); if (examineTag == 0) { - checkIndexFace.setExamineTagQuery(1); + checkIndexFace.setProvinceTag(Boolean.TRUE); } checkIndexFaces.addAll(indexFaceService.selectCheckIndexFaceList(checkIndexFace)); } @@ -416,18 +424,21 @@ } ExcelExp e2 = new ExcelExp("浜鸿劯鑰冩牳鎸囨爣鏁版嵁", checkIndexFaceVOS, CheckIndexFaceVO.class); //瑙嗛 - CheckIndexVideo checkIndexVideo = new CheckIndexVideo(); -// checkIndexVideo.setDate(date); - checkIndexVideo.setQuarter(exportDTO.getQuarter()); - checkIndexVideo.setDeptId(exportDTO.getDeptId()); - checkIndexVideo.setDeptIds(exportDTO.getDeptIds()); - //鏉冮檺鎺у埗 鍙兘鏌ョ湅宸插彂甯� - roleControl(checkIndexVideo); List<CheckIndexVideo> checkIndexVideos = new ArrayList<>(); for (Integer examineTag : exportDTO.getExamineTags()) { + CheckIndexVideo checkIndexVideo = new CheckIndexVideo(); +// checkIndexVideo.setDate(date); + checkIndexVideo.setQuarter(exportDTO.getQuarter()); + checkIndexVideo.setDeptId(exportDTO.getDeptId()); + checkIndexVideo.setDeptIds(exportDTO.getDeptIds()); + //鏉冮檺鎺у埗 鍙兘鏌ョ湅宸插彂甯� + roleControl(checkIndexVideo); checkIndexVideo.setExamineTag(Short.valueOf(examineTag + "")); if (examineTag == 0) { - checkIndexVideo.setExamineTagQuery(1); + checkIndexVideo.setProvinceTag(Boolean.TRUE); + }else if(examineTag ==2){ + //鍙湁瑙嗛鏈夊叕瀹夐儴鏁版嵁 + checkIndexVideo.setDeptTag(Boolean.TRUE); } checkIndexVideos.addAll(indexVideoService.selectCheckIndexVideoList(checkIndexVideo)); } @@ -456,6 +467,17 @@ //鏍规嵁绉垎闄嶅簭 checkIndexVideos.addAll(videos.stream().sorted(Comparator.comparing(CheckIndexVideo::getScore).reversed()).collect(Collectors.toList())); } + List<CheckIndexVideo> deptList = checkIndexVideos.stream().filter(video -> CheckConstants.Examine_Tag_Dept.equals(video.getExamineTag())).collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(deptList)) { + Map<Long, List<CheckIndexVideo>> videoMap = deptList.stream().collect(Collectors.groupingBy(CheckIndexVideo::getDeptId)); + List<CheckIndexVideo> videos = new ArrayList<>(); + videoMap.forEach((deptId, list) -> { + CheckIndexVideo video = CheckIndexVideo.calculateAverage(list); + videos.add(video); + }); + //鏍规嵁绉垎闄嶅簭 + checkIndexVideos.addAll(videos.stream().sorted(Comparator.comparing(CheckIndexVideo::getScore).reversed()).collect(Collectors.toList())); + } } List<CheckIndexVideoVO> checkIndexVideoVOS = new ArrayList<>(); for (CheckIndexVideo indexVideo : checkIndexVideos) { diff --git a/ycl-server/src/main/java/com/ycl/task/CheckScoreTask.java b/ycl-server/src/main/java/com/ycl/task/CheckScoreTask.java index 7cfeee1..060b61a 100644 --- a/ycl-server/src/main/java/com/ycl/task/CheckScoreTask.java +++ b/ycl-server/src/main/java/com/ycl/task/CheckScoreTask.java @@ -98,6 +98,7 @@ if(result.getExamineTag().equals(today.getExamineTag()) && result.getExamineCategory().equals(today.getExamineCategory()) && result.getDeptId().equals(today.getDeptId())){ //琛ュ厖id锛屽悗缁牴鎹甶d saveOrUpdate result.setId(today.getId()); + result.setPublish(today.getPublish()); } } } diff --git a/ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml index b1daa49..3ec6730 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml @@ -31,13 +31,14 @@ select tcic.*,sd.dept_name,tcs.score,count(m.serial_number) as num from t_check_index_car tcic left join sys_dept sd on tcic.dept_id = sd.dept_id left join t_check_score tcs on tcic.id = tcs.index_id - left join t_yw_point p on p.dept_id = tcic.dept_id + left join t_yw_point p on p.dept_id = tcic.dept_id and p.examine_status = 1 left join t_monitor m on p.serial_number = m.serial_number <where> tcs.examine_category = 2 and m.camera_fun_type like concat('%',2,'%') <if test="deptId != null "> and tcic.dept_id = #{deptId}</if> <if test="examineTag != null "> and tcic.examine_tag = #{examineTag}</if> - <if test="examineTagQuery != null "> and p.province_tag = #{examineTagQuery}</if> + <if test="provinceTag != null "> and p.province_tag = #{provinceTag}</if> + <if test="deptTag != null "> and p.dept_tag = #{deptTag}</if> <if test="quarter != null and quarter.size > 0"> and date_format(tcs.create_time, '%Y-%m') between #{quarter[0]} and #{quarter[1]} </if> diff --git a/ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml index 9901c81..fad7608 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml @@ -29,13 +29,14 @@ select tcif.*,sd.dept_name,tcs.score,count(m.serial_number) as num from t_check_index_face tcif left join sys_dept sd on tcif.dept_id = sd.dept_id left join t_check_score tcs on tcif.id = tcs.index_id - left join t_yw_point p on p.dept_id = tcif.dept_id + left join t_yw_point p on p.dept_id = tcif.dept_id and p.examine_status = 1 left join t_monitor m on p.serial_number = m.serial_number <where> tcs.examine_category = 3 and m.camera_fun_type like concat('%',3,'%') <if test="deptId != null "> and tcif.dept_id = #{deptId}</if> <if test="examineTag != null "> and tcif.examine_tag = #{examineTag}</if> - <if test="examineTagQuery != null "> and p.province_tag = #{examineTagQuery}</if> + <if test="provinceTag != null "> and p.province_tag = #{provinceTag}</if> + <if test="deptTag != null "> and p.dept_tag = #{deptTag}</if> <if test="quarter != null and quarter.size > 0"> and date_format(tcs.create_time, '%Y-%m') between #{quarter[0]} and #{quarter[1]} </if> diff --git a/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml index 0e5186a..07b9525 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml @@ -35,13 +35,14 @@ select tciv.*,sd.dept_name,tcs.score,count(m.serial_number) as num from t_check_index_video tciv left join sys_dept sd on tciv.dept_id = sd.dept_id left join t_check_score tcs on tciv.id = tcs.index_id - left join t_yw_point p on p.dept_id = tciv.dept_id + left join t_yw_point p on p.dept_id = tciv.dept_id and p.examine_status = 1 left join t_monitor m on p.serial_number = m.serial_number <where> tcs.examine_category = 1 and m.camera_fun_type like concat('%',1,'%') <if test="deptId != null "> and tciv.dept_id = #{deptId}</if> <if test="examineTag != null "> and tciv.examine_tag = #{examineTag}</if> - <if test="examineTagQuery != null "> and p.province_tag = #{examineTagQuery}</if> + <if test="provinceTag != null "> and p.province_tag = #{provinceTag}</if> + <if test="deptTag != null "> and p.dept_tag = #{deptTag}</if> <if test="quarter != null and quarter.size > 0"> and date_format(tcs.create_time, '%Y-%m') between #{quarter[0]} and #{quarter[1]} </if> -- Gitblit v1.8.0