Commit 23c8954d authored by wujiang's avatar wujiang

提交代码

parent fd189a5a
package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class WebConstuctionData {
WebConstuctionDataBaseInfo webConstuctionDataBaseInfo;
WebConstuctionDataAttachment webConstuctionDataAttachment;
}
package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class WebConstuctionDataAttachment {
private boolean commitFlow=false;
/**
* 施工交底文件
*/
@ApiModelProperty(value = "施工交底文件",example = "[{\"name\":\"35682590685bc1d3070b0f1edcaa78d9.jpg\",\"uid\":\"0.nu47zux2f18\",\"url\":\"/upload/common/E7C55206888E0FEA5D07DF59E1691C9.jpg\"},{\"name\":\"d9a2093b757caf8cfbb9103401df9ee0.jpg\",\"uid\":\"0.qk7gluancl\",\"url\":\"/upload/common/7F5B877186E249CAF304C4D39F0D714.jpg\"},{\"name\":\"be48e3c3cc880ecdba702d0f1d9d589e.jpg\",\"uid\":\"0.cxpgakflm1\",\"url\":\"/upload/common/46FA51DB93B635638EA0AE558C34B7C4.jpg\"},{\"name\":\"f86a00acf9eac24bfbd8f6505d291c72.jpg\",\"uid\":\"0.cqdud7vc70h\",\"url\":\"/upload/common/D1998D14846048FC29D153DA25878330.jpg\"}]")
private List<Object> constructionInstructionsFile;
/**
* 劳动防护用品配置
*/
private List<Object> laborProtectionEquipmentConfig;
/**
* 施工前安全措施保障视频
*/
@ApiModelProperty(value = "施工前安全措施保障视频",example = "[{\"name\":\"2403071507122955.mp4\",\"uid\":\"0.kfwq7b1jbpc\",\"url\":\"/upload/common/82C127CD32DD56BF7D8DC197DB7C7E.mp4\"}]")
private List<Object> safetyPrecautionVideo;
/**
* 支架整体图一
*/
@ApiModelProperty(value = "支架整体图一",example = "[{\"name\":\"182c7f9289a72430a19e89836fece049.jpg\",\"uid\":\"0.8de25dwiqb\",\"url\":\"/upload/common/3B8CA83F9F1E5CA926AE6B9AC7DD176.jpg\"}]")
private List<Object> bracketOverallPlan1;
/**
* 支架整体图二
*/
@ApiModelProperty(value = "支架整体图二",example = "[{\"name\":\"182c7f9289a72430a19e89836fece049.jpg\",\"uid\":\"0.8de25dwiqb\",\"url\":\"/upload/common/3B8CA83F9F1E5CA926AE6B9AC7DD176.jpg\"}]")
private List<Object> bracketOverallPlan2;
/**
* 方阵倾角测试照片/规模
*/
@ApiModelProperty(value = "方阵倾角测试照片/规模",example = "[{\"name\":\"5359e969804638598acc71d82f344286.jpg\",\"uid\":\"0.6on68id4rk\",\"url\":\"/upload/common/EA5B974F774C3A5A836AC2BB4FD2A87.jpg\"}]")
private List<Object> arrayInclinationTestPhoto;
/**
* 方阵整体图一(全景)
*/
@ApiModelProperty(value = "方阵整体图一(全景)",example = "[{\"name\":\"c27720dab1624013cb7ed3e52b31fff3.jpg\",\"uid\":\"0.7mse1xwty6c\",\"url\":\"/upload/common/F8EE592D3278690107C8CD33875FBE7.jpg\"}]")
private List<Object> arrayOverallPlan1;
/**
* 方阵整体图二
*/
@ApiModelProperty(value = "方阵整体图二",example = "[{\"name\":\"c27720dab1624013cb7ed3e52b31fff3.jpg\",\"uid\":\"0.7mse1xwty6c\",\"url\":\"/upload/common/F8EE592D3278690107C8CD33875FBE7.jpg\"}]")
private List<Object> arrayOverallPlan2;
/**
* 方阵整体图三
*/
@ApiModelProperty(value = "方阵整体图三",example = "[{\"name\":\"c27720dab1624013cb7ed3e52b31fff3.jpg\",\"uid\":\"0.7mse1xwty6c\",\"url\":\"/upload/common/F8EE592D3278690107C8CD33875FBE7.jpg\"}]")
private List<Object> arrayOverallPlan3;
/**
* 逆变器整体图
*/
@ApiModelProperty(value = "逆变器整体图",example = "[{\"name\":\"b277fdde15da1478450fdc6c168cb56a.jpg\",\"uid\":\"0.f46bz1prpn5\",\"url\":\"/upload/common/8E9562C6E61A12C58A14D3288374A0.jpg\"}]")
private List<Object> inverterOverallPlan;
/**
* 光伏电缆走线
*/
@ApiModelProperty(value = "光伏电缆走线",example = "[{\"name\":\"d1158e4bd623995c451b9b6fa779b7b9.jpg\",\"uid\":\"0.bitdz79qbw7\",\"url\":\"/upload/common/125472671AC65CA8341C8395E8D8FEE.jpg\"}]")
private List<Object> photovoltaicCableRouting;
/**
* 电表箱外部整体
*/
@ApiModelProperty(value = "电表箱外部整体",example = "[{\"name\":\"8eebc5d476b7075425352ee4892058ea.jpg\",\"uid\":\"0.w0pznt9agdh\",\"url\":\"/upload/common/544837A5928C8E58EB1EB2838E73FBFE.jpg\"}]")
private List<Object> electricityMeterBoxExterior;
/**
* 电表箱内部整体
*/
@ApiModelProperty(value = "电表箱内部整体",example = "[{\"name\":\"8eebc5d476b7075425352ee4892058ea.jpg\",\"uid\":\"0.w0pznt9agdh\",\"url\":\"/upload/common/544837A5928C8E58EB1EB2838E73FBFE.jpg\"}]")
private List<Object> electricityMeterBoxInterior;
/**
* 支架接地
*/
@ApiModelProperty(value = "支架接地",example = "[{\"name\":\"8eebc5d476b7075425352ee4892058ea.jpg\",\"uid\":\"0.w0pznt9agdh\",\"url\":\"/upload/common/544837A5928C8E58EB1EB2838E73FBFE.jpg\"}]")
private List<Object> bracketGrounding;
/**
* 接地点
*/
@ApiModelProperty(value = "接地点",example = "[{\"name\":\"8eebc5d476b7075425352ee4892058ea.jpg\",\"uid\":\"0.w0pznt9agdh\",\"url\":\"/upload/common/544837A5928C8E58EB1EB2838E73FBFE.jpg\"}]")
private List<Object> groundingPoint;
/**
* 交流电缆走线
*/
@ApiModelProperty(value = "交流电缆走线",example = "[{\"name\":\"8eebc5d476b7075425352ee4892058ea.jpg\",\"uid\":\"0.w0pznt9agdh\",\"url\":\"/upload/common/544837A5928C8E58EB1EB2838E73FBFE.jpg\"}]")
private List<Object> acCableRouting;
/**
* 其他照片
*/
@ApiModelProperty(value = "其他照片",example = "[{\"name\":\"e7be720d8cd97c609f4b9b82d0976524.jpg\",\"uid\":\"0.bwed0a07wnm\",\"url\":\"/upload/common/3ED77B2E563E818936F1F94564BE8370.jpg\"}]")
private List<Object> otherPhotos;
/**
* 备案附件
*/
@ApiModelProperty(value = "备案附件",example = "[{\"uid\":\"0.j2bqoj7b1wm\",\"name\":\"淋山河镇河湾村 陈支援.pdf\",\"url\":\"/upload/common/9E99A7F7D86D34D6AAFEFE821AB61EA8.pdf\"}]")
private List<Object> archiveAttachments;
}
...@@ -217,7 +217,6 @@ public class PowerStationConstructionData extends BaseEntity { ...@@ -217,7 +217,6 @@ public class PowerStationConstructionData extends BaseEntity {
private boolean commitFlow; private boolean commitFlow;
/** /**
* 片区整改单 * 片区整改单
*/ */
......
...@@ -490,4 +490,26 @@ public class WorkOrderController extends BaseController { ...@@ -490,4 +490,26 @@ public class WorkOrderController extends BaseController {
} }
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping (value = "/addOrUpdateByWeb")
@ApiOperation(httpMethod = "POST",value = "施工信息添加或者修改", notes = "施工信息添加或者修改")
public ResponseModel<WebConstuctionData> addOrUpdate(HttpServletRequest request, @RequestBody WebConstuctionData webConstuctionData)
{
try {
return ResponseHelper.buildResponse( workOrderServiceImpl.addOrUpdateWeb(webConstuctionData));
} catch (Exception e){
exceptionLogService.addLog("施工信息添加或者修改", JSON.toJSONString(webConstuctionData),e,request);
return exceptionLogService.errorResponseModel(null,request,e);
}
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping (value = "/getWebConstuctionData")
@ApiOperation(httpMethod = "GET",value = "施工信息添加或者修改", notes = "施工信息添加或者修改")
public ResponseModel<WebConstuctionData> getWebConstuctionData(HttpServletRequest request, @RequestParam(value = "sequenceNbr")Long sequenceNbr)
{
return ResponseHelper.buildResponse( workOrderServiceImpl.getWebConstuctionData(sequenceNbr));
}
} }
...@@ -427,8 +427,6 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W ...@@ -427,8 +427,6 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
// 如果不是提交进行单独保存 // 如果不是提交进行单独保存
if (powerStationConstructionData.isCommitFlow()) { if (powerStationConstructionData.isCommitFlow()) {
// if(powerStationConstructionData.getSequenceNbr()!=null){ // if(powerStationConstructionData.getSequenceNbr()!=null){
// 修改施工电站状态 // 修改施工电站状态
LambdaUpdateWrapper<WorkOrderPowerStation> up = new LambdaUpdateWrapper(); LambdaUpdateWrapper<WorkOrderPowerStation> up = new LambdaUpdateWrapper();
up.eq(WorkOrderPowerStation::getSequenceNbr, powerStationConstructionData.getWorkOrderPowerStationId()); up.eq(WorkOrderPowerStation::getSequenceNbr, powerStationConstructionData.getWorkOrderPowerStationId());
...@@ -1948,7 +1946,98 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W ...@@ -1948,7 +1946,98 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
} }
} }
return surveyInfoAllDto; return surveyInfoAllDto;
} }
public WebConstuctionData addOrUpdateWeb(WebConstuctionData webConstuctionData)
{
PowerStationConstructionData powerStationConstructionData = new PowerStationConstructionData();
powerStationConstructionData.setCommitFlow(webConstuctionData.getWebConstuctionDataAttachment().isCommitFlow());
powerStationConstructionData.setConstructionInstructionsFile(webConstuctionData.getWebConstuctionDataAttachment().getConstructionInstructionsFile());
powerStationConstructionData.setLaborProtectionEquipmentConfig(webConstuctionData.getWebConstuctionDataAttachment().getLaborProtectionEquipmentConfig());
powerStationConstructionData.setSafetyPrecautionVideo(webConstuctionData.getWebConstuctionDataAttachment().getSafetyPrecautionVideo());
powerStationConstructionData.setBracketOverallPlan1(webConstuctionData.getWebConstuctionDataAttachment().getBracketOverallPlan1());
powerStationConstructionData.setBracketOverallPlan2(webConstuctionData.getWebConstuctionDataAttachment().getBracketOverallPlan2());
powerStationConstructionData.setArrayInclinationTestPhoto(webConstuctionData.getWebConstuctionDataAttachment().getArrayInclinationTestPhoto());
powerStationConstructionData.setArrayOverallPlan1(webConstuctionData.getWebConstuctionDataAttachment().getArrayOverallPlan1());
powerStationConstructionData.setArrayOverallPlan2(webConstuctionData.getWebConstuctionDataAttachment().getArrayOverallPlan2());
powerStationConstructionData.setArrayOverallPlan3(webConstuctionData.getWebConstuctionDataAttachment().getArrayOverallPlan3());
powerStationConstructionData.setInverterOverallPlan(webConstuctionData.getWebConstuctionDataAttachment().getInverterOverallPlan());
powerStationConstructionData.setPhotovoltaicCableRouting(webConstuctionData.getWebConstuctionDataAttachment().getPhotovoltaicCableRouting());
powerStationConstructionData.setElectricityMeterBoxExterior(webConstuctionData.getWebConstuctionDataAttachment().getElectricityMeterBoxExterior());
powerStationConstructionData.setElectricityMeterBoxInterior(webConstuctionData.getWebConstuctionDataAttachment().getElectricityMeterBoxInterior());
powerStationConstructionData.setBracketGrounding(webConstuctionData.getWebConstuctionDataAttachment().getBracketGrounding());
powerStationConstructionData.setGroundingPoint(webConstuctionData.getWebConstuctionDataAttachment().getGroundingPoint());
powerStationConstructionData.setAcCableRouting(webConstuctionData.getWebConstuctionDataAttachment().getAcCableRouting());
powerStationConstructionData.setOtherPhotos(webConstuctionData.getWebConstuctionDataAttachment().getOtherPhotos());
powerStationConstructionData.setArchiveAttachments(webConstuctionData.getWebConstuctionDataAttachment().getArchiveAttachments());
powerStationConstructionData.setWorkOrderId(webConstuctionData.getWebConstuctionDataBaseInfo().getWorkOrderId());
powerStationConstructionData.setWorkOrderPowerStationId(webConstuctionData.getWebConstuctionDataBaseInfo().getWorkOrderPowerStationId());
powerStationConstructionData.setInstallerInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getInstallerInfo());
powerStationConstructionData.setConstructionComponentInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionComponentInfo());
powerStationConstructionData.setConstructionInverterInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionInverterInfo());
powerStationConstructionData.setConstructionCollectorBoxInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionCollectorBoxInfo());
powerStationConstructionData.setConstructionGridBoxInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionGridBoxInfo());
this.addOrUpdate(powerStationConstructionData);
return webConstuctionData;
}
public WebConstuctionData getWebConstuctionData(Long sequenceNbr)
{
WebConstuctionData webConstuctionData = new WebConstuctionData();
PeasantHousehold peasantHousehold = peasantHouseholdMapper.selectById(sequenceNbr);
if(peasantHousehold==null)
{
return null;
}
WebConstuctionDataBaseInfo webConstuctionDataBaseInfo = new WebConstuctionDataBaseInfo();
webConstuctionDataBaseInfo.setOwnerName(peasantHousehold.getOwnersName());
webConstuctionDataBaseInfo.setTelephone(peasantHousehold.getTelephone());
webConstuctionDataBaseInfo.setProjectAddressName(peasantHousehold.getProjectAddressName());
webConstuctionDataBaseInfo.setProjectAddressDetail(peasantHousehold.getProjectAddressDetail());
webConstuctionData.setWebConstuctionDataBaseInfo(webConstuctionDataBaseInfo);
WorkOrderPowerStation workOrderPowerStation = workOrderPowerStationServiceImpl.getOne(new LambdaQueryWrapper<WorkOrderPowerStation>().eq(WorkOrderPowerStation::getPeasantHouseholdId,sequenceNbr));
if(workOrderPowerStation!=null)
{
//查询施工信息
LambdaQueryWrapper<PowerStationConstructionData> up=new LambdaQueryWrapper<>();
up.eq(PowerStationConstructionData::getWorkOrderId,workOrderPowerStation.getWorkOrderId());
up.eq(PowerStationConstructionData::getWorkOrderPowerStationId,workOrderPowerStation.getSequenceNbr());
PowerStationConstructionData powerStationConstructionData= powerStationConstructionDataMapper.selectOne(up);
if(powerStationConstructionData!=null)
{
WebConstuctionDataAttachment webConstuctionDataAttachment = new WebConstuctionDataAttachment();
webConstuctionData.setWebConstuctionDataAttachment(webConstuctionDataAttachment);
webConstuctionData.getWebConstuctionDataAttachment().setConstructionInstructionsFile(powerStationConstructionData.getConstructionInstructionsFile());
webConstuctionData.getWebConstuctionDataAttachment().setLaborProtectionEquipmentConfig(powerStationConstructionData.getLaborProtectionEquipmentConfig());
webConstuctionData.getWebConstuctionDataAttachment().setSafetyPrecautionVideo(powerStationConstructionData.getSafetyPrecautionVideo());
webConstuctionData.getWebConstuctionDataAttachment().setBracketOverallPlan1(powerStationConstructionData.getBracketOverallPlan1());
webConstuctionData.getWebConstuctionDataAttachment().setBracketOverallPlan2(powerStationConstructionData.getBracketOverallPlan2());
webConstuctionData.getWebConstuctionDataAttachment().setArrayInclinationTestPhoto(powerStationConstructionData.getArrayInclinationTestPhoto());
webConstuctionData.getWebConstuctionDataAttachment().setArrayOverallPlan1(powerStationConstructionData.getArrayOverallPlan1());
webConstuctionData.getWebConstuctionDataAttachment().setArrayOverallPlan2(powerStationConstructionData.getArrayOverallPlan2());
webConstuctionData.getWebConstuctionDataAttachment().setArrayOverallPlan3(powerStationConstructionData.getArrayOverallPlan3());
webConstuctionData.getWebConstuctionDataAttachment().setInverterOverallPlan(powerStationConstructionData.getInverterOverallPlan());
webConstuctionData.getWebConstuctionDataAttachment().setPhotovoltaicCableRouting(powerStationConstructionData.getPhotovoltaicCableRouting());
webConstuctionData.getWebConstuctionDataAttachment().setElectricityMeterBoxExterior(powerStationConstructionData.getElectricityMeterBoxExterior());
webConstuctionData.getWebConstuctionDataAttachment().setElectricityMeterBoxInterior(powerStationConstructionData.getElectricityMeterBoxInterior());
webConstuctionData.getWebConstuctionDataAttachment().setBracketGrounding(powerStationConstructionData.getBracketGrounding());
webConstuctionData.getWebConstuctionDataAttachment().setGroundingPoint(powerStationConstructionData.getGroundingPoint());
webConstuctionData.getWebConstuctionDataAttachment().setAcCableRouting(powerStationConstructionData.getAcCableRouting());
webConstuctionData.getWebConstuctionDataAttachment().setOtherPhotos(powerStationConstructionData.getOtherPhotos());
webConstuctionData.getWebConstuctionDataAttachment().setArchiveAttachments(powerStationConstructionData.getArchiveAttachments());
webConstuctionData.getWebConstuctionDataBaseInfo().setWorkOrderId(powerStationConstructionData.getWorkOrderId());
webConstuctionData.getWebConstuctionDataBaseInfo().setWorkOrderPowerStationId(powerStationConstructionData.getWorkOrderPowerStationId());
webConstuctionData.getWebConstuctionDataBaseInfo().setInstallerInfo(powerStationConstructionData.getInstallerInfo());
webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionComponentInfo(powerStationConstructionData.getConstructionComponentInfo());
webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionInverterInfo(powerStationConstructionData.getConstructionInverterInfo());
webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionCollectorBoxInfo(powerStationConstructionData.getConstructionCollectorBoxInfo());
webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionGridBoxInfo(powerStationConstructionData.getConstructionGridBoxInfo());
}
}
return webConstuctionData;
}
} }
\ 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