Commit 7a4d88b9 authored by hezhuozhi's avatar hezhuozhi

编辑详情

parent 69ea0b27
......@@ -58,4 +58,6 @@ public class PowerStationEngineeringInfoAllDto {
//派工单信息
WorkOrder workOrder;
//保存标识 0 保存 1保存并提交
Integer commitFlag;
}
......@@ -317,6 +317,13 @@ public class WorkOrderController extends BaseController {
return ResponseHelper.buildResponse(returnDto);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST",value = "更新详情信息", notes = "更新详情信息")
@PostMapping(value = "/updateDetail")
public ResponseModel updateDetail(@RequestBody PowerStationEngineeringInfoAllDto powerStationEngineeringInfoAllDto) {
workOrderServiceImpl.updateDetail(powerStationEngineeringInfoAllDto,getUserId());
return ResponseHelper.buildResponse(null);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -1331,4 +1331,37 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
}
@Transactional(rollbackFor = Exception.class)
public void updateDetail(PowerStationEngineeringInfoAllDto powerStationEngineeringInfoAllDto,String userId) {
//更新工程
PowerStationEngineeringInfo powerStationEngineeringInfo = powerStationEngineeringInfoAllDto.getPowerStationEngineeringInfo();
if(Objects.nonNull(powerStationEngineeringInfo)){
powerStationEngineeringInfoMapper.updateById(powerStationEngineeringInfo);
}
//更新施工信息
PowerStationConstructionData powerStationConstructionData = powerStationEngineeringInfoAllDto.getPowerStationConstructionData();
if(Objects.nonNull(powerStationConstructionData)){
powerStationConstructionDataMapper.updateById(powerStationConstructionData);
}
//更新并网信息
HygfOnGrid hygfOnGrid = powerStationEngineeringInfoAllDto.getHygfOnGrid();
if(Objects.nonNull(hygfOnGrid)){
hygfOnGridMapper.updateById(hygfOnGrid);
}
//更新设计信息
DesignInformationDto designInformation = powerStationEngineeringInfoAllDto.getDesignInformation();
if(Objects.nonNull(designInformation)){
designInformationService.updateWithModel(designInformation);
}
//更新商务信息
CommercialDto commercial = powerStationEngineeringInfoAllDto.getCommercial();
if(Objects.nonNull(commercial)){
commercialService.updateWithModel(commercial);
}
//提交
if(powerStationEngineeringInfoAllDto.getCommitFlag() == 1 && Objects.nonNull(hygfOnGrid)){
basicGridAcceptanceService.saveAndCommit(hygfOnGrid,userId);
}
}
}
\ No newline at end of file
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