|
|
|
@ -17,7 +17,9 @@ import com.biutag.supervision.pojo.entity.Negative; |
|
|
|
import com.biutag.supervision.pojo.entity.NegativeBlame; |
|
|
|
import com.biutag.supervision.pojo.entity.NegativeBlame; |
|
|
|
import com.biutag.supervision.pojo.entity.SupDepart; |
|
|
|
import com.biutag.supervision.pojo.entity.SupDepart; |
|
|
|
import com.biutag.supervision.pojo.vo.EchartsVo; |
|
|
|
import com.biutag.supervision.pojo.vo.EchartsVo; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.vo.GobalMapIconVo; |
|
|
|
import com.biutag.supervision.pojo.vo.RankVo; |
|
|
|
import com.biutag.supervision.pojo.vo.RankVo; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.vo.SuperviseMapIconVo; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
@ -35,13 +37,8 @@ import java.util.stream.Collectors; |
|
|
|
@Service |
|
|
|
@Service |
|
|
|
public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisionNotifyMapper, DataSupervisionNotify> { |
|
|
|
public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisionNotifyMapper, DataSupervisionNotify> { |
|
|
|
|
|
|
|
|
|
|
|
private final DataSupervisionNotifyMapper dataSupervisionNotifyMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final NegativeMapper negativeMapper; |
|
|
|
private final NegativeMapper negativeMapper; |
|
|
|
private final NegativeBlameMapper negativeBlameMapper; |
|
|
|
private final NegativeBlameMapper negativeBlameMapper; |
|
|
|
|
|
|
|
|
|
|
|
private final NegativeBlameService blameService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final SupDepartMapper supDepartMapper; |
|
|
|
private final SupDepartMapper supDepartMapper; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -55,10 +52,10 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio |
|
|
|
public JSONObject getAllSupervisionNotifyCount(Date beginTime, Date endTime) { |
|
|
|
public JSONObject getAllSupervisionNotifyCount(Date beginTime, Date endTime) { |
|
|
|
|
|
|
|
|
|
|
|
// 通报问题数
|
|
|
|
// 通报问题数
|
|
|
|
Long supervisionNotifyTotal = negativeMapper.selectSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.TRUE.getValue()); |
|
|
|
Long supervisionNotifyTotal = negativeMapper.selectSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.FALSE.getValue()); |
|
|
|
|
|
|
|
|
|
|
|
// 整改中
|
|
|
|
// 整改中
|
|
|
|
Long supervisionNotifyChangingTotal = negativeMapper.selectChangSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.TRUE.getValue(), "0"); |
|
|
|
Long supervisionNotifyChangingTotal = negativeMapper.selectChangSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.FALSE.getValue(), "0"); |
|
|
|
|
|
|
|
|
|
|
|
// 已整改
|
|
|
|
// 已整改
|
|
|
|
Long supervisionNotifyChangedTotal = negativeMapper.selectChangSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.TRUE.getValue(), "1"); |
|
|
|
Long supervisionNotifyChangedTotal = negativeMapper.selectChangSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.TRUE.getValue(), "1"); |
|
|
|
@ -79,6 +76,7 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio |
|
|
|
String id = negative.getId(); |
|
|
|
String id = negative.getId(); |
|
|
|
QueryWrapper<NegativeBlame> totalWrapper = new QueryWrapper<>(); |
|
|
|
QueryWrapper<NegativeBlame> totalWrapper = new QueryWrapper<>(); |
|
|
|
totalWrapper.eq("negativeId", id); |
|
|
|
totalWrapper.eq("negativeId", id); |
|
|
|
|
|
|
|
totalWrapper.eq("type", "personal"); |
|
|
|
supervisionNotifyPreTotal += negativeBlameMapper.selectCount(totalWrapper); |
|
|
|
supervisionNotifyPreTotal += negativeBlameMapper.selectCount(totalWrapper); |
|
|
|
} |
|
|
|
} |
|
|
|
// 整改率
|
|
|
|
// 整改率
|
|
|
|
@ -158,9 +156,70 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio |
|
|
|
|
|
|
|
|
|
|
|
public List<EchartsVo> getProblemTypeRatio(Date beginTime, Date endTime) { |
|
|
|
public List<EchartsVo> getProblemTypeRatio(Date beginTime, Date endTime) { |
|
|
|
List<EchartsVo> echartsVos = new ArrayList<>(); |
|
|
|
List<EchartsVo> echartsVos = new ArrayList<>(); |
|
|
|
|
|
|
|
echartsVos = negativeMapper.getProblemTypes(beginTime, endTime); |
|
|
|
|
|
|
|
return echartsVos; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<EchartsVo> getSupervisionTrend(String year) { |
|
|
|
|
|
|
|
List<EchartsVo> echartsVos = negativeMapper.getSupervisionTrend(year); |
|
|
|
|
|
|
|
return echartsVos; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 包括现场督察和专项 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param beginTime |
|
|
|
|
|
|
|
* @param endTime |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public List<SuperviseMapIconVo> getsupervisionMapIconInfo(Date beginTime, Date endTime) { |
|
|
|
|
|
|
|
List<SuperviseMapIconVo> res = new ArrayList<>(); |
|
|
|
|
|
|
|
List<SupDepart> supDeparts = supDepartMapper.selectDepartsByGroupType(3); |
|
|
|
|
|
|
|
for (SupDepart supDepart : supDeparts) { |
|
|
|
|
|
|
|
SuperviseMapIconVo SuperviseMapIconVo = new SuperviseMapIconVo(); |
|
|
|
|
|
|
|
SuperviseMapIconVo.setName(supDepart.getShortName()); |
|
|
|
|
|
|
|
SuperviseMapIconVo.setDepartId(supDepart.getId()); |
|
|
|
|
|
|
|
res.add(SuperviseMapIconVo); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for (SuperviseMapIconVo re : res) { |
|
|
|
|
|
|
|
String departId = re.getDepartId(); |
|
|
|
|
|
|
|
Long changed = negativeMapper.getNotifyChanged(beginTime, endTime, departId); |
|
|
|
|
|
|
|
Long changing = negativeMapper.getNotifyChanging(beginTime, endTime, departId); |
|
|
|
|
|
|
|
Long totalPro = changed + changing; |
|
|
|
|
|
|
|
Long relationOrg = negativeMapper.getRelationOrgCountByDepartId(departId); |
|
|
|
|
|
|
|
QueryWrapper<Negative> preQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
preQueryWrapper.in("problemSourcesCode", ProblemSourcesEnum.XCDC.getValue(), ProblemSourcesEnum.ZXDC.getValue()); |
|
|
|
|
|
|
|
List<Negative> negatives = negativeMapper.selectList(preQueryWrapper); |
|
|
|
|
|
|
|
Long supervisionNotifyPreTotal = 0L; |
|
|
|
|
|
|
|
for (Negative negative : negatives) { |
|
|
|
|
|
|
|
String id = negative.getId(); |
|
|
|
|
|
|
|
QueryWrapper<NegativeBlame> totalWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
totalWrapper.eq("negativeId", id); |
|
|
|
|
|
|
|
supervisionNotifyPreTotal += negativeBlameMapper.selectCount(totalWrapper); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 涉及人数 |
|
|
|
|
|
|
|
* 1、查出在 negative中的id集合 |
|
|
|
|
|
|
|
* 2、查出集合在blame中的涉及人数 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
/*QueryWrapper<Negative> preQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
preQueryWrapper.in("problemSourcesCode", ProblemSourcesEnum.XCDC.getValue(), ProblemSourcesEnum.ZXDC.getValue()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Negative> negatives = negativeMapper.selectList(preQueryWrapper); |
|
|
|
|
|
|
|
Long supervisionNotifyPreTotal = 0L; |
|
|
|
|
|
|
|
for (Negative negative : negatives) { |
|
|
|
|
|
|
|
String id = negative.getId(); |
|
|
|
|
|
|
|
QueryWrapper<NegativeBlame> totalWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
totalWrapper.eq("negativeId", id); |
|
|
|
|
|
|
|
supervisionNotifyPreTotal += negativeBlameMapper.selectCount(totalWrapper); |
|
|
|
|
|
|
|
}*/ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|