Browse Source

Merge remote-tracking branch 'origin/dev_data_fusion' into dev_point_task

dev_shibei_match
zxc 4 years ago
parent
commit
a009ed4919
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/IndexOriginExtractService.java
  2. 48
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java
  3. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java
  4. 7
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java
  5. 8
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/GroupPointController.java
  6. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/IndexOriginExtractService.java

@ -10,7 +10,7 @@ import com.epmet.dto.extract.form.ExtractIndexFormDTO;
*/
public interface IndexOriginExtractService {
/**
* desc从统计库对象抽取指标数据
* desc[]从统计库对象抽取指标数据
*
* @param formDTO
*/

48
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java

@ -75,7 +75,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal resolveCount = new BigDecimal(grid.getResolveProjectCount());
BigDecimal selfCount = new BigDecimal(grid.getSelfSolveProjectCount());
if (grid.getResolveProjectCount() != NumConstant.ZERO) {
entity.setGovernRatio(selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setGovernRatio(ratio);
}
}));
}
@ -87,7 +91,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResponseRatio(ratio);
}
}));
}
@ -138,7 +146,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResponseRatio(ratio);
}
}));
}
@ -149,7 +161,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setGovernRatio(ratio);
}
}));
}
@ -198,7 +214,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResponseRatio(ratio);
}
}));
}
@ -209,7 +229,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setGovernRatio(ratio);
}
}));
}
@ -258,7 +282,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResponseRatio(ratio);
}
}));
}
@ -269,7 +297,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setGovernRatio(ratio);
}
}));
}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java

@ -471,6 +471,12 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl<Sc
result.forEach(r -> {
r.setOrgType(level);
r.setDateId(dateId);
// 这么写的目的是:防止把孔村,锦水,榆山的 orgType 赋值成 区县级别
if (level.equals(ScreenConstant.DISTRICT)){
if (r.getOrgId().equals(PingYinConstant.KONG_CUN_AGENCY_ID) || r.getOrgId().equals(PingYinConstant.YU_SHAN_AGENCY_ID) || r.getOrgId().equals(PingYinConstant.JIN_SHUI_AGENCY_ID)){
r.setOrgType(ScreenConstant.STREET);
}
}
});
}
}

7
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java

@ -1,7 +1,9 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@ -12,6 +14,11 @@ import java.io.Serializable;
@Data
public class GroupPointFormDTO implements Serializable {
private static final long serialVersionUID = -3231073030413434313L;
public interface GroupPoint extends CustomerClientShowGroup {}
public interface GridRank extends CustomerClientShowGroup {}
@NotBlank(message = "小组Id不能为空", groups = {GroupPoint.class, GridRank.class})
private String groupId;
@NotBlank(message = "网格Id不能为空", groups = {GridRank.class})
private String gridId;
}

8
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/GroupPointController.java

@ -3,11 +3,12 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.GroupPointFormDTO;
import com.epmet.dto.result.GroupPointRuleResultDTO;
import com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO;
import com.epmet.dto.result.GroupPointRankingResultDTO;
import com.epmet.dto.result.GroupPointRuleResultDTO;
import com.epmet.dto.result.PointRankingResultDTO;
import com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO;
import com.epmet.service.BizPointTotalDetailService;
import com.epmet.service.BizPointUserTotalDetailService;
import com.epmet.service.PointRuleService;
@ -47,6 +48,7 @@ public class GroupPointController {
*/
@PostMapping("pointranking")
public Result<List<PointRankingResultDTO>> pointRanking(@LoginUser TokenDto tokenDto, @RequestBody GroupPointFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GroupPoint.class);
List<PointRankingResultDTO> list = bizPointUserTotalDetailService.pointRanking(tokenDto, formDTO);
return new Result<List<PointRankingResultDTO>>().ok(list);
}
@ -61,6 +63,7 @@ public class GroupPointController {
*/
@PostMapping("grouppointranking")
public Result<List<GroupPointRankingResultDTO>> groupPointRanking(@RequestBody GroupPointFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GridRank.class);
List<GroupPointRankingResultDTO> list = bizPointTotalDetailService.groupPointRanking(formDTO);
return new Result<List<GroupPointRankingResultDTO>>().ok(list);
}
@ -75,6 +78,7 @@ public class GroupPointController {
*/
@PostMapping("pointdetail")
public Result<GroupPointDetailResultDTO> pointDetail(@RequestBody GroupPointFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GroupPoint.class);
GroupPointDetailResultDTO result = bizPointTotalDetailService.pointDetail(formDTO);
return new Result<GroupPointDetailResultDTO>().ok(result);
}

2
epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml

@ -22,7 +22,7 @@
pr.STAFF_ID = #{userId}
</foreach>
)
ORDER BY pd.SERIAL_NUM DESC)t GROUP BY ID
GROUP BY pr.STAFF_ID ORDER BY pr.CREATED_TIME DESC)t
</select>
<!-- 巡查记录查询 -->

Loading…
Cancel
Save