|
@ -36,6 +36,7 @@ import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
import java.text.NumberFormat; |
|
|
import java.text.NumberFormat; |
|
@ -135,7 +136,7 @@ public class ScreenPyHistoryScoreServiceImpl implements ScreenPyHistoryScoreServ |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到相关信息", "未查到相关信息"); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到相关信息", "未查到相关信息"); |
|
|
} |
|
|
} |
|
|
entity.setDelFlag("1"); |
|
|
entity.setDelFlag("1"); |
|
|
screenPyHistoryScoreDao.updateById(entity); |
|
|
screenPyHistoryScoreDao.deleteById(entity); |
|
|
screenPyHistoryScoreDetailDao.delByHistoryScoreId(formDTO.getId(), formDTO.getUserId()); |
|
|
screenPyHistoryScoreDetailDao.delByHistoryScoreId(formDTO.getId(), formDTO.getUserId()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -179,9 +180,11 @@ public class ScreenPyHistoryScoreServiceImpl implements ScreenPyHistoryScoreServ |
|
|
if (!result.success() || result.getData() == null) { |
|
|
if (!result.success() || result.getData() == null) { |
|
|
throw new RenException("统计街道下网格活跃度数据失败"); |
|
|
throw new RenException("统计街道下网格活跃度数据失败"); |
|
|
} |
|
|
} |
|
|
GridLivelyResultDTO gridLively = result.getData().get(NumConstant.ZERO); |
|
|
if (!CollectionUtils.isEmpty(result.getData())) { |
|
|
String score = (gridLively.getGridSumNum() <= 0) ? "0" : numberFormat.format(((float) gridLively.getGridLivelyNum() / (float) gridLively.getGridSumNum()) * 100 + (gridLively.getGridOrdinaryNum() / gridLively.getGridSumNum()) * 80); |
|
|
GridLivelyResultDTO gridLively = result.getData().get(NumConstant.ZERO); |
|
|
resultDTO.setScore(score); |
|
|
String score = (gridLively.getGridSumNum() <= 0) ? "0" : numberFormat.format(((float) gridLively.getGridLivelyNum() / (float) gridLively.getGridSumNum()) * 100 + (gridLively.getGridOrdinaryNum() / gridLively.getGridSumNum()) * 80); |
|
|
|
|
|
resultDTO.setScore(score); |
|
|
|
|
|
} |
|
|
} else if ("event".equals(formDTO.getType())) { |
|
|
} else if ("event".equals(formDTO.getType())) { |
|
|
/** |
|
|
/** |
|
|
* 事件赋分= 街道下末级网格上报事件数量乘以对应的每项事件分值的累加和除以街道下有效未离职状态的网格员总数 |
|
|
* 事件赋分= 街道下末级网格上报事件数量乘以对应的每项事件分值的累加和除以街道下有效未离职状态的网格员总数 |
|
@ -199,5 +202,24 @@ public class ScreenPyHistoryScoreServiceImpl implements ScreenPyHistoryScoreServ |
|
|
return resultDTO; |
|
|
return resultDTO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 政法能力-历史得分-填完六个数后计算能力得分使用 |
|
|
|
|
|
* @param dto |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public HistoryScoreComputeResultDTO nldfScore(HistoryScoreFormDTO.Detail dto) { |
|
|
|
|
|
HistoryScoreComputeResultDTO resultDTO = new HistoryScoreComputeResultDTO(); |
|
|
|
|
|
resultDTO.setAgencyId(dto.getAgencyId()); |
|
|
|
|
|
ScreenPyWeightConfigurationDTO wcDTO = screenPyWeightConfigurationDao.selectOneDTO(); |
|
|
|
|
|
if (null != wcDTO) { |
|
|
|
|
|
BigDecimal nldf = dto.getWghyd().multiply(wcDTO.getWghyd()).add(dto.getWghyd().multiply(wcDTO.getWghyd())) |
|
|
|
|
|
.add(dto.getWghyd().multiply(wcDTO.getWghyd())).add(dto.getWghyd().multiply(wcDTO.getWghyd())) |
|
|
|
|
|
.add(dto.getWghyd().multiply(wcDTO.getWghyd())).add(dto.getWghyd().multiply(wcDTO.getWghyd())); |
|
|
|
|
|
resultDTO.setScore(nldf.toString()); |
|
|
|
|
|
} |
|
|
|
|
|
return resultDTO; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|