winter 1 год назад
Родитель
Сommit
3aa5edaf23
4 измененных файлов: 80 добавлений и 2 удалений
  1. +11
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxEnergyController.java
  2. +25
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxEnergyMeter.java
  3. +37
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumeElectriType.java
  4. +7
    -1
      mallinkService/src/main/resources/mapper/WxEnergyMeterMapper.xml

+ 11
- 0
mallinkAdmin/src/main/java/com/iformall/controller/market/WxEnergyController.java Просмотреть файл

@@ -26,6 +26,7 @@ import com.iformall.enums.EnumFeesStandardsCalcuteUnit;
import com.iformall.enums.EnumFeesStandardsTimeUnit;
import com.iformall.enums.EnumFinanceCashierType;
import com.iformall.enums.EnumYesOrNo;
import com.iformall.enums.EnumeElectriType;
import com.iformall.exception.MallinkException;
import com.iformall.service.WxEnergyService;
import com.iformall.service.WxMallFloorService;
@@ -82,6 +83,16 @@ public class WxEnergyController extends BaseController {
return new ResultData(retMap);
}
@ApiOperation("电表类型")
@GetMapping("electriTypes")
public ResultData electriTypes() {
Map<Integer,String> retMap = new HashMap<Integer,String>();
for (EnumeElectriType mem : EnumeElectriType.values()) {
retMap.put(mem.getCode(), mem.getMessage());
}
return new ResultData(retMap);
}
@ApiOperation("表分组")
@GetMapping("meterPhysicsTypeTypeList")
public ResultData meterPhysicsTypeTypeList() {


+ 25
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxEnergyMeter.java Просмотреть файл

@@ -6,6 +6,7 @@ import com.iformall.domain.po.base.TenantEntity;
import com.iformall.enums.EnumEnergyMeterPhysicsType;
import com.iformall.enums.EnumEnergyMeterType;
import com.iformall.enums.EnumRentShopType;
import com.iformall.enums.EnumeElectriType;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
@@ -89,8 +90,31 @@ public class WxEnergyMeter extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "是否参与计费", name = "hasFee")
private Integer hasFee;
@Excel(name = "三相/单相", replace = {"三相_1", "单相_2"}, width = 20, orderNum = "8")
@io.swagger.annotations.ApiModelProperty(value = "三相/单相EnumeElectriType", name = "electriType")
private Integer electriType;
@TableField(exist = false)
private String electriTypeName;
public String getElectriType() {
if (null != electriType) {
return EnumeElectriType.getEnum(electriType).getMessage();
}
return null;
}
@Excel(name = "变电器名称", width = 20, orderNum = "9")
@io.swagger.annotations.ApiModelProperty(value="变电器名称",name="transName")
private String transName;
@Excel(name = "比值", width = 20, orderNum = "10")
@io.swagger.annotations.ApiModelProperty(value="比值",name="ratio")
private String ratio;
@Excel(name = "位置", width = 20, orderNum = "11")
@io.swagger.annotations.ApiModelProperty(value="位置",name="address")
private String address;
@Excel(name = "关联", width = 20, orderNum = "8")
@Excel(name = "关联", width = 20, orderNum = "12")
@TableField(exist = false)
private String aliseName;


+ 37
- 0
mallinkService/src/main/java/com/iformall/enums/EnumeElectriType.java Просмотреть файл

@@ -0,0 +1,37 @@
package com.iformall.enums;


/**
* @author gongbiao
*/

public enum EnumeElectriType {

SAN_XIANG(1, "三相"),
DAN_XIANG(2, "单相");

public static EnumeElectriType getEnum(Integer code) {
for (EnumeElectriType value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumeElectriType(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

+ 7
- 1
mallinkService/src/main/resources/mapper/WxEnergyMeterMapper.xml Просмотреть файл

@@ -14,10 +14,15 @@
<result column="physics_type" jdbcType="INTEGER" property="physicsType"/>
<result column="shop_type" jdbcType="INTEGER" property="shopType"/>
<result column="has_fee" jdbcType="INTEGER" property="hasFee"/>
<result column="electri_type" jdbcType="INTEGER" property="electriType"/>
<result column="trans_name" jdbcType="VARCHAR" property="transName"/>
<result column="ratio" jdbcType="VARCHAR" property="ratio"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`type`,`rate`,`physics_type`,`shop_type`,`has_fee`
`id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`type`,`rate`,`physics_type`,`shop_type`,
`has_fee`,`electri_type`,`trans_name`,`ratio`,`address`
</sql>

<sql id="dynamicWhereConditions">
@@ -36,6 +41,7 @@
<if test=" null != name and '' != name ">and name like concat('%', #{name},'%')</if>
<if test=" null != isRealMeter ">and `physics_type` in (1,2) </if>
<if test=" null != hasFee ">and `has_fee` = #{hasFee}</if>
<if test=" null != electriType ">and `electri_type` = #{electriType}</if>
<if test=" null != notInIds ">
and id not in
<foreach collection="notInIds" index="index" item="nidItem" open="(" separator="," close=")">


Загрузка…
Отмена
Сохранить