Browse Source

部署report,stits

dev_shibei_match
jianjun 5 years ago
parent
commit
a84eed60c4
  1. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java
  2. 20
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
  3. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  4. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java
  5. 6
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java

@ -27,4 +27,9 @@ public class MonthPieChartResultDTO implements Serializable {
* 治理能力 * 治理能力
*/ */
private Double governAbility = 0.0; private Double governAbility = 0.0;
/**
* 月份Id
*/
private String monthId;
} }

20
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java

@ -71,22 +71,22 @@ public class IndexServiceImpl implements IndexService {
@Override @Override
public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) { public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) {
MonthPieChartResultDTO pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),null); MonthPieChartResultDTO pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(), null);
if (null == pieChartDTO){ String monthId = dateUtils.getCurrentMonthId();
int time = NumConstant.TWELVE;
//保证获取月度指数数据的最大可能性
while ((null == pieChartDTO || StringUtils.isBlank(pieChartDTO.getMonthId())) && time > NumConstant.ONE) {
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null, monthId);
pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(), monthId);
}
if (null == pieChartDTO) {
return new MonthPieChartResultDTO(); return new MonthPieChartResultDTO();
} }
// 处理小数四舍五入 // 处理小数四舍五入
pieChartDTO.setPartyDevAbility(getRound(pieChartDTO.getPartyDevAbility())); pieChartDTO.setPartyDevAbility(getRound(pieChartDTO.getPartyDevAbility()));
pieChartDTO.setGovernAbility(getRound(pieChartDTO.getGovernAbility())); pieChartDTO.setGovernAbility(getRound(pieChartDTO.getGovernAbility()));
pieChartDTO.setServiceAbility(getRound(pieChartDTO.getServiceAbility())); pieChartDTO.setServiceAbility(getRound(pieChartDTO.getServiceAbility()));
String monthId = dateUtils.getCurrentMonthId();
int time = NumConstant.TWELVE;
//保证获取月度指数数据的最大可能性
while(null == pieChartDTO && time > NumConstant.ONE){
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null,monthId);
pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),monthId);
}
return pieChartDTO; return pieChartDTO;
} }

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

@ -8,7 +8,8 @@
SELECT SELECT
service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility, service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility,
party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility, party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility,
govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility,
MONTH_ID
FROM FROM
screen_index_data_monthly screen_index_data_monthly
WHERE WHERE

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

@ -86,7 +86,10 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
Map<String, CpcScoreEntity> cpcScoreTotalMap = new HashMap<>(); Map<String, CpcScoreEntity> cpcScoreTotalMap = new HashMap<>();
Map<String, AtomicInteger> userTotalCount = new HashMap<>(); Map<String, AtomicInteger> userTotalCount = new HashMap<>();
//删除总分 然后插入 //删除总分 然后插入
cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); int effectRow;
do {
effectRow = cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR);
} while (effectRow > NumConstant.ZERO);
do { do {
List<CpcScoreEntity> result = new ArrayList<>(); List<CpcScoreEntity> result = new ArrayList<>();
//获取数据 //获取数据

6
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java

@ -75,13 +75,13 @@ public class ExtAppJwtTokenUtils {
public static void genToken() { public static void genToken() {
HashMap<String, Object> claim = new HashMap<>(); HashMap<String, Object> claim = new HashMap<>();
claim.put("appId", "2c448b7da527055fbeebb628f8d3dcb0"); claim.put("appId", "acc4ad66c82a7b46e741364b4c62dce2");
claim.put("customerId", "c1"); claim.put("customerId", "b09527201c4409e19d1dbc5e3c3429a1");
long ts = System.currentTimeMillis() - 1000 * 60 * 4; long ts = System.currentTimeMillis() - 1000 * 60 * 4;
System.out.println("时间戳:" + ts); System.out.println("时间戳:" + ts);
claim.put("ts", ts); claim.put("ts", ts);
String abc = new ExtAppJwtTokenUtils().createToken(claim, "d4b73db4cf8e46ef99fa1f95149c2791ef2396fded114dd09e406cbce83fc88a"); String abc = new ExtAppJwtTokenUtils().createToken(claim, "612d304095c50369c3ef06e490f05779eeb8f19ff16566c73aeafafc5fa01970");
System.out.println(abc); System.out.println(abc);
} }

Loading…
Cancel
Save