| @@ -390,6 +390,16 @@ public class WxMallAdminController extends BaseController { | |||||
| WxEnergyMeterShopFloor sfq = new WxEnergyMeterShopFloor(); | WxEnergyMeterShopFloor sfq = new WxEnergyMeterShopFloor(); | ||||
| sfq.updateTenantInfo(record); | sfq.updateTenantInfo(record); | ||||
| sfq.setType(EnumEnergyMeterShopFloorType.SHOP.getCode()); | sfq.setType(EnumEnergyMeterShopFloorType.SHOP.getCode()); | ||||
| if (StringUtils.isNotBlank(record.getShopNumber())) { | |||||
| WxShop sq = new WxShop(); | |||||
| sq.updateTenantInfo(record); | |||||
| sq.setShopNumber(record.getShopNumber()); | |||||
| List<Long> sids = wxShopService.getShopIds(sq); | |||||
| if (null == sids || sids.size() <= 0 ) { | |||||
| return new ResultData(); | |||||
| } | |||||
| sfq.setAliseIdList(sids); | |||||
| } | |||||
| sfq.setAliseId(record.getShopId()); | sfq.setAliseId(record.getShopId()); | ||||
| List<Long> mids = wxEnergyService.getMeterIdList(sfq); | List<Long> mids = wxEnergyService.getMeterIdList(sfq); | ||||
| if (null == mids || mids.size() <= 0 ) { | if (null == mids || mids.size() <= 0 ) { | ||||
| @@ -94,6 +94,8 @@ public class WxEnergyMeter extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long shopId; | private Long shopId; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String shopNumber; | |||||
| @TableField(exist = false) | |||||
| private List<Integer> physicsTypeList; | private List<Integer> physicsTypeList; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer isRealMeter; | private Integer isRealMeter; | ||||
| @@ -49,6 +49,8 @@ public class WxEnergyMeterShopFloor extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "关联的编号", name = "aliseId") | @io.swagger.annotations.ApiModelProperty(value = "关联的编号", name = "aliseId") | ||||
| private Long aliseId; | private Long aliseId; | ||||
| @TableField(exist = false) | |||||
| private List<Long> aliseIdList; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<Long> shopIds; | private List<Long> shopIds; | ||||
| @@ -28,6 +28,12 @@ | |||||
| <if test=" null != type ">and `type` = #{type}</if> | <if test=" null != type ">and `type` = #{type}</if> | ||||
| <if test=" null != meterId ">and `meter_id` = #{meterId}</if> | <if test=" null != meterId ">and `meter_id` = #{meterId}</if> | ||||
| <if test=" null != aliseId ">and `alise_id` = #{aliseId}</if> | <if test=" null != aliseId ">and `alise_id` = #{aliseId}</if> | ||||
| <if test=" null != aliseIdList "> | |||||
| and alise_id in | |||||
| <foreach collection="aliseIdList" index="index" item="aidItem" open="(" separator="," close=")"> | |||||
| #{aidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != typeList "> | <if test=" null != typeList "> | ||||
| and type in | and type in | ||||
| <foreach collection="typeList" index="index" item="tidItem" open="(" separator="," close=")"> | <foreach collection="typeList" index="index" item="tidItem" open="(" separator="," close=")"> | ||||