Browse Source

区直selectExtremeValue sql修改v2

dev_shibei_match
yinzuomei 5 years ago
parent
commit
a3022879d3
  1. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java
  2. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
  3. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java

@ -77,4 +77,14 @@ public interface DeptScoreDao extends BaseDao<DeptScoreEntity> {
*/
List<SubAgencyScoreAvgResultDTO> selectGovernDeptScoreAvg(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode);
/**
* @return int
* @param customerId
* @param monthId
* @param deptId
* @author yinzuomei
* @description
* @Date 2020/9/7 14:30
**/
int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, @Param("monthId")String monthId,@Param("deptId") String deptId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java

@ -152,7 +152,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
indexMap.forEach((key, indexInputVO) -> {
if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) {
//对应的数值
String sampleValueStr = (String) recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key));
String sampleValueStr =String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key)));
//构造样本值对象
SampleValue<BigDecimal> currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.DEPT_ID), new BigDecimal(sampleValueStr));
indexInputVO.getIndexValueVOs().add(currentGridIndexValue);
@ -194,6 +194,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
deptScoreEntity.setYearId(yearId);
deptScoreEntity.setMonthId(formDTO.getMonthId());
deptScoreEntity.setScore(governAblityScore);
deptScoreDao.deleteByDeptIdAndMonthId(formDTO.getCustomerId(),formDTO.getMonthId(),deptId);
deptScoreDao.insert(deptScoreEntity);
});
}

6
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml

@ -98,4 +98,10 @@
AND MONTH_ID = #{monthId}
ORDER BY DEPT_ID
</select>
<delete id="deleteByDeptIdAndMonthId" parameterType="map">
delete from fact_index_dept_score where CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
and DEPT_ID=#{deptId}
</delete>
</mapper>

Loading…
Cancel
Save