|
@@ -4,6 +4,7 @@ import com.persagy.apm.common.response.ApmResponseUpsertVO;
|
|
|
import com.persagy.apm.common.response.CommonResult;
|
|
|
import com.persagy.apm.common.response.PageList;
|
|
|
import com.persagy.apm.common.utils.ResultHelper;
|
|
|
+import com.persagy.apm.energy.report.common.DataConstants;
|
|
|
import com.persagy.apm.energy.report.manualfilling.model.dto.QueryEnergyItemDataDTO;
|
|
|
import com.persagy.apm.energy.report.manualfilling.model.dto.SaveEnergyItemDataDTO;
|
|
|
import com.persagy.apm.energy.report.manualfilling.model.vo.EnergyItemInfoVo;
|
|
@@ -31,8 +32,8 @@ public class ManualFillingController {
|
|
|
@ApiOperation(value = "查询报告能耗分项列表")
|
|
|
@PostMapping("/query")
|
|
|
public CommonResult<PageList<EnergyItemInfoVo>> queryEnergyItemDataList(
|
|
|
- @Valid @RequestBody QueryEnergyItemDataDTO queryEnergyItemDataDTO, @RequestParam(value = "userId", defaultValue = "systemId") String userId,
|
|
|
- @RequestParam(value = "loginDevice", defaultValue = "PC") String loginDevice, @RequestParam(value = "pd", defaultValue = "123") String pd) {
|
|
|
+ @Valid @RequestBody QueryEnergyItemDataDTO queryEnergyItemDataDTO, @RequestParam(value = "userId", defaultValue = DataConstants.USER_ID) String userId,
|
|
|
+ @RequestParam(value = "loginDevice", defaultValue = DataConstants.LOGIN_DEVICE) String loginDevice, @RequestParam(value = "pd", defaultValue = DataConstants.PD) String pd) {
|
|
|
List<EnergyItemInfoVo> energyItemInfoVoList = iEnergyItemDataService.queryEnergyItemDataList(queryEnergyItemDataDTO);
|
|
|
return ResultHelper.multi(energyItemInfoVoList);
|
|
|
}
|
|
@@ -40,8 +41,8 @@ public class ManualFillingController {
|
|
|
@ApiOperation(value = "保存能耗分项数值")
|
|
|
@PostMapping("/save")
|
|
|
public CommonResult<ApmResponseUpsertVO> updateReportBusinessDetail(
|
|
|
- @Valid @RequestBody SaveEnergyItemDataDTO saveEnergyItemDataDTO, @RequestParam(value = "userId", defaultValue = "systemId") String userId,
|
|
|
- @RequestParam(value = "loginDevice", defaultValue = "PC") String loginDevice, @RequestParam(value = "pd", defaultValue = "123") String pd) {
|
|
|
+ @Valid @RequestBody SaveEnergyItemDataDTO saveEnergyItemDataDTO, @RequestParam(value = "userId", defaultValue = DataConstants.USER_ID) String userId,
|
|
|
+ @RequestParam(value = "loginDevice", defaultValue = DataConstants.LOGIN_DEVICE) String loginDevice, @RequestParam(value = "pd", defaultValue = DataConstants.PD) String pd) {
|
|
|
iEnergyItemDataService.saveEnergyItemData(saveEnergyItemDataDTO);
|
|
|
return ResultHelper.single(new ApmResponseUpsertVO());
|
|
|
}
|