瀏覽代碼

加入充电订单

Your Name 3 年之前
父節點
當前提交
48072b8b73

+ 146 - 0
java110-bean/src/main/java/com/java110/dto/chargeMachineOrder/ChargeMachineOrderDto.java

@@ -0,0 +1,146 @@
+package com.java110.dto.chargeMachineOrder;
+
+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 ChargeMachineOrderDto extends PageDto implements Serializable {
+
+    private String amount;
+private String orderId;
+private String remark;
+private String portId;
+private String personName;
+private String machineId;
+private String acctDetailId;
+private String personId;
+private String chargeHours;
+private String startTime;
+private String endTime;
+private String state;
+private String personTel;
+private String communityId;
+private String energy;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getAmount() {
+        return amount;
+    }
+public void setAmount(String amount) {
+        this.amount = amount;
+    }
+public String getOrderId() {
+        return orderId;
+    }
+public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getPortId() {
+        return portId;
+    }
+public void setPortId(String portId) {
+        this.portId = portId;
+    }
+public String getPersonName() {
+        return personName;
+    }
+public void setPersonName(String personName) {
+        this.personName = personName;
+    }
+public String getMachineId() {
+        return machineId;
+    }
+public void setMachineId(String machineId) {
+        this.machineId = machineId;
+    }
+public String getAcctDetailId() {
+        return acctDetailId;
+    }
+public void setAcctDetailId(String acctDetailId) {
+        this.acctDetailId = acctDetailId;
+    }
+public String getPersonId() {
+        return personId;
+    }
+public void setPersonId(String personId) {
+        this.personId = personId;
+    }
+public String getChargeHours() {
+        return chargeHours;
+    }
+public void setChargeHours(String chargeHours) {
+        this.chargeHours = chargeHours;
+    }
+public String getStartTime() {
+        return startTime;
+    }
+public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+public String getEndTime() {
+        return endTime;
+    }
+public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getPersonTel() {
+        return personTel;
+    }
+public void setPersonTel(String personTel) {
+        this.personTel = personTel;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getEnergy() {
+        return energy;
+    }
+public void setEnergy(String energy) {
+        this.energy = energy;
+    }
+
+
+    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;
+    }
+}

+ 145 - 0
java110-bean/src/main/java/com/java110/po/chargeMachineOrder/ChargeMachineOrderPo.java

@@ -0,0 +1,145 @@
+/*
+ * 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.chargeMachineOrder;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2023-03-08 02:24:15 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 ChargeMachineOrderPo implements Serializable {
+
+    private String amount;
+private String orderId;
+private String remark;
+private String statusCd = "0";
+private String portId;
+private String personName;
+private String machineId;
+private String acctDetailId;
+private String personId;
+private String chargeHours;
+private String startTime;
+private String endTime;
+private String state;
+private String personTel;
+private String communityId;
+private String energy;
+public String getAmount() {
+        return amount;
+    }
+public void setAmount(String amount) {
+        this.amount = amount;
+    }
+public String getOrderId() {
+        return orderId;
+    }
+public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getPortId() {
+        return portId;
+    }
+public void setPortId(String portId) {
+        this.portId = portId;
+    }
+public String getPersonName() {
+        return personName;
+    }
+public void setPersonName(String personName) {
+        this.personName = personName;
+    }
+public String getMachineId() {
+        return machineId;
+    }
+public void setMachineId(String machineId) {
+        this.machineId = machineId;
+    }
+public String getAcctDetailId() {
+        return acctDetailId;
+    }
+public void setAcctDetailId(String acctDetailId) {
+        this.acctDetailId = acctDetailId;
+    }
+public String getPersonId() {
+        return personId;
+    }
+public void setPersonId(String personId) {
+        this.personId = personId;
+    }
+public String getChargeHours() {
+        return chargeHours;
+    }
+public void setChargeHours(String chargeHours) {
+        this.chargeHours = chargeHours;
+    }
+public String getStartTime() {
+        return startTime;
+    }
+public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+public String getEndTime() {
+        return endTime;
+    }
+public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getPersonTel() {
+        return personTel;
+    }
+public void setPersonTel(String personTel) {
+        this.personTel = personTel;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getEnergy() {
+        return energy;
+    }
+public void setEnergy(String energy) {
+        this.energy = energy;
+    }
+
+
+
+}

+ 196 - 0
java110-db/src/main/resources/mapper/common/ChargeMachineOrderV1ServiceDaoImplMapper.xml

@@ -0,0 +1,196 @@
+<?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="chargeMachineOrderV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存充电桩订单信息 add by wuxw 2018-07-03 -->
+    <insert id="saveChargeMachineOrderInfo" parameterType="Map">
+        insert into charge_machine_order(
+amount,order_id,remark,port_id,person_name,machine_id,acct_detail_id,person_id,charge_hours,start_time,end_time,state,person_tel,community_id,energy
+) values (
+#{amount},#{orderId},#{remark},#{portId},#{personName},#{machineId},#{acctDetailId},#{personId},#{chargeHours},#{startTime},#{endTime},#{state},#{personTel},#{communityId},#{energy}
+)
+    </insert>
+
+
+
+    <!-- 查询充电桩订单信息 add by wuxw 2018-07-03 -->
+    <select id="getChargeMachineOrderInfo" parameterType="Map" resultType="Map">
+        select  t.amount,t.order_id,t.order_id orderId,t.remark,t.status_cd,t.status_cd statusCd,t.port_id,t.port_id portId,t.person_name,t.person_name personName,t.machine_id,t.machine_id machineId,t.acct_detail_id,t.acct_detail_id acctDetailId,t.person_id,t.person_id personId,t.charge_hours,t.charge_hours chargeHours,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.state,t.person_tel,t.person_tel personTel,t.community_id,t.community_id communityId,t.energy 
+from charge_machine_order t 
+where 1 =1 
+<if test="amount !=null and amount != ''">
+   and t.amount= #{amount}
+</if> 
+<if test="orderId !=null and orderId != ''">
+   and t.order_id= #{orderId}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="portId !=null and portId != ''">
+   and t.port_id= #{portId}
+</if> 
+<if test="personName !=null and personName != ''">
+   and t.person_name= #{personName}
+</if> 
+<if test="machineId !=null and machineId != ''">
+   and t.machine_id= #{machineId}
+</if> 
+<if test="acctDetailId !=null and acctDetailId != ''">
+   and t.acct_detail_id= #{acctDetailId}
+</if> 
+<if test="personId !=null and personId != ''">
+   and t.person_id= #{personId}
+</if> 
+<if test="chargeHours !=null and chargeHours != ''">
+   and t.charge_hours= #{chargeHours}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="personTel !=null and personTel != ''">
+   and t.person_tel= #{personTel}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="energy !=null and energy != ''">
+   and t.energy= #{energy}
+</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="updateChargeMachineOrderInfo" parameterType="Map">
+        update  charge_machine_order t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="amount !=null and amount != ''">
+, t.amount= #{amount}
+</if> 
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if> 
+<if test="portId !=null and portId != ''">
+, t.port_id= #{portId}
+</if> 
+<if test="personName !=null and personName != ''">
+, t.person_name= #{personName}
+</if> 
+<if test="machineId !=null and machineId != ''">
+, t.machine_id= #{machineId}
+</if> 
+<if test="acctDetailId !=null and acctDetailId != ''">
+, t.acct_detail_id= #{acctDetailId}
+</if> 
+<if test="personId !=null and personId != ''">
+, t.person_id= #{personId}
+</if> 
+<if test="chargeHours !=null and chargeHours != ''">
+, t.charge_hours= #{chargeHours}
+</if> 
+<if test="startTime !=null and startTime != ''">
+, t.start_time= #{startTime}
+</if> 
+<if test="endTime !=null and endTime != ''">
+, t.end_time= #{endTime}
+</if> 
+<if test="state !=null and state != ''">
+, t.state= #{state}
+</if> 
+<if test="personTel !=null and personTel != ''">
+, t.person_tel= #{personTel}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+<if test="energy !=null and energy != ''">
+, t.energy= #{energy}
+</if> 
+ where 1=1 <if test="orderId !=null and orderId != ''">
+and t.order_id= #{orderId}
+</if> 
+
+    </update>
+
+    <!-- 查询充电桩订单数量 add by wuxw 2018-07-03 -->
+     <select id="queryChargeMachineOrdersCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from charge_machine_order t 
+where 1 =1 
+<if test="amount !=null and amount != ''">
+   and t.amount= #{amount}
+</if> 
+<if test="orderId !=null and orderId != ''">
+   and t.order_id= #{orderId}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="portId !=null and portId != ''">
+   and t.port_id= #{portId}
+</if> 
+<if test="personName !=null and personName != ''">
+   and t.person_name= #{personName}
+</if> 
+<if test="machineId !=null and machineId != ''">
+   and t.machine_id= #{machineId}
+</if> 
+<if test="acctDetailId !=null and acctDetailId != ''">
+   and t.acct_detail_id= #{acctDetailId}
+</if> 
+<if test="personId !=null and personId != ''">
+   and t.person_id= #{personId}
+</if> 
+<if test="chargeHours !=null and chargeHours != ''">
+   and t.charge_hours= #{chargeHours}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="personTel !=null and personTel != ''">
+   and t.person_tel= #{personTel}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="energy !=null and energy != ''">
+   and t.energy= #{energy}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/common/IChargeMachineOrderV1InnerServiceSMO.java

@@ -0,0 +1,68 @@
+/*
+ * 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.common;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.chargeMachineOrder.ChargeMachineOrderDto;
+import com.java110.po.chargeMachineOrder.ChargeMachineOrderPo;
+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 2023-03-08 02:24:15 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 = "common-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/chargeMachineOrderV1Api")
+public interface IChargeMachineOrderV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveChargeMachineOrder", method = RequestMethod.POST)
+    public int saveChargeMachineOrder(@RequestBody  ChargeMachineOrderPo chargeMachineOrderPo);
+
+    @RequestMapping(value = "/updateChargeMachineOrder", method = RequestMethod.POST)
+    public int updateChargeMachineOrder(@RequestBody  ChargeMachineOrderPo chargeMachineOrderPo);
+
+    @RequestMapping(value = "/deleteChargeMachineOrder", method = RequestMethod.POST)
+    public int deleteChargeMachineOrder(@RequestBody  ChargeMachineOrderPo chargeMachineOrderPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param chargeMachineOrderDto 数据对象分享
+     * @return ChargeMachineOrderDto 对象数据
+     */
+    @RequestMapping(value = "/queryChargeMachineOrders", method = RequestMethod.POST)
+    List<ChargeMachineOrderDto> queryChargeMachineOrders(@RequestBody ChargeMachineOrderDto chargeMachineOrderDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param chargeMachineOrderDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryChargeMachineOrdersCount", method = RequestMethod.POST)
+    int queryChargeMachineOrdersCount(@RequestBody ChargeMachineOrderDto chargeMachineOrderDto);
+}

+ 82 - 0
service-common/src/main/java/com/java110/common/cmd/chargeMachine/ListChargeMachineOrderCmd.java

@@ -0,0 +1,82 @@
+/*
+ * 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.common.cmd.chargeMachine;
+
+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.common.IChargeMachineOrderV1InnerServiceSMO;
+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.chargeMachineOrder.ChargeMachineOrderDto;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:chargeMachineOrder.listChargeMachineOrder
+ * 请求路劲:/app/chargeMachineOrder.ListChargeMachineOrder
+ * add by 吴学文 at 2023-03-08 02:24:15 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 = "chargeMachine.listChargeMachineOrder")
+public class ListChargeMachineOrderCmd extends Cmd {
+
+  private static Logger logger = LoggerFactory.getLogger(ListChargeMachineOrderCmd.class);
+    @Autowired
+    private IChargeMachineOrderV1InnerServiceSMO chargeMachineOrderV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           ChargeMachineOrderDto chargeMachineOrderDto = BeanConvertUtil.covertBean(reqJson, ChargeMachineOrderDto.class);
+
+           int count = chargeMachineOrderV1InnerServiceSMOImpl.queryChargeMachineOrdersCount(chargeMachineOrderDto);
+
+           List<ChargeMachineOrderDto> chargeMachineOrderDtos = null;
+
+           if (count > 0) {
+               chargeMachineOrderDtos = chargeMachineOrderV1InnerServiceSMOImpl.queryChargeMachineOrders(chargeMachineOrderDto);
+           } else {
+               chargeMachineOrderDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, chargeMachineOrderDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 77 - 0
service-common/src/main/java/com/java110/common/dao/IChargeMachineOrderV1ServiceDao.java

@@ -0,0 +1,77 @@
+/*
+ * 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.common.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2023-03-08 02:24:15 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 IChargeMachineOrderV1ServiceDao {
+
+
+    /**
+     * 保存 充电桩订单信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveChargeMachineOrderInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询充电桩订单信息(instance过程)
+     * 根据bId 查询充电桩订单信息
+     * @param info bId 信息
+     * @return 充电桩订单信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getChargeMachineOrderInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改充电桩订单信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateChargeMachineOrderInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询充电桩订单总数
+     *
+     * @param info 充电桩订单信息
+     * @return 充电桩订单数量
+     */
+    int queryChargeMachineOrdersCount(Map info);
+
+}

+ 112 - 0
service-common/src/main/java/com/java110/common/dao/impl/ChargeMachineOrderV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * 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.common.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.common.dao.IChargeMachineOrderV1ServiceDao;
+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 2023-03-08 02:24:15 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("chargeMachineOrderV1ServiceDaoImpl")
+public class ChargeMachineOrderV1ServiceDaoImpl extends BaseServiceDao implements IChargeMachineOrderV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ChargeMachineOrderV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存充电桩订单信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveChargeMachineOrderInfo(Map info) throws DAOException {
+        logger.debug("保存 saveChargeMachineOrderInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("chargeMachineOrderV1ServiceDaoImpl.saveChargeMachineOrderInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询充电桩订单信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getChargeMachineOrderInfo(Map info) throws DAOException {
+        logger.debug("查询 getChargeMachineOrderInfo 入参 info : {}",info);
+
+        List<Map> businessChargeMachineOrderInfos = sqlSessionTemplate.selectList("chargeMachineOrderV1ServiceDaoImpl.getChargeMachineOrderInfo",info);
+
+        return businessChargeMachineOrderInfos;
+    }
+
+
+    /**
+     * 修改充电桩订单信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateChargeMachineOrderInfo(Map info) throws DAOException {
+        logger.debug("修改 updateChargeMachineOrderInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("chargeMachineOrderV1ServiceDaoImpl.updateChargeMachineOrderInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询充电桩订单数量
+     * @param info 充电桩订单信息
+     * @return 充电桩订单数量
+     */
+    @Override
+    public int queryChargeMachineOrdersCount(Map info) {
+        logger.debug("查询 queryChargeMachineOrdersCount 入参 info : {}",info);
+
+        List<Map> businessChargeMachineOrderInfos = sqlSessionTemplate.selectList("chargeMachineOrderV1ServiceDaoImpl.queryChargeMachineOrdersCount", info);
+        if (businessChargeMachineOrderInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessChargeMachineOrderInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-common/src/main/java/com/java110/common/smo/impl/ChargeMachineOrderV1InnerServiceSMOImpl.java

@@ -0,0 +1,89 @@
+/*
+ * 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.common.smo.impl;
+
+
+import com.java110.common.dao.IChargeMachineOrderV1ServiceDao;
+import com.java110.intf.common.IChargeMachineOrderV1InnerServiceSMO;
+import com.java110.dto.chargeMachineOrder.ChargeMachineOrderDto;
+import com.java110.po.chargeMachineOrder.ChargeMachineOrderPo;
+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 2023-03-08 02:24:15 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 ChargeMachineOrderV1InnerServiceSMOImpl extends BaseServiceSMO implements IChargeMachineOrderV1InnerServiceSMO {
+
+    @Autowired
+    private IChargeMachineOrderV1ServiceDao chargeMachineOrderV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveChargeMachineOrder(@RequestBody  ChargeMachineOrderPo chargeMachineOrderPo) {
+        int saveFlag = chargeMachineOrderV1ServiceDaoImpl.saveChargeMachineOrderInfo(BeanConvertUtil.beanCovertMap(chargeMachineOrderPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateChargeMachineOrder(@RequestBody  ChargeMachineOrderPo chargeMachineOrderPo) {
+        int saveFlag = chargeMachineOrderV1ServiceDaoImpl.updateChargeMachineOrderInfo(BeanConvertUtil.beanCovertMap(chargeMachineOrderPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteChargeMachineOrder(@RequestBody  ChargeMachineOrderPo chargeMachineOrderPo) {
+       chargeMachineOrderPo.setStatusCd("1");
+       int saveFlag = chargeMachineOrderV1ServiceDaoImpl.updateChargeMachineOrderInfo(BeanConvertUtil.beanCovertMap(chargeMachineOrderPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<ChargeMachineOrderDto> queryChargeMachineOrders(@RequestBody  ChargeMachineOrderDto chargeMachineOrderDto) {
+
+        //校验是否传了 分页信息
+
+        int page = chargeMachineOrderDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            chargeMachineOrderDto.setPage((page - 1) * chargeMachineOrderDto.getRow());
+        }
+
+        List<ChargeMachineOrderDto> chargeMachineOrders = BeanConvertUtil.covertBeanList(chargeMachineOrderV1ServiceDaoImpl.getChargeMachineOrderInfo(BeanConvertUtil.beanCovertMap(chargeMachineOrderDto)), ChargeMachineOrderDto.class);
+
+        return chargeMachineOrders;
+    }
+
+
+    @Override
+    public int queryChargeMachineOrdersCount(@RequestBody ChargeMachineOrderDto chargeMachineOrderDto) {
+        return chargeMachineOrderV1ServiceDaoImpl.queryChargeMachineOrdersCount(BeanConvertUtil.beanCovertMap(chargeMachineOrderDto));    }
+
+}