Your Name
2023-03-19 635d3cc153fe0a9e4ac782dfa0772363ee81c2f2
加入充电规则功能
5个文件已修改
72 ■■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/chargeMachine/ChargeMachineDto.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/chargeMachine/ChargeMachinePo.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/common/ChargeMachineV1ServiceDaoImplMapper.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/common/ChargeRuleFeeV1ServiceDaoImplMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachineCmd.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/chargeMachine/ChargeMachineDto.java
@@ -23,7 +23,9 @@
    private String machineId;
    private String machineCode;
    private String energyPrice;
    private String durationPrice;
    private String ruleId;
    private String ruleName;
    private String communityId;
    private String machineName;
@@ -82,13 +84,6 @@
        this.energyPrice = energyPrice;
    }
    public String getDurationPrice() {
        return durationPrice;
    }
    public void setDurationPrice(String durationPrice) {
        this.durationPrice = durationPrice;
    }
    public String getCommunityId() {
        return communityId;
@@ -162,4 +157,20 @@
    public void setStateName(String stateName) {
        this.stateName = stateName;
    }
    public String getRuleId() {
        return ruleId;
    }
    public void setRuleId(String ruleId) {
        this.ruleId = ruleId;
    }
    public String getRuleName() {
        return ruleName;
    }
    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }
}
java110-bean/src/main/java/com/java110/po/chargeMachine/ChargeMachinePo.java
@@ -33,7 +33,7 @@
    private String machineId;
    private String machineCode;
    private String energyPrice;
    private String durationPrice;
    private String ruleId;
    private String statusCd = "0";
    private String communityId;
    private String machineName;
@@ -78,13 +78,6 @@
        this.energyPrice = energyPrice;
    }
    public String getDurationPrice() {
        return durationPrice;
    }
    public void setDurationPrice(String durationPrice) {
        this.durationPrice = durationPrice;
    }
    public String getStatusCd() {
        return statusCd;
@@ -110,5 +103,11 @@
        this.machineName = machineName;
    }
    public String getRuleId() {
        return ruleId;
    }
    public void setRuleId(String ruleId) {
        this.ruleId = ruleId;
    }
}
java110-db/src/main/resources/mapper/common/ChargeMachineV1ServiceDaoImplMapper.xml
@@ -8,9 +8,9 @@
    <!-- 保存充电桩信息 add by wuxw 2018-07-03 -->
    <insert id="saveChargeMachineInfo" parameterType="Map">
        insert into charge_machine(
        heartbeat_time,impl_bean,machine_id,machine_code,energy_price,duration_price,community_id,machine_name
        heartbeat_time,impl_bean,machine_id,machine_code,energy_price,rule_id,community_id,machine_name
        ) values (
        #{heartbeatTime},#{implBean},#{machineId},#{machineCode},#{energyPrice},#{durationPrice},#{communityId},#{machineName}
        #{heartbeatTime},#{implBean},#{machineId},#{machineCode},#{energyPrice},#{ruleId},#{communityId},#{machineName}
        )
    </insert>
@@ -19,11 +19,13 @@
    <select id="getChargeMachineInfo" parameterType="Map" resultType="Map">
        select t.heartbeat_time,t.heartbeat_time heartbeatTime,t.impl_bean,t.impl_bean
        implBean,t.machine_id,t.machine_id machineId,t.machine_code,t.machine_code
        machineCode,t.energy_price,t.energy_price energyPrice,t.duration_price,t.duration_price
        durationPrice,t.community_id,t.community_id
        machineCode,t.energy_price,t.energy_price energyPrice,t.rule_id,t.rule_id
        ruleId,t.community_id,t.community_id
        communityId,t.machine_name,t.machine_name machineName,cmf.factory_name factoryName,t.create_time createTime,
        cr.rule_name ruleName,
        count(1) portCount
        from charge_machine t
        left join charge_rule cr on t.rule_id = cr.rule_id and cr.status_cd = '0'
        left join charge_machine_factory cmf on t.impl_bean = cmf.factory_id and cmf.status_cd = '0'
        left join charge_machine_port cmp on t.machine_id = cmp.machine_id  and cmp.status_cd = '0'
        where 1 =1
@@ -42,8 +44,8 @@
        <if test="energyPrice !=null and energyPrice != ''">
            and t.energy_price= #{energyPrice}
        </if>
        <if test="durationPrice !=null and durationPrice != ''">
            and t.duration_price= #{durationPrice}
        <if test="ruleId !=null and ruleId != ''">
            and t.rule_id= #{ruleId}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
@@ -54,7 +56,8 @@
        <if test="machineName !=null and machineName != ''">
            and t.machine_name= #{machineName}
        </if>
        group by t.heartbeat_time,t.impl_bean,t.machine_id,t.machine_code,t.energy_price,t.duration_price,t.community_id,t.machine_name,cmf.factory_name ,t.create_time
        group by t.heartbeat_time,t.impl_bean,t.machine_id,t.machine_code,t.energy_price,t.rule_id,t.community_id,t.machine_name,
        cmf.factory_name ,t.create_time,cr.rule_name
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
@@ -81,8 +84,8 @@
        <if test="energyPrice !=null and energyPrice != ''">
            , t.energy_price= #{energyPrice}
        </if>
        <if test="durationPrice !=null and durationPrice != ''">
            , t.duration_price= #{durationPrice}
        <if test="ruleId !=null and ruleId != ''">
            , t.rule_id= #{ruleId}
        </if>
        <if test="communityId !=null and communityId != ''">
            , t.community_id= #{communityId}
@@ -117,8 +120,8 @@
        <if test="energyPrice !=null and energyPrice != ''">
            and t.energy_price= #{energyPrice}
        </if>
        <if test="durationPrice !=null and durationPrice != ''">
            and t.duration_price= #{durationPrice}
        <if test="ruleId !=null and ruleId != ''">
            and t.rule_id= #{ruleId}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
java110-db/src/main/resources/mapper/common/ChargeRuleFeeV1ServiceDaoImplMapper.xml
@@ -46,7 +46,7 @@
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        order by t.create_time desc
        order by t.duration_price
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachineCmd.java
@@ -72,8 +72,7 @@
        Assert.hasKeyAndValue(reqJson, "machineName", "请求报文中未包含machineName");
        Assert.hasKeyAndValue(reqJson, "machineCode", "请求报文中未包含machineCode");
        Assert.hasKeyAndValue(reqJson, "implBean", "请求报文中未包含implBean");
        Assert.hasKeyAndValue(reqJson, "durationPrice", "请求报文中未包含durationPrice");
        Assert.hasKeyAndValue(reqJson, "energyPrice", "请求报文中未包含energyPrice");
        Assert.hasKeyAndValue(reqJson, "ruleId", "请求报文中未包含ruleId");
        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
        Assert.hasKeyAndValue(reqJson, "portCount", "请求报文中未包含portCount");