소스 검색

上传图片或者视频

Althars123 2 년 전
부모
커밋
120cc3f6a3

+ 4 - 3
xxgl-admin/src/main/java/com/miaxis/pc/controller/PriceInfoController.java

@@ -7,6 +7,7 @@ import com.miaxis.common.core.page.ResponsePageInfo;
 import com.miaxis.common.enums.BusinessTypeEnum;
 import com.miaxis.common.utils.poi.ExcelUtil;
 import com.miaxis.price.domain.PriceInfo;
+import com.miaxis.price.dto.PriceInfoDto;
 import com.miaxis.price.service.IPriceInfoService;
 import io.swagger.annotations.*;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,9 +41,9 @@ public class PriceInfoController extends BaseController{
             @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
             @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
     })
-    public ResponsePageInfo<PriceInfo> list(@ModelAttribute PriceInfo priceInfo){
+    public ResponsePageInfo<PriceInfo> list(@ModelAttribute PriceInfoDto priceInfoTDto){
         startPage();
-        List<PriceInfo> list = priceInfoService.selectPriceInfoList(priceInfo);
+        List<PriceInfo> list = priceInfoService.selectPriceInfoList(priceInfoTDto);
         return toResponsePageInfo(list);
     }
 
@@ -67,7 +68,7 @@ public class PriceInfoController extends BaseController{
     @Log(title = "报价", businessType = BusinessTypeEnum.EXPORT)
     @GetMapping("/export")
     @ApiOperation("导出报价列表Excel")
-    public Response<String> export(@ModelAttribute PriceInfo priceInfo){
+    public Response<String> export(@ModelAttribute PriceInfoDto priceInfo){
         List<PriceInfo> list = priceInfoService.selectPriceInfoList(priceInfo);
         ExcelUtil<PriceInfo> util = new ExcelUtil<PriceInfo>(PriceInfo.class);
         return util.exportExcel(list, "info");

+ 229 - 0
xxgl-service/src/main/java/com/miaxis/price/dto/PriceInfoDto.java

@@ -0,0 +1,229 @@
+package com.miaxis.price.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+
+/**
+ * 报价对象 price_info
+ *
+ * @author miaxis
+ * @date 2023-01-10
+ */
+@Data
+@ApiModel(value = "PriceInfoDto", description = "报价对象")
+public class PriceInfoDto extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+
+
+
+    /** 机组型号 */
+    @Excel(name = "机组型号", sort=1)
+    @TableField("unit_model")
+    @ApiModelProperty(value = "机组型号")
+    private String unitModel;
+
+    /** 机组功率(kw) */
+    @Excel(name = "机组功率(kw)", sort=2)
+    @ApiModelProperty(value = "最小机组功率(kw)")
+    private BigDecimal unitPowerKwMin;
+
+    /** 机组功率(kw) */
+    @Excel(name = "机组功率(kw)", sort=2)
+    @ApiModelProperty(value = "最大机组功率(kw)")
+    private BigDecimal unitPowerKwMax;
+
+
+    /** 机组功率(kva) */
+    @ApiModelProperty(value = "最小机组功率(kva)")
+    private BigDecimal unitPowerKvaMin;
+
+    /** 机组功率(kva) */
+    @TableField("unit_power_kva")
+    @ApiModelProperty(value = "最大机组功率(kva)")
+    private BigDecimal unitPowerKvaMax;
+
+
+
+
+
+    /** 机组功率(kw) */
+    @Excel(name = "机组功率(kw)", sort=2)
+    @TableField("unit_power_kw")
+    @ApiModelProperty(value = "机组功率(kw)")
+    private BigDecimal unitPowerKw;
+
+    /** 机组功率(kva) */
+    @Excel(name = "机组功率(kva)", sort=3)
+    @TableField("unit_power_kva")
+    @ApiModelProperty(value = "机组功率(kva)")
+    private BigDecimal unitPowerKva;
+
+    /** 频率(Hz) */
+    @Excel(name = "频率(Hz)", sort=4)
+    @TableField("rate")
+    @ApiModelProperty(value = "频率(Hz)")
+    private Integer rate;
+
+    /** 品牌 */
+    @Excel(name = "品牌", sort=5)
+    @TableField("brand")
+    @ApiModelProperty(value = "品牌")
+    private String brand;
+
+    /** 柴油机型号 */
+    @Excel(name = "柴油机型号", sort=6)
+    @TableField("diesel_engine_model")
+    @ApiModelProperty(value = "柴油机型号")
+    private String dieselEngineModel;
+
+    /** 转速 */
+    @Excel(name = "转速", sort=7)
+    @TableField("speed")
+    @ApiModelProperty(value = "转速")
+    private Integer speed;
+
+    /** 动力价格 */
+    @Excel(name = "动力价格", sort=8)
+    @TableField("power_price")
+    @ApiModelProperty(value = "动力价格")
+    private BigDecimal powerPrice;
+
+    /** 发电机型号 */
+    @Excel(name = "发电机型号", sort=9)
+    @TableField("generator_model")
+    @ApiModelProperty(value = "发电机型号")
+    private String generatorModel;
+
+    /** 发电机价格 */
+    @Excel(name = "发电机价格", sort=10)
+    @TableField("generator_price")
+    @ApiModelProperty(value = "发电机价格")
+    private BigDecimal generatorPrice;
+
+    /** 静音机壳价格 */
+    @Excel(name = "静音机壳价格", sort=11)
+    @TableField("mute_price")
+    @ApiModelProperty(value = "静音机壳价格")
+    private BigDecimal mutePrice;
+
+    /** 开架价格 */
+    @Excel(name = "开架价格", sort=12)
+    @TableField("open_price")
+    @ApiModelProperty(value = "开架价格")
+    private BigDecimal openPrice;
+
+    /** ATS型号 */
+    @Excel(name = "ATS型号", sort=13)
+    @TableField("ats_model")
+    @ApiModelProperty(value = "ATS型号")
+    private String atsModel;
+
+    /** ATS价格 */
+    @Excel(name = "ATS价格", sort=14)
+    @TableField("ats_price")
+    @ApiModelProperty(value = "ATS价格")
+    private BigDecimal atsPrice;
+
+    /** 电瓶型号 */
+    @Excel(name = "电瓶型号", sort=15)
+    @TableField("battery_model")
+    @ApiModelProperty(value = "电瓶型号")
+    private String batteryModel;
+
+    /** 电瓶价格 */
+    @Excel(name = "电瓶价格", sort=16)
+    @TableField("battery_price")
+    @ApiModelProperty(value = "电瓶价格")
+    private BigDecimal batteryPrice;
+
+    /** 控制器铭贝 */
+    @Excel(name = "控制器铭贝", sort=17)
+    @TableField("controller_minbei")
+    @ApiModelProperty(value = "控制器铭贝")
+    private String controllerMinbei;
+
+    /** 控制器价格 */
+    @Excel(name = "控制器价格", sort=18)
+    @TableField("controller_price")
+    @ApiModelProperty(value = "控制器价格")
+    private BigDecimal controllerPrice;
+
+    /** 合计含税成本(静音) */
+    @Excel(name = "合计含税成本(静音)", sort=19)
+    @TableField("total_cost_mute")
+    @ApiModelProperty(value = "合计含税成本(静音)")
+    private BigDecimal totalCostMute;
+
+    /** 合计含税成本(开架) */
+    @Excel(name = "合计含税成本(开架)", sort=20)
+    @TableField("total_cost_open")
+    @ApiModelProperty(value = "合计含税成本(开架)")
+    private BigDecimal totalCostOpen;
+
+    /** 静音尺寸(长) */
+    @Excel(name = "静音尺寸(长)", sort=21)
+    @TableField("mute_long")
+    @ApiModelProperty(value = "静音尺寸(长)")
+    private BigDecimal muteLong;
+
+    /** 静音尺寸(宽) */
+    @Excel(name = "静音尺寸(宽)", sort=22)
+    @TableField("mute_width")
+    @ApiModelProperty(value = "静音尺寸(宽)")
+    private BigDecimal muteWidth;
+
+    /** 静音尺寸(高) */
+    @Excel(name = "静音尺寸(高)", sort=23)
+    @TableField("mute_high")
+    @ApiModelProperty(value = "静音尺寸(高)")
+    private BigDecimal muteHigh;
+
+    /** 开架尺寸(长) */
+    @Excel(name = "开架尺寸(长)", sort=24)
+    @TableField("open_long")
+    @ApiModelProperty(value = "开架尺寸(长)")
+    private BigDecimal openLong;
+
+    /** 开架尺寸(宽) */
+    @Excel(name = "开架尺寸(宽)", sort=25)
+    @TableField("open_width")
+    @ApiModelProperty(value = "开架尺寸(宽)")
+    private BigDecimal openWidth;
+
+    /** 开架尺寸(高) */
+    @Excel(name = "开架尺寸(高)", sort=26)
+    @TableField("open_high")
+    @ApiModelProperty(value = "开架尺寸(高)")
+    private BigDecimal openHigh;
+
+    /** CKD尺寸(长) */
+    @Excel(name = "CKD尺寸(长)", sort=27)
+    @TableField("ckd_long")
+    @ApiModelProperty(value = "CKD尺寸(长)")
+    private BigDecimal ckdLong;
+
+    /** CKD尺寸(宽) */
+    @Excel(name = "CKD尺寸(宽)", sort=28)
+    @TableField("ckd_width")
+    @ApiModelProperty(value = "CKD尺寸(宽)")
+    private BigDecimal ckdWidth;
+
+    /** CKD尺寸(高) */
+    @Excel(name = "CKD尺寸(高)", sort=29)
+    @TableField("ckd_high")
+    @ApiModelProperty(value = "CKD尺寸(高)")
+    private BigDecimal ckdHigh;
+
+
+}

+ 3 - 2
xxgl-service/src/main/java/com/miaxis/price/mapper/PriceInfoMapper.java

@@ -3,6 +3,7 @@ package com.miaxis.price.mapper;
 import java.util.List;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.miaxis.price.domain.PriceInfo;
+import com.miaxis.price.dto.PriceInfoDto;
 
 /**
  * 报价Mapper接口
@@ -14,10 +15,10 @@ public interface PriceInfoMapper extends BaseMapper<PriceInfo> {
     /**
      * 查询报价列表
      *
-     * @param priceInfo 报价
+     * @param dto 报价
      * @return 报价集合
      */
-    public List<PriceInfo> selectPriceInfoList(PriceInfo priceInfo);
+    public List<PriceInfo> selectPriceInfoList(PriceInfoDto dto);
 
     List<String> getListByFieldName(String name);
 }

+ 2 - 1
xxgl-service/src/main/java/com/miaxis/price/service/IPriceInfoService.java

@@ -3,6 +3,7 @@ package com.miaxis.price.service;
 import java.util.List;
 import com.miaxis.price.domain.PriceInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.miaxis.price.dto.PriceInfoDto;
 
 /**
  * 报价Service接口
@@ -17,7 +18,7 @@ public interface IPriceInfoService extends IService<PriceInfo>{
      * @param priceInfo 报价
      * @return 报价集合
      */
-    public List<PriceInfo> selectPriceInfoList(PriceInfo priceInfo);
+    public List<PriceInfo> selectPriceInfoList(PriceInfoDto priceInfo);
 
     List<String> getListByFieldName(String name);
 }

+ 3 - 2
xxgl-service/src/main/java/com/miaxis/price/service/impl/PriceInfoServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.miaxis.common.utils.DateUtils;
+import com.miaxis.price.dto.PriceInfoDto;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.apache.commons.lang3.StringUtils;
@@ -30,8 +31,8 @@ public class PriceInfoServiceImpl extends ServiceImpl<PriceInfoMapper, PriceInfo
      * @return 报价
      */
     @Override
-    public List<PriceInfo> selectPriceInfoList(PriceInfo priceInfo){
-        return priceInfoMapper.selectPriceInfoList(priceInfo);
+    public List<PriceInfo> selectPriceInfoList(PriceInfoDto dto){
+        return priceInfoMapper.selectPriceInfoList(dto);
     }
 
     @Override

+ 5 - 3
xxgl-service/src/main/resources/mapper/price/PriceInfoMapper.xml

@@ -43,13 +43,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select * from price_info
     </sql>
 
-    <select id="selectPriceInfoList" parameterType="PriceInfo" resultMap="PriceInfoResult">
+    <select id="selectPriceInfoList" parameterType="PriceInfoDto" resultMap="PriceInfoResult">
         <include refid="selectPriceInfoVo"/>
         <where>
             <if test="brand != null  and brand != ''"> and brand = #{brand}</if>
             <if test="unitModel != null  and unitModel != ''"> and unit_model = #{unitModel}</if>
-            <if test="unitPowerKw != null "> and unit_power_kw = #{unitPowerKw}</if>
-            <if test="unitPowerKva != null "> and unit_power_kva = #{unitPowerKva}</if>
+            <if test="unitPowerKwMin != null "> and unit_power_kw <![CDATA[>=]]> #{unitPowerKwMin}</if>
+            <if test="unitPowerKwMax != null "> and unit_power_kw <![CDATA[<=]]> #{unitPowerKwMax}</if>
+            <if test="unitPowerKvaMin != null "> and unit_power_kva <![CDATA[>=]]> #{unitPowerKvaMin}</if>
+            <if test="unitPowerKvaMax != null "> and unit_power_kva <![CDATA[<=]]> #{unitPowerKvaMax}</if>
             <if test="rate != null "> and rate = #{rate}</if>
             <if test="dieselEngineModel != null  and dieselEngineModel != ''"> and diesel_engine_model = #{dieselEngineModel}</if>
             <if test="speed != null "> and speed = #{speed}</if>