Compare commits

..

3 Commits

  1. 6
      src/main/java/com/biutag/supervision/constants/enums/InspectCaseEnum.java
  2. 8
      src/main/java/com/biutag/supervision/pojo/dto/common/BarItem.java
  3. 20
      src/main/resources/mapper/StatisticsGroupMapper.xml

6
src/main/java/com/biutag/supervision/constants/enums/InspectCaseEnum.java

@ -12,17 +12,15 @@ public enum InspectCaseEnum {
TRUE("1", "属实"), TRUE("1", "属实"),
// 部分属实 // 部分属实
PARTIALLY_TRUE("2", "部分属实"), PARTIALLY_TRUE("2", "部分属实"),
QTFT("3", "不属实,但发现存在其他问题"),
// 不属实 // 不属实
WFCS("4", "现有证据暂时无法查实"), FALSE("3", "不属实");
FALSE("5", "不属实");
private String value; private String value;
private String label; private String label;
public static boolean isItTure(String value) { public static boolean isItTure(String value) {
return TRUE.getValue().equals(value) || PARTIALLY_TRUE.getValue().equals(value) || QTFT.getValue().equals(value); return TRUE.getValue().equals(value) || PARTIALLY_TRUE.getValue().equals(value);
} }
} }

8
src/main/java/com/biutag/supervision/pojo/dto/common/BarItem.java

@ -2,6 +2,7 @@ package com.biutag.supervision.pojo.dto.common;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -13,8 +14,15 @@ import java.math.BigDecimal;
@Setter @Setter
@Getter @Getter
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor
public class BarItem { public class BarItem {
private String label; private String label;
private BigDecimal value; private BigDecimal value;
private String detailId;
public BarItem(String label, BigDecimal value) {
this.label = label;
this.value = value;
}
} }

20
src/main/resources/mapper/StatisticsGroupMapper.xml

@ -79,9 +79,11 @@
<select id="selectNegativeStatisticsByThree" resultType="com.biutag.supervision.pojo.dto.common.BarItem"> <select id="selectNegativeStatisticsByThree" resultType="com.biutag.supervision.pojo.dto.common.BarItem">
SELECT SELECT
membersName label, membersName label,
`value` `value`,
detail_depart.id detailId
FROM FROM
negative_group_members m negative_group_members m
LEFT JOIN sup_depart detail_depart ON detail_depart.id = m.membersCode
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
three_involve_depart_id, three_involve_depart_id,
@ -102,9 +104,11 @@
<select id="selectNegativePerNumberStatisticsByThree" resultType="com.biutag.supervision.pojo.dto.common.BarItem"> <select id="selectNegativePerNumberStatisticsByThree" resultType="com.biutag.supervision.pojo.dto.common.BarItem">
SELECT SELECT
membersName label, membersName label,
`value` `value`,
detail_depart.id detailId
FROM FROM
negative_group_members m negative_group_members m
LEFT JOIN sup_depart detail_depart ON detail_depart.id = m.membersCode
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
three_involve_depart_id, three_involve_depart_id,
@ -127,9 +131,11 @@
SELECT SELECT
membersName label, membersName label,
CASE WHEN s.police_size + s.aux_size > 0 THEN CASE WHEN s.police_size + s.aux_size > 0 THEN
ROUND(total / ( s.police_size + s.aux_size ), 1) ELSE 0 END `value` ROUND(total / ( s.police_size + s.aux_size ), 1) ELSE 0 END `value`,
detail_depart.id detailId
FROM FROM
negative_group_members m negative_group_members m
LEFT JOIN sup_depart detail_depart ON detail_depart.id = m.membersCode
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
three_involve_depart_id, three_involve_depart_id,
@ -151,7 +157,12 @@
<select id="selectNegativeStatistics" resultType="com.biutag.supervision.pojo.dto.common.BarItem"> <select id="selectNegativeStatistics" resultType="com.biutag.supervision.pojo.dto.common.BarItem">
SELECT SELECT
b.blameName label, b.blameName label,
count( DISTINCT n.id ) `value` count( DISTINCT n.id ) `value`,
CASE WHEN COUNT(DISTINCT NULLIF(TRIM(b.blameIdCode), '')) = 1
AND COUNT(DISTINCT p.id) = 1
AND (SELECT COUNT(DISTINCT NULLIF(TRIM(b2.blameIdCode), ''))
FROM negative_blame b2 WHERE b2.blameName = b.blameName) = 1
THEN MIN(p.id_code) END detailId
FROM FROM
negative n negative n
JOIN negative_blame b ON n.id = b.negativeId JOIN negative_blame b ON n.id = b.negativeId
@ -159,6 +170,7 @@
<foreach collection="personTypeCode" item="data" open="(" close=")" separator=","> <foreach collection="personTypeCode" item="data" open="(" close=")" separator=",">
#{data} #{data}
</foreach> </foreach>
LEFT JOIN sup_police p ON p.id_code = b.blameIdCode AND p.del = 0
LEFT JOIN sup_depart d ON n.handle_three_depart_id = d.id LEFT JOIN sup_depart d ON n.handle_three_depart_id = d.id
WHERE WHERE
n.crtTime BETWEEN #{beginTime} AND #{endTime} n.crtTime BETWEEN #{beginTime} AND #{endTime}

Loading…
Cancel
Save