Commit 61706f28 by huluobin

定时任务

parent 386c4f57
...@@ -375,7 +375,7 @@ public class Schedule { ...@@ -375,7 +375,7 @@ public class Schedule {
headers.setContentType(MediaType.APPLICATION_JSON); headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<GetTechnicianPageRequest> allHttpEntity = new HttpEntity<>(allRequest, headers); HttpEntity<GetTechnicianPageRequest> allHttpEntity = new HttpEntity<>(allRequest, headers);
AdminTechnicianScore monthAdminResult = restTemplate.exchange(gogirlProperties.getAdminBackendUrl(), HttpMethod.POST, allHttpEntity, responseBodyType) AdminTechnicianScore allAdminResult = restTemplate.exchange(gogirlProperties.getAdminBackendUrl(), HttpMethod.POST, allHttpEntity, responseBodyType)
.getBody() .getBody()
.getData() .getData()
.getItems() .getItems()
...@@ -394,9 +394,10 @@ public class Schedule { ...@@ -394,9 +394,10 @@ public class Schedule {
.technician_id(storeTechnician.getId()) .technician_id(storeTechnician.getId())
.build(); .build();
HttpEntity<GetTechnicianPageRequest> monthHttpEntity = new HttpEntity<>(monthRequest, headers); HttpEntity<GetTechnicianPageRequest> monthHttpEntity = new HttpEntity<>(monthRequest, headers);
log.debug(JsonUtilByJackson.writeValueAsString(monthRequest)); log.debug(JsonUtilByJackson.writeValueAsString(monthRequest));
AdminTechnicianScore allAdminResult = restTemplate.exchange(gogirlProperties.getAdminBackendUrl(), HttpMethod.POST, monthHttpEntity, responseBodyType) AdminTechnicianScore monthAdminResult = restTemplate.exchange(gogirlProperties.getAdminBackendUrl(), HttpMethod.POST, monthHttpEntity, responseBodyType)
.getBody() .getBody()
.getData() .getData()
.getItems() .getItems()
...@@ -462,8 +463,10 @@ public class Schedule { ...@@ -462,8 +463,10 @@ public class Schedule {
career.setTotalBalanceCardNum(allAdminResult.getCard_count()); career.setTotalBalanceCardNum(allAdminResult.getCard_count());
//总信息录入完整度 //总信息录入完整度
career.setTotalInfoPercent(allAdminResult.getAvg_data_integrity().divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP)); BigDecimal totalInfoPercent = allAdminResult.getAvg_data_integrity();
if (totalInfoPercent != null) {
career.setTotalInfoPercent(totalInfoPercent.divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP));
}
//总订单数 //总订单数
Integer totalOrderNum = careerMapper.queryTotalOrderNum(storeTechnician.getId(), month); Integer totalOrderNum = careerMapper.queryTotalOrderNum(storeTechnician.getId(), month);
career.setTotalOrderNum(totalOrderNum); career.setTotalOrderNum(totalOrderNum);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment