Sfoglia il codice sorgente

补充下浮系数

fuyuchuan 9 ore fa
parent
commit
57344113e3

+ 3 - 0
service-vpp/service-vpp-biz/src/main/java/com/usky/vpp/domain/VppDrEvent.java

@@ -57,6 +57,9 @@ public class VppDrEvent implements Serializable {
     private String attachmentName;
     @TableField("subsidy_price")
     private BigDecimal subsidyPrice;
+    /** 下浮系数(必填) */
+    @TableField("floating_coefficient")
+    private BigDecimal floatingCoefficient;
     @TableField("event_status")
     private Integer eventStatus;
     @TableField("raw_payload")

+ 6 - 0
service-vpp/service-vpp-biz/src/main/java/com/usky/vpp/service/impl/VppDrServiceImpl.java

@@ -156,6 +156,7 @@ public class VppDrServiceImpl implements VppDrService {
         event.setAttachmentUrl(request.getAttachmentUrl());
         event.setAttachmentName(request.getAttachmentName());
         event.setSubsidyPrice(request.getSubsidyPrice());
+        event.setFloatingCoefficient(request.getFloatingCoefficient());
         event.setEventStatus(EVENT_STATUS_PENDING);
         VppAuditHelper.fillCreate(event);
         eventMapper.insert(event);
@@ -188,6 +189,7 @@ public class VppDrServiceImpl implements VppDrService {
         event.setAttachmentUrl(request.getAttachmentUrl());
         event.setAttachmentName(request.getAttachmentName());
         event.setSubsidyPrice(request.getSubsidyPrice());
+        event.setFloatingCoefficient(request.getFloatingCoefficient());
         VppAuditHelper.fillUpdate(event);
         eventMapper.updateById(event);
     }
@@ -837,6 +839,9 @@ public class VppDrServiceImpl implements VppDrService {
         if (request.getSubsidyPrice() != null && request.getSubsidyPrice().compareTo(BigDecimal.ZERO) < 0) {
             throw new BusinessException("补贴标准不能为负数");
         }
+        if (request.getFloatingCoefficient() == null) {
+            throw new BusinessException("下浮系数不能为空");
+        }
     }
 
     private void ensureEventIdUnique(String eventId, Long excludeId) {
@@ -889,6 +894,7 @@ public class VppDrServiceImpl implements VppDrService {
         vo.setAttachmentUrl(event.getAttachmentUrl());
         vo.setAttachmentName(event.getAttachmentName());
         vo.setSubsidyPrice(event.getSubsidyPrice());
+        vo.setFloatingCoefficient(event.getFloatingCoefficient());
         vo.setEventStatus(event.getEventStatus());
         vo.setParticipations(loadParticipationVos(event.getId()));
         return vo;

+ 2 - 0
service-vpp/service-vpp-biz/src/main/java/com/usky/vpp/service/vo/DrEventDetailVO.java

@@ -34,6 +34,8 @@ public class DrEventDetailVO {
     /** 附件名称 */
     private String attachmentName;
     private BigDecimal subsidyPrice;
+    /** 下浮系数 */
+    private BigDecimal floatingCoefficient;
     private Integer eventStatus;
     private List<DrParticipationVO> participations;
 }

+ 2 - 0
service-vpp/service-vpp-biz/src/main/java/com/usky/vpp/service/vo/DrEventRequest.java

@@ -35,4 +35,6 @@ public class DrEventRequest {
     /** 附件名称 */
     private String attachmentName;
     private BigDecimal subsidyPrice;
+    /** 下浮系数(必填) */
+    private BigDecimal floatingCoefficient;
 }

+ 2 - 0
service-vpp/service-vpp-biz/src/main/java/com/usky/vpp/service/vo/DrMonitorRecordVO.java

@@ -29,6 +29,8 @@ public class DrMonitorRecordVO {
     private String remark;
     private String attachmentUrl;
     private BigDecimal subsidyPrice;
+    /** 下浮系数 */
+    private BigDecimal floatingCoefficient;
     private Integer eventStatus;
     private String rawPayload;
     private Integer tenantId;

+ 1 - 0
service-vpp/service-vpp-biz/src/main/resources/sql/vpp_schema.sql

@@ -432,6 +432,7 @@ CREATE TABLE `vpp_dr_event` (
     `attachment_url` VARCHAR(500) NULL COMMENT '附件URL',
     `attachment_name` VARCHAR(200) NULL COMMENT '附件名称',
     `subsidy_price` DECIMAL(10,4) NULL COMMENT '补贴标准 元/kWh',
+    `floating_coefficient` DECIMAL(10,4) NULL COMMENT '下浮系数',
     `event_status` TINYINT NOT NULL COMMENT '0待参与 1已申报 2执行中 3已结束 4已取消',
     `raw_payload` JSON NULL COMMENT '原始邀约报文',
     `tenant_id` INT NULL COMMENT '租户ID',