Browse Source

Merge remote-tracking branch 'origin/dev_pyscreen' into dev_temp

master
yinzuomei 5 years ago
parent
commit
ade3e4668c
  1. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java
  2. 7
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java

@ -50,7 +50,7 @@ public class WorkRecordTrendResultDTO implements Serializable {
* 各项资源对应某一月份数据
*/
@JsonIgnore
private Integer value;
private Integer value = 0;
}
}

7
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java

@ -1,5 +1,6 @@
package com.epmet.datareport.controller.plugins;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgDailyService;
@ -50,6 +51,12 @@ public class WorkRecordController {
public Result<WorkRecordTrendResultDTO> trend(@RequestHeader("CustomerId")String customerId, @RequestBody WorkRecordTrendFormDTO formDTO){
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
if(!"party".equals(formDTO.getDataType())&&!"union".equals(formDTO.getDataType())){
throw new RenException("入参dataType值错误,可选值:party--支部建设; union--联建共建");
}
if(!"organize".equals(formDTO.getType())&&!"joinuser".equals(formDTO.getType())&&!"avguser".equals(formDTO.getType())){
throw new RenException("入参type值错误,可选值:组织次数--organize;参与人数--joinuser;平均参与人数--avguser");
}
return new Result<WorkRecordTrendResultDTO>().ok(screenWorkRecordOrgDailyService.trend(formDTO));
}

Loading…
Cancel
Save