Commit 7802642b authored by lisong's avatar lisong

修改bug

parent b0852bca
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.api.entity;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
......@@ -113,7 +114,7 @@ public class HouseholdPv extends BaseEntity {
/**
* 农户首页照片
*/
@TableField(value = "homepage_photo", typeHandler = FastjsonTypeHandler.class)
@TableField(value = "homepage_photo", typeHandler = FastjsonTypeHandler.class , updateStrategy = FieldStrategy.IGNORED)
private List<CommonFile> homepagePhoto;
/**
......
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.api.entity;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
......@@ -35,19 +36,19 @@ public class HouseholdPvContact extends BaseEntity {
/**
* 备案证号
*/
@TableField("number")
@TableField(value = "number", updateStrategy = FieldStrategy.IGNORED)
private String number;
/**
* 合同期限
*/
@TableField(value = "period", typeHandler = FastjsonTypeHandler.class)
@TableField(value = "period", typeHandler = FastjsonTypeHandler.class, updateStrategy = FieldStrategy.IGNORED)
private List<String> period;
/**
* 合同描述
*/
@TableField("description")
@TableField(value = "description", updateStrategy = FieldStrategy.IGNORED)
private String description;
/**
......@@ -78,13 +79,13 @@ public class HouseholdPvContact extends BaseEntity {
/**
* 发电户号
*/
@TableField("generation_number")
@TableField(value = "generation_number", updateStrategy = FieldStrategy.IGNORED)
private String generationNumber;
/**
* 购售电合同
*/
@TableField(value = "power_contract", typeHandler = FastjsonTypeHandler.class)
@TableField(value = "power_contract", typeHandler = FastjsonTypeHandler.class, updateStrategy = FieldStrategy.IGNORED)
private List<CommonFile> powerContract;
......
package com.yeejoin.amos.boot.module.jxiop.api.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
......@@ -39,37 +40,37 @@ public class HouseholdPvInstall extends BaseEntity {
/**
* 安装信息描述
*/
@TableField("description")
@TableField(value = "description", updateStrategy = FieldStrategy.IGNORED)
private String description;
/**
* 基础框架整体安装照片
*/
@TableField(value = "foundation_frame_photo", typeHandler = FastjsonTypeHandler.class)
@TableField(value = "foundation_frame_photo", typeHandler = FastjsonTypeHandler.class, updateStrategy = FieldStrategy.IGNORED)
private List<CommonFile> foundationFramePhoto;
/**
* 组件铭牌安装照片
*/
@TableField(value = "nameplate_photo", typeHandler = FastjsonTypeHandler.class)
@TableField(value = "nameplate_photo", typeHandler = FastjsonTypeHandler.class, updateStrategy = FieldStrategy.IGNORED)
private List<CommonFile> nameplatePhoto;
/**
* 配电箱、逆变器案场安装照片
*/
@TableField(value = "distribution_box_inverter_photo", typeHandler = FastjsonTypeHandler.class)
@TableField(value = "distribution_box_inverter_photo", typeHandler = FastjsonTypeHandler.class, updateStrategy = FieldStrategy.IGNORED)
private List<CommonFile> distributionBoxInverterPhoto;
/**
* 电表照片
*/
@TableField(value = "electricity_meter_photo", typeHandler = FastjsonTypeHandler.class)
@TableField(value = "electricity_meter_photo", typeHandler = FastjsonTypeHandler.class, updateStrategy = FieldStrategy.IGNORED)
private List<CommonFile> electricityMeterPhoto;
/**
* 其他照片
*/
@TableField(value = "other_photo", typeHandler = FastjsonTypeHandler.class)
@TableField(value = "other_photo", typeHandler = FastjsonTypeHandler.class, updateStrategy = FieldStrategy.IGNORED)
private List<CommonFile> otherPhoto;
/**
......
package com.yeejoin.amos.boot.module.jxiop.api.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
......@@ -31,37 +32,37 @@ public class HouseholdPvLease extends BaseEntity {
/**
* 安装地址
*/
@TableField("install_address")
@TableField(value = "install_address", updateStrategy = FieldStrategy.IGNORED)
private String installAddress;
/**
* 安装日期
*/
@TableField("install_date")
@TableField(value = "install_date", updateStrategy = FieldStrategy.IGNORED)
private Date installDate;
/**
* 预计功率(w)
*/
@TableField("estimated_power")
@TableField(value = "estimated_power", updateStrategy = FieldStrategy.IGNORED)
private String estimatedPower;
/**
* 组件单片功率(w)
*/
@TableField("monolithic_power")
@TableField(value = "monolithic_power", updateStrategy = FieldStrategy.IGNORED)
private Integer monolithicPower;
/**
* 共计安装数量(块)
*/
@TableField("install_count")
@TableField(value = "install_count", updateStrategy = FieldStrategy.IGNORED)
private Integer installCount;
/**
* 实际容量(w)
*/
@TableField("actual_capacity")
@TableField(value = "actual_capacity", updateStrategy = FieldStrategy.IGNORED)
private Integer actualCapacity;
/**
......@@ -86,7 +87,7 @@ public class HouseholdPvLease extends BaseEntity {
/**
* 逆变器序列号
*/
@TableField("inverter_serial_number")
@TableField(value = "inverter_serial_number", updateStrategy = FieldStrategy.IGNORED)
private String inverterSerialNumber;
}
package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
......@@ -120,10 +121,14 @@ public class HouseholdPvLeaseController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "租赁物信息表单预计功率实时计算", notes = "租赁物信息表单预计功率实时计算")
@GetMapping(value = "/getInstallCount")
public ResponseModel<Object> getInstallCount(@RequestParam Long number,
@RequestParam Long power) {
public ResponseModel<Object> getInstallCount(@RequestParam(value = "number" ,required = false) Long number,
@RequestParam(value = "power" ,required = false) Long power) {
HashMap<String, Object> map = new HashMap<>();
map.put("estimatedPower", Math.multiplyExact(number, power));
if (ObjectUtils.isEmpty(number) || ObjectUtils.isEmpty(power)) {
map.put("estimatedPower", 0);
}else {
map.put("estimatedPower", Math.multiplyExact(number, power));
}
return ResponseHelper.buildResponse(map);
}
}
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