| New file |
| | |
| | | package com.java110.dto.floorShareMeter; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description 楼栋公摊表数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class FloorShareMeterDto extends PageDto implements Serializable { |
| | | |
| | | private String floorId; |
| | | private String meterNum; |
| | | private String meterType; |
| | | private String fsmId; |
| | | private String formulaValue; |
| | | private String communityId; |
| | | private String curDegree; |
| | | private String shareType; |
| | | private String floorNum; |
| | | private String curReadingTime; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getFloorId() { |
| | | return floorId; |
| | | } |
| | | public void setFloorId(String floorId) { |
| | | this.floorId = floorId; |
| | | } |
| | | public String getMeterNum() { |
| | | return meterNum; |
| | | } |
| | | public void setMeterNum(String meterNum) { |
| | | this.meterNum = meterNum; |
| | | } |
| | | public String getMeterType() { |
| | | return meterType; |
| | | } |
| | | public void setMeterType(String meterType) { |
| | | this.meterType = meterType; |
| | | } |
| | | public String getFsmId() { |
| | | return fsmId; |
| | | } |
| | | public void setFsmId(String fsmId) { |
| | | this.fsmId = fsmId; |
| | | } |
| | | public String getFormulaValue() { |
| | | return formulaValue; |
| | | } |
| | | public void setFormulaValue(String formulaValue) { |
| | | this.formulaValue = formulaValue; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getCurDegree() { |
| | | return curDegree; |
| | | } |
| | | public void setCurDegree(String curDegree) { |
| | | this.curDegree = curDegree; |
| | | } |
| | | public String getShareType() { |
| | | return shareType; |
| | | } |
| | | public void setShareType(String shareType) { |
| | | this.shareType = shareType; |
| | | } |
| | | public String getFloorNum() { |
| | | return floorNum; |
| | | } |
| | | public void setFloorNum(String floorNum) { |
| | | this.floorNum = floorNum; |
| | | } |
| | | public String getCurReadingTime() { |
| | | return curReadingTime; |
| | | } |
| | | public void setCurReadingTime(String curReadingTime) { |
| | | this.curReadingTime = curReadingTime; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | } |
| | |
| | | package com.java110.dto.room; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | |
| | | public class ApplyRoomDiscountTypeDto extends PageDto implements Serializable { |
| | | |
| | | private String applyType; |
| | | private String typeDesc; |
| | | private String typeName; |
| | | private String communityId; |
| | | private String typeDesc; |
| | | private String typeName; |
| | | private String communityId; |
| | | |
| | | |
| | | private Date createTime; |
| | |
| | | public String getApplyType() { |
| | | return applyType; |
| | | } |
| | | public void setApplyType(String applyType) { |
| | | |
| | | public void setApplyType(String applyType) { |
| | | this.applyType = applyType; |
| | | } |
| | | public String getTypeDesc() { |
| | | |
| | | public String getTypeDesc() { |
| | | return typeDesc; |
| | | } |
| | | public void setTypeDesc(String typeDesc) { |
| | | |
| | | public void setTypeDesc(String typeDesc) { |
| | | this.typeDesc = typeDesc; |
| | | } |
| | | public String getTypeName() { |
| | | |
| | | public String getTypeName() { |
| | | return typeName; |
| | | } |
| | | public void setTypeName(String typeName) { |
| | | |
| | | public void setTypeName(String typeName) { |
| | | this.typeName = typeName; |
| | | } |
| | | public String getCommunityId() { |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.po.floorShareMeter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | /** |
| | | * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体 |
| | | * add by 吴学文 at 2025-03-25 15:01:11 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | public class FloorShareMeterPo implements Serializable { |
| | | |
| | | private String floorId; |
| | | private String meterNum; |
| | | private String meterType; |
| | | private String fsmId; |
| | | private String formulaValue; |
| | | private String statusCd = "0"; |
| | | private String communityId; |
| | | private String curDegree; |
| | | private String shareType; |
| | | private String floorNum; |
| | | private String curReadingTime; |
| | | public String getFloorId() { |
| | | return floorId; |
| | | } |
| | | public void setFloorId(String floorId) { |
| | | this.floorId = floorId; |
| | | } |
| | | public String getMeterNum() { |
| | | return meterNum; |
| | | } |
| | | public void setMeterNum(String meterNum) { |
| | | this.meterNum = meterNum; |
| | | } |
| | | public String getMeterType() { |
| | | return meterType; |
| | | } |
| | | public void setMeterType(String meterType) { |
| | | this.meterType = meterType; |
| | | } |
| | | public String getFsmId() { |
| | | return fsmId; |
| | | } |
| | | public void setFsmId(String fsmId) { |
| | | this.fsmId = fsmId; |
| | | } |
| | | public String getFormulaValue() { |
| | | return formulaValue; |
| | | } |
| | | public void setFormulaValue(String formulaValue) { |
| | | this.formulaValue = formulaValue; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getCurDegree() { |
| | | return curDegree; |
| | | } |
| | | public void setCurDegree(String curDegree) { |
| | | this.curDegree = curDegree; |
| | | } |
| | | public String getShareType() { |
| | | return shareType; |
| | | } |
| | | public void setShareType(String shareType) { |
| | | this.shareType = shareType; |
| | | } |
| | | public String getFloorNum() { |
| | | return floorNum; |
| | | } |
| | | public void setFloorNum(String floorNum) { |
| | | this.floorNum = floorNum; |
| | | } |
| | | public String getCurReadingTime() { |
| | | return curReadingTime; |
| | | } |
| | | public void setCurReadingTime(String curReadingTime) { |
| | | this.curReadingTime = curReadingTime; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <!-- 查询优惠申请类型信息 add by wuxw 2018-07-03 --> |
| | | <select id="getApplyRoomDiscountTypeInfo" parameterType="Map" resultType="Map"> |
| | | select t.apply_type,t.apply_type applyType,t.type_desc,t.type_desc typeDesc,t.type_name,t.type_name |
| | | typeName,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId |
| | | typeName,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.create_time createTime |
| | | from apply_room_discount_type t |
| | | where 1 =1 |
| | | <if test="applyType !=null and applyType != ''"> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="floorShareMeterV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存楼栋公摊表信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFloorShareMeterInfo" parameterType="Map"> |
| | | insert into floor_share_meter( |
| | | floor_id,meter_num,meter_type,fsm_id,formula_value,community_id,cur_degree,share_type,floor_num,cur_reading_time |
| | | ) values ( |
| | | #{floorId},#{meterNum},#{meterType},#{fsmId},#{formulaValue},#{communityId},#{curDegree},#{shareType},#{floorNum},#{curReadingTime} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询楼栋公摊表信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFloorShareMeterInfo" parameterType="Map" resultType="Map"> |
| | | select t.floor_id floorId,t.meter_num meterNum,t.meter_type meterType,t.fsm_id fsmId,t.formula_value |
| | | formulaValue,t.status_cd statusCd,t.community_id communityId,t.cur_degree curDegree,t.share_type |
| | | shareType,t.floor_num floorNum,t.cur_reading_time curReadingTime,t.create_time createTime |
| | | from floor_share_meter t |
| | | where 1 =1 |
| | | <if test="floorId !=null and floorId != ''"> |
| | | and t.floor_id= #{floorId} |
| | | </if> |
| | | <if test="meterNum !=null and meterNum != ''"> |
| | | and t.meter_num= #{meterNum} |
| | | </if> |
| | | <if test="meterType !=null and meterType != ''"> |
| | | and t.meter_type= #{meterType} |
| | | </if> |
| | | <if test="fsmId !=null and fsmId != ''"> |
| | | and t.fsm_id= #{fsmId} |
| | | </if> |
| | | <if test="formulaValue !=null and formulaValue != ''"> |
| | | and t.formula_value= #{formulaValue} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="curDegree !=null and curDegree != ''"> |
| | | and t.cur_degree= #{curDegree} |
| | | </if> |
| | | <if test="shareType !=null and shareType != ''"> |
| | | and t.share_type= #{shareType} |
| | | </if> |
| | | <if test="floorNum !=null and floorNum != ''"> |
| | | and t.floor_num= #{floorNum} |
| | | </if> |
| | | <if test="curReadingTime !=null and curReadingTime != ''"> |
| | | and t.cur_reading_time= #{curReadingTime} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改楼栋公摊表信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFloorShareMeterInfo" parameterType="Map"> |
| | | update floor_share_meter t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | |
| | | <if test="meterNum !=null and meterNum != ''"> |
| | | , t.meter_num= #{meterNum} |
| | | </if> |
| | | <if test="meterType !=null and meterType != ''"> |
| | | , t.meter_type= #{meterType} |
| | | </if> |
| | | <if test="formulaValue !=null and formulaValue != ''"> |
| | | , t.formula_value= #{formulaValue} |
| | | </if> |
| | | |
| | | <if test="curDegree !=null and curDegree != ''"> |
| | | , t.cur_degree= #{curDegree} |
| | | </if> |
| | | <if test="shareType !=null and shareType != ''"> |
| | | , t.share_type= #{shareType} |
| | | </if> |
| | | <if test="floorNum !=null and floorNum != ''"> |
| | | , t.floor_num= #{floorNum} |
| | | </if> |
| | | <if test="curReadingTime !=null and curReadingTime != ''"> |
| | | , t.cur_reading_time= #{curReadingTime} |
| | | </if> |
| | | where 1=1 |
| | | <if test="fsmId !=null and fsmId != ''"> |
| | | and t.fsm_id= #{fsmId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="floorId !=null and floorId != ''"> |
| | | and t.floor_id= #{floorId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询楼栋公摊表数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryFloorShareMetersCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from floor_share_meter t |
| | | where 1 =1 |
| | | <if test="floorId !=null and floorId != ''"> |
| | | and t.floor_id= #{floorId} |
| | | </if> |
| | | <if test="meterNum !=null and meterNum != ''"> |
| | | and t.meter_num= #{meterNum} |
| | | </if> |
| | | <if test="meterType !=null and meterType != ''"> |
| | | and t.meter_type= #{meterType} |
| | | </if> |
| | | <if test="fsmId !=null and fsmId != ''"> |
| | | and t.fsm_id= #{fsmId} |
| | | </if> |
| | | <if test="formulaValue !=null and formulaValue != ''"> |
| | | and t.formula_value= #{formulaValue} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="curDegree !=null and curDegree != ''"> |
| | | and t.cur_degree= #{curDegree} |
| | | </if> |
| | | <if test="shareType !=null and shareType != ''"> |
| | | and t.share_type= #{shareType} |
| | | </if> |
| | | <if test="floorNum !=null and floorNum != ''"> |
| | | and t.floor_num= #{floorNum} |
| | | </if> |
| | | <if test="curReadingTime !=null and curReadingTime != ''"> |
| | | and t.cur_reading_time= #{curReadingTime} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.intf.fee; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.floorShareMeter.FloorShareMeterDto; |
| | | import com.java110.po.floorShareMeter.FloorShareMeterPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用 |
| | | * add by 吴学文 at 2025-03-25 15:01:11 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @FeignClient(name = "fee-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/floorShareMeterV1Api") |
| | | public interface IFloorShareMeterV1InnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveFloorShareMeter", method = RequestMethod.POST) |
| | | int saveFloorShareMeter(@RequestBody FloorShareMeterPo floorShareMeterPo); |
| | | |
| | | @RequestMapping(value = "/updateFloorShareMeter", method = RequestMethod.POST) |
| | | int updateFloorShareMeter(@RequestBody FloorShareMeterPo floorShareMeterPo); |
| | | |
| | | @RequestMapping(value = "/deleteFloorShareMeter", method = RequestMethod.POST) |
| | | int deleteFloorShareMeter(@RequestBody FloorShareMeterPo floorShareMeterPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param floorShareMeterDto 数据对象分享 |
| | | * @return FloorShareMeterDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryFloorShareMeters", method = RequestMethod.POST) |
| | | List<FloorShareMeterDto> queryFloorShareMeters(@RequestBody FloorShareMeterDto floorShareMeterDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param floorShareMeterDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryFloorShareMetersCount", method = RequestMethod.POST) |
| | | int queryFloorShareMetersCount(@RequestBody FloorShareMeterDto floorShareMeterDto); |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.fee.cmd.meter; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.intf.fee.IFloorShareMeterV1InnerServiceSMO; |
| | | import com.java110.po.floorShareMeter.FloorShareMeterPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | /** |
| | | * 类表述:删除 |
| | | * 服务编码:floorShareMeter.deleteFloorShareMeter |
| | | * 请求路劲:/app/floorShareMeter.DeleteFloorShareMeter |
| | | * add by 吴学文 at 2025-03-25 15:01:11 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @Java110Cmd(serviceCode = "meter.deleteFloorShareMeter") |
| | | public class DeleteFloorShareMeterCmd extends Cmd { |
| | | private static Logger logger = LoggerFactory.getLogger(DeleteFloorShareMeterCmd.class); |
| | | |
| | | @Autowired |
| | | private IFloorShareMeterV1InnerServiceSMO floorShareMeterV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "fsmId", "fsmId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空"); |
| | | super.validateProperty(cmdDataFlowContext); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | FloorShareMeterPo floorShareMeterPo = BeanConvertUtil.covertBean(reqJson, FloorShareMeterPo.class); |
| | | int flag = floorShareMeterV1InnerServiceSMOImpl.deleteFloorShareMeter(floorShareMeterPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("删除数据失败"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.fee.cmd.meter; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.intf.fee.IFloorShareMeterV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.java110.dto.floorShareMeter.FloorShareMeterDto; |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * 类表述:查询 |
| | | * 服务编码:floorShareMeter.listFloorShareMeter |
| | | * 请求路劲:/app/floorShareMeter.ListFloorShareMeter |
| | | * add by 吴学文 at 2025-03-25 15:01:11 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @Java110Cmd(serviceCode = "meter.listFloorShareMeter") |
| | | public class ListFloorShareMeterCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListFloorShareMeterCmd.class); |
| | | @Autowired |
| | | private IFloorShareMeterV1InnerServiceSMO floorShareMeterV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空"); |
| | | super.validateProperty(cmdDataFlowContext); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | FloorShareMeterDto floorShareMeterDto = BeanConvertUtil.covertBean(reqJson, FloorShareMeterDto.class); |
| | | |
| | | int count = floorShareMeterV1InnerServiceSMOImpl.queryFloorShareMetersCount(floorShareMeterDto); |
| | | |
| | | List<FloorShareMeterDto> floorShareMeterDtos = null; |
| | | |
| | | if (count > 0) { |
| | | floorShareMeterDtos = floorShareMeterV1InnerServiceSMOImpl.queryFloorShareMeters(floorShareMeterDto); |
| | | } else { |
| | | floorShareMeterDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, floorShareMeterDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.fee.cmd.meter; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.floor.FloorDto; |
| | | import com.java110.intf.community.IFloorInnerServiceSMO; |
| | | import com.java110.intf.fee.IFloorShareMeterV1InnerServiceSMO; |
| | | import com.java110.po.floorShareMeter.FloorShareMeterPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类表述:保存 |
| | | * 服务编码:floorShareMeter.saveFloorShareMeter |
| | | * 请求路劲:/app/floorShareMeter.SaveFloorShareMeter |
| | | * add by 吴学文 at 2025-03-25 15:01:11 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @Java110Cmd(serviceCode = "meter.saveFloorShareMeter") |
| | | public class SaveFloorShareMeterCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveFloorShareMeterCmd.class); |
| | | |
| | | public static final String CODE_PREFIX_ID = "10"; |
| | | |
| | | @Autowired |
| | | private IFloorShareMeterV1InnerServiceSMO floorShareMeterV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFloorInnerServiceSMO floorInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "floorId", "请求报文中未包含floorId"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "meterType", "请求报文中未包含meterType"); |
| | | Assert.hasKeyAndValue(reqJson, "shareType", "请求报文中未包含shareType"); |
| | | super.validateProperty(cmdDataFlowContext); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | FloorDto floorDto = new FloorDto(); |
| | | floorDto.setFloorId(reqJson.getString("floorId")); |
| | | floorDto.setCommunityId(reqJson.getString("communityId")); |
| | | List<FloorDto> floorDtos = floorInnerServiceSMOImpl.queryFloors(floorDto); |
| | | |
| | | Assert.listOnlyOne(floorDtos, "楼栋不存在"); |
| | | |
| | | FloorShareMeterPo floorShareMeterPo = BeanConvertUtil.covertBean(reqJson, FloorShareMeterPo.class); |
| | | floorShareMeterPo.setFsmId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID)); |
| | | floorShareMeterPo.setCurDegree("0"); |
| | | floorShareMeterPo.setCurReadingTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | floorShareMeterPo.setFloorNum(floorDtos.get(0).getFloorNum()); |
| | | int flag = floorShareMeterV1InnerServiceSMOImpl.saveFloorShareMeter(floorShareMeterPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("保存数据失败"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.fee.cmd.meter; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.intf.fee.IFloorShareMeterV1InnerServiceSMO; |
| | | import com.java110.po.floorShareMeter.FloorShareMeterPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * 类表述:更新 |
| | | * 服务编码:floorShareMeter.updateFloorShareMeter |
| | | * 请求路劲:/app/floorShareMeter.UpdateFloorShareMeter |
| | | * add by 吴学文 at 2025-03-25 15:01:11 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @Java110Cmd(serviceCode = "meter.updateFloorShareMeter") |
| | | public class UpdateFloorShareMeterCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateFloorShareMeterCmd.class); |
| | | |
| | | |
| | | @Autowired |
| | | private IFloorShareMeterV1InnerServiceSMO floorShareMeterV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "fsmId", "fsmId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空"); |
| | | super.validateProperty(cmdDataFlowContext); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | FloorShareMeterPo floorShareMeterPo = BeanConvertUtil.covertBean(reqJson, FloorShareMeterPo.class); |
| | | int flag = floorShareMeterV1InnerServiceSMOImpl.updateFloorShareMeter(floorShareMeterPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("更新数据失败"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.fee.dao; |
| | | |
| | | |
| | | import com.java110.utils.exception.DAOException; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 类表述: |
| | | * add by 吴学文 at 2025-03-25 15:01:11 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | public interface IFloorShareMeterV1ServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 楼栋公摊表信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int saveFloorShareMeterInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询楼栋公摊表信息(instance过程) |
| | | * 根据bId 查询楼栋公摊表信息 |
| | | * @param info bId 信息 |
| | | * @return 楼栋公摊表信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getFloorShareMeterInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改楼栋公摊表信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int updateFloorShareMeterInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询楼栋公摊表总数 |
| | | * |
| | | * @param info 楼栋公摊表信息 |
| | | * @return 楼栋公摊表数量 |
| | | */ |
| | | int queryFloorShareMetersCount(Map info); |
| | | |
| | | } |
| | |
| | | public List<Map> getApplyRoomDiscountTypeInfo(Map info) throws DAOException { |
| | | logger.debug("查询优惠申请类型信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessApplyRoomDiscountTypeInfos = sqlSessionTemplate.selectList("applyRoomDiscountTypeServiceDaoImpl.getApplyRoomDiscountTypeInfo",info); |
| | | List<Map> infos = sqlSessionTemplate.selectList("applyRoomDiscountTypeServiceDaoImpl.getApplyRoomDiscountTypeInfo",info); |
| | | |
| | | return businessApplyRoomDiscountTypeInfos; |
| | | return infos; |
| | | } |
| | | |
| | | |
| | |
| | | public int queryApplyRoomDiscountTypesCount(Map info) { |
| | | logger.debug("查询优惠申请类型数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessApplyRoomDiscountTypeInfos = sqlSessionTemplate.selectList("applyRoomDiscountTypeServiceDaoImpl.queryApplyRoomDiscountTypesCount", info); |
| | | if (businessApplyRoomDiscountTypeInfos.size() < 1) { |
| | | List<Map> infos = sqlSessionTemplate.selectList("applyRoomDiscountTypeServiceDaoImpl.queryApplyRoomDiscountTypesCount", info); |
| | | if (infos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessApplyRoomDiscountTypeInfos.get(0).get("count").toString()); |
| | | return Integer.parseInt(infos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.fee.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.fee.dao.IFloorShareMeterV1ServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 类表述: |
| | | * add by 吴学文 at 2025-03-25 15:01:11 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @Service("floorShareMeterV1ServiceDaoImpl") |
| | | public class FloorShareMeterV1ServiceDaoImpl extends BaseServiceDao implements IFloorShareMeterV1ServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(FloorShareMeterV1ServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存楼栋公摊表信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int saveFloorShareMeterInfo(Map info) throws DAOException { |
| | | logger.debug("保存 saveFloorShareMeterInfo 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("floorShareMeterV1ServiceDaoImpl.saveFloorShareMeterInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询楼栋公摊表信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getFloorShareMeterInfo(Map info) throws DAOException { |
| | | logger.debug("查询 getFloorShareMeterInfo 入参 info : {}",info); |
| | | |
| | | List<Map> infos = sqlSessionTemplate.selectList("floorShareMeterV1ServiceDaoImpl.getFloorShareMeterInfo",info); |
| | | |
| | | return infos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改楼栋公摊表信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int updateFloorShareMeterInfo(Map info) throws DAOException { |
| | | logger.debug("修改 updateFloorShareMeterInfo 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("floorShareMeterV1ServiceDaoImpl.updateFloorShareMeterInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | /** |
| | | * 查询楼栋公摊表数量 |
| | | * @param info 楼栋公摊表信息 |
| | | * @return 楼栋公摊表数量 |
| | | */ |
| | | @Override |
| | | public int queryFloorShareMetersCount(Map info) { |
| | | logger.debug("查询 queryFloorShareMetersCount 入参 info : {}",info); |
| | | |
| | | List<Map> infos = sqlSessionTemplate.selectList("floorShareMeterV1ServiceDaoImpl.queryFloorShareMetersCount", info); |
| | | if (infos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(infos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 吴学文 and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.fee.smo.impl; |
| | | |
| | | |
| | | import com.java110.fee.dao.IFloorShareMeterV1ServiceDao; |
| | | import com.java110.intf.fee.IFloorShareMeterV1InnerServiceSMO; |
| | | import com.java110.dto.floorShareMeter.FloorShareMeterDto; |
| | | import com.java110.po.floorShareMeter.FloorShareMeterPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.PageDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用 |
| | | * add by 吴学文 at 2025-03-25 15:01:11 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * 官网:http://www.homecommunity.cn |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @RestController |
| | | public class FloorShareMeterV1InnerServiceSMOImpl extends BaseServiceSMO implements IFloorShareMeterV1InnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IFloorShareMeterV1ServiceDao floorShareMeterV1ServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveFloorShareMeter(@RequestBody FloorShareMeterPo floorShareMeterPo) { |
| | | int saveFlag = floorShareMeterV1ServiceDaoImpl.saveFloorShareMeterInfo(BeanConvertUtil.beanCovertMap(floorShareMeterPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateFloorShareMeter(@RequestBody FloorShareMeterPo floorShareMeterPo) { |
| | | int saveFlag = floorShareMeterV1ServiceDaoImpl.updateFloorShareMeterInfo(BeanConvertUtil.beanCovertMap(floorShareMeterPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteFloorShareMeter(@RequestBody FloorShareMeterPo floorShareMeterPo) { |
| | | floorShareMeterPo.setStatusCd("1"); |
| | | int saveFlag = floorShareMeterV1ServiceDaoImpl.updateFloorShareMeterInfo(BeanConvertUtil.beanCovertMap(floorShareMeterPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<FloorShareMeterDto> queryFloorShareMeters(@RequestBody FloorShareMeterDto floorShareMeterDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = floorShareMeterDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | floorShareMeterDto.setPage((page - 1) * floorShareMeterDto.getRow()); |
| | | } |
| | | |
| | | List<FloorShareMeterDto> floorShareMeters = BeanConvertUtil.covertBeanList(floorShareMeterV1ServiceDaoImpl.getFloorShareMeterInfo(BeanConvertUtil.beanCovertMap(floorShareMeterDto)), FloorShareMeterDto.class); |
| | | |
| | | return floorShareMeters; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryFloorShareMetersCount(@RequestBody FloorShareMeterDto floorShareMeterDto) { |
| | | return floorShareMeterV1ServiceDaoImpl.queryFloorShareMetersCount(BeanConvertUtil.beanCovertMap(floorShareMeterDto)); } |
| | | |
| | | } |