|
@@ -5,9 +5,11 @@ import com.bz.smart_city.commom.model.ResultStatus;
|
|
|
import com.bz.smart_city.dto.AreaDto;
|
|
|
import com.bz.smart_city.dto.CommunityDto;
|
|
|
import com.bz.smart_city.dto.DeviceTypeDto;
|
|
|
+import com.bz.smart_city.dto.pay.DeviceReplaceRecordDto;
|
|
|
import com.bz.smart_city.dto.pay.InstallPlanInputDTO;
|
|
|
import com.bz.smart_city.entity.Community;
|
|
|
import com.bz.smart_city.entity.WaterMeterReplaceLog;
|
|
|
+import com.bz.smart_city.service.pay.AmountWaterUsedAmountService;
|
|
|
import com.bz.smart_city.service.pay.PaySyncDataService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -29,6 +31,8 @@ public class PaySyncDataController {
|
|
|
|
|
|
@Autowired
|
|
|
private PaySyncDataService paySyncDataService;
|
|
|
+ @Autowired
|
|
|
+ private AmountWaterUsedAmountService amountWaterUsedAmountService;
|
|
|
|
|
|
@PostMapping("installPlan/addJF")
|
|
|
@PreAuthorize("hasAuthority('sys:installPlan:add')")
|
|
@@ -77,17 +81,28 @@ public class PaySyncDataController {
|
|
|
return paySyncDataService.queryWaterMeterType(parentId);
|
|
|
}
|
|
|
|
|
|
+// @PostMapping("/amount/synDeviceReplaceRecord")
|
|
|
+// @ApiOperation(value = "同步换表信息")
|
|
|
+// public AjaxMessage syncReplaceRecord(
|
|
|
+// @ApiParam(value = "同步换表信息", required = true) @RequestBody(required = true) WaterMeterReplaceLog waterMeterReplaceLog
|
|
|
+// ) {
|
|
|
+//
|
|
|
+// int result = paySyncDataService.addReplaceRecord(waterMeterReplaceLog);
|
|
|
+// if(result > 0)
|
|
|
+// return new AjaxMessage(ResultStatus.OK);
|
|
|
+// else
|
|
|
+// return new AjaxMessage(ResultStatus.ERROR);
|
|
|
+// }
|
|
|
+ //换表接口
|
|
|
+
|
|
|
+ @ResponseBody
|
|
|
@PostMapping("/amount/synDeviceReplaceRecord")
|
|
|
- @ApiOperation(value = "同步换表信息")
|
|
|
- public AjaxMessage syncReplaceRecord(
|
|
|
- @ApiParam(value = "同步换表信息", required = true) @RequestBody(required = true) WaterMeterReplaceLog waterMeterReplaceLog
|
|
|
- ) {
|
|
|
+ @ApiOperation(value = "换表记录同步接口")
|
|
|
+ public AjaxMessage synDeviceReplaceRecord(
|
|
|
+ @ApiParam(value = "换表记录")@RequestBody(required = true) DeviceReplaceRecordDto deviceReplaceRecordDto
|
|
|
+ ){
|
|
|
+ amountWaterUsedAmountService.saveDeviceReplaceRecord(deviceReplaceRecordDto);
|
|
|
|
|
|
- int result = paySyncDataService.addReplaceRecord(waterMeterReplaceLog);
|
|
|
- if(result > 0)
|
|
|
- return new AjaxMessage(ResultStatus.OK);
|
|
|
- else
|
|
|
- return new AjaxMessage(ResultStatus.ERROR);
|
|
|
+ return new AjaxMessage<>(ResultStatus.OK);
|
|
|
}
|
|
|
-
|
|
|
}
|