diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingStationController.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingStationController.java index 2aeb4396..e378e625 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingStationController.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingStationController.java @@ -144,8 +144,8 @@ public class XhpcChargingStationController extends BaseController { * @param xhpcChargingStationDto * @return */ - @GetMapping(value = "/addXhpcChargingStation") - public AjaxResult addXhpcChargingStation(@Param("xhpcChargingStationDto") XhpcChargingStationDto xhpcChargingStationDto) + @PostMapping(value = "/addXhpcChargingStation") + public AjaxResult addXhpcChargingStation(@RequestBody XhpcChargingStationDto xhpcChargingStationDto) { return xhpcChargingStationService.addXhpcChargingStation(xhpcChargingStationDto); } diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcChargingStation.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcChargingStation.java index 49137334..50cfe7f3 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcChargingStation.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcChargingStation.java @@ -54,7 +54,7 @@ public class XhpcChargingStation extends BaseEntity { private String detailedAddress; /** 进度 */ - @Excel(name = "进度") + @Excel(name = "经度") private String longitude; /** 维度 */ diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcRateModel.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcRateModel.java new file mode 100644 index 00000000..7f5bbb2a --- /dev/null +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcRateModel.java @@ -0,0 +1,54 @@ +package com.xhpc.charging.station.domain; + +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 费率模板 xhpc_rate_model + * + * @author yuyang + * @date 2021-07-24 + */ +public class XhpcRateModel extends BaseEntity { + + /** 费率模板id */ + private Long rateModelId; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private Integer status; + + /** 删除标志(0代表存在 2代表删除) */ + private Integer delFlag; + + public Integer getStatus() { + + return status; + } + + public void setStatus(Integer status) { + + this.status = status; + } + + public Integer getDelFlag() { + + return delFlag; + } + + public void setDelFlag(Integer delFlag) { + + this.delFlag = delFlag; + } + + public Long getRateModelId() { + + return rateModelId; + } + + public void setRateModelId(Long rateModelId) { + + this.rateModelId = rateModelId; + } + +} diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcRateTime.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcRateTime.java index f74249f3..16c44f2a 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcRateTime.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/domain/XhpcRateTime.java @@ -1,6 +1,7 @@ package com.xhpc.charging.station.domain; import com.ruoyi.common.core.web.domain.BaseEntity; +import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/dto/XhpcChargingStationDto.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/dto/XhpcChargingStationDto.java index 1cfab8a3..3ecf5656 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/dto/XhpcChargingStationDto.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/dto/XhpcChargingStationDto.java @@ -1,37 +1,48 @@ package com.xhpc.charging.station.dto; import com.xhpc.charging.station.domain.XhpcChargingStation; -import com.xhpc.charging.station.domain.XhpcRate; -import com.xhpc.charging.station.domain.XhpcRateTime; import java.util.List; public class XhpcChargingStationDto extends XhpcChargingStation { //费率 - List xhpcRateList; + List xhpcRateList; //费率时段 - List xhpcRateTimeList; + List xhpcRateTimeList; - public List getXhpcRateList() { + //默认时段费率 + Long defaultPeriodId; + + public List getXhpcRateList() { return xhpcRateList; } - public void setXhpcRateList(List xhpcRateList) { + public void setXhpcRateList(List xhpcRateList) { this.xhpcRateList = xhpcRateList; } - public List getXhpcRateTimeList() { + public List getXhpcRateTimeList() { return xhpcRateTimeList; } - public void setXhpcRateTimeList(List xhpcRateTimeList) { + public void setXhpcRateTimeList(List xhpcRateTimeList) { this.xhpcRateTimeList = xhpcRateTimeList; } + public Long getDefaultPeriodId() { + + return defaultPeriodId; + } + + public void setDefaultPeriodId(Long defaultPeriodId) { + + this.defaultPeriodId = defaultPeriodId; + } + } diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/dto/XhpcRateDto.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/dto/XhpcRateDto.java new file mode 100644 index 00000000..8c6e0d93 --- /dev/null +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/dto/XhpcRateDto.java @@ -0,0 +1,62 @@ +package com.xhpc.charging.station.dto; + +import java.math.BigDecimal; + +/** + * 费率 + */ +public class XhpcRateDto { + + /** 费率id(非数据库id,用于绑定费率时段使用) */ + private Long id; + + /** 费率名称 */ + private String name; + + /** 电费 */ + private BigDecimal powerFee; + + /** 服务费 */ + private BigDecimal serviceFee; + + public Long getId() { + + return id; + } + + public void setId(Long id) { + + this.id = id; + } + + public String getName() { + + return name; + } + + public void setName(String name) { + + this.name = name; + } + + public BigDecimal getPowerFee() { + + return powerFee; + } + + public void setPowerFee(BigDecimal powerFee) { + + this.powerFee = powerFee; + } + + public BigDecimal getServiceFee() { + + return serviceFee; + } + + public void setServiceFee(BigDecimal serviceFee) { + + this.serviceFee = serviceFee; + } + +} diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/dto/XhpcRateTimeDto.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/dto/XhpcRateTimeDto.java new file mode 100644 index 00000000..6d1fb3f7 --- /dev/null +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/dto/XhpcRateTimeDto.java @@ -0,0 +1,49 @@ +package com.xhpc.charging.station.dto; + +import java.util.Date; + +/** + * 费率时段 + */ +public class XhpcRateTimeDto { + + /** 启始时间 */ + private String startTime; + + /** 结束时间 */ + private String endTime; + + /** 费率id(非数据库id,用于绑定费率使用) */ + private Long id; + + 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 Long getId() { + + return id; + } + + public void setId(Long id) { + + this.id = id; + } + +} diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingStationMapper.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingStationMapper.java index 283f3743..1eff4fce 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingStationMapper.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingStationMapper.java @@ -1,6 +1,9 @@ package com.xhpc.charging.station.mapper; import com.xhpc.charging.station.domain.XhpcChargingStation; +import com.xhpc.charging.station.domain.XhpcRate; +import com.xhpc.charging.station.domain.XhpcRateModel; +import com.xhpc.charging.station.domain.XhpcRateTime; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -141,4 +144,26 @@ public interface XhpcChargingStationMapper { * @return 电站 */ List> getXhpcTerminalMassage(@Param("chargingStationId")Long chargingStationId); + + + /** + * 添加费率模型 + */ + int addXhpcRateModel(XhpcRateModel xhpcRateModel); + + /** + * 添加场站信息 + */ + int addXhpcChargingStation(XhpcChargingStation xhpcChargingStation); + + /** + * 添加费率 + */ + int addXhpcRate(XhpcRate xhpcRate); + + + /** + * 添加费率时段 + */ + int addXhpcRateTime(XhpcRateTime xhpcRateTime); } diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcRateModelMapper.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcRateModelMapper.java new file mode 100644 index 00000000..234435c6 --- /dev/null +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcRateModelMapper.java @@ -0,0 +1,10 @@ +package com.xhpc.charging.station.mapper; +/** + * 费率模板Mapper接口 + * + * @author yuyang + * @date 2021-07-24 + */ +public interface XhpcRateModelMapper { + +} diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcRateModelService.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcRateModelService.java new file mode 100644 index 00000000..8c586703 --- /dev/null +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcRateModelService.java @@ -0,0 +1,11 @@ +package com.xhpc.charging.station.service; + +/** + * 费率模板Service接口 + * + * @author yuyang + * @date 2021-07-24 + */ +public interface IXhpcRateModelService { + +} diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java index 2153d1e0..1b50f452 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java @@ -4,13 +4,21 @@ import cn.hutool.core.date.DateUtil; import com.ruoyi.common.core.utils.DateUtils; import com.ruoyi.common.core.web.domain.AjaxResult; import com.xhpc.charging.station.domain.XhpcChargingStation; +import com.xhpc.charging.station.domain.XhpcRate; +import com.xhpc.charging.station.domain.XhpcRateModel; import com.xhpc.charging.station.domain.XhpcRateTime; import com.xhpc.charging.station.dto.XhpcChargingStationDto; +import com.xhpc.charging.station.dto.XhpcRateDto; +import com.xhpc.charging.station.dto.XhpcRateTimeDto; import com.xhpc.charging.station.mapper.XhpcChargingStationMapper; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * 电站Service业务层处理 @@ -180,8 +188,43 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi } @Override + @Transactional public AjaxResult addXhpcChargingStation(XhpcChargingStationDto xhpcChargingStationDto) { + if(xhpcChargingStationDto.getName()==null || "".equals(xhpcChargingStationDto.getName())){ + return AjaxResult.error(1001,"电站名称不能为空"); + } + if(xhpcChargingStationDto.getOperatorId()==null){ + return AjaxResult.error(1001,"运营商不能为空"); + } + if(xhpcChargingStationDto.getAreaCode()==null){ + return AjaxResult.error(1001,"电站地址不能为空"); + } + if(xhpcChargingStationDto.getAddress()==null){ + return AjaxResult.error(1001,"详细地址不能为空"); + } + if(xhpcChargingStationDto.getServiceFacilities()==null){ + return AjaxResult.error(1001,"服务设施不能为空"); + } + if(xhpcChargingStationDto.getSerialNumber()==null){ + return AjaxResult.error(1001,"站编号不能为空"); + } + if(xhpcChargingStationDto.getParkingInstructions()==null){ + return AjaxResult.error(1001,"停车说明不能为空"); + } + if(xhpcChargingStationDto.getPbusinessInstructions()==null){ + return AjaxResult.error(1001,"营业时间说明不能为空"); + } + if(xhpcChargingStationDto.getReminderInstructions()==null){ + return AjaxResult.error(1001,"温馨提示说明不能为空"); + } + if(xhpcChargingStationDto.getRemark()==null){ + return AjaxResult.error(1001,"备注不能为空"); + } + if(xhpcChargingStationDto.getImgId()==null){ + return AjaxResult.error(1001,"图片不能为空"); + } + //判断费率和费率时间段 是否有值 if(xhpcChargingStationDto.getXhpcRateList() ==null && xhpcChargingStationDto.getXhpcRateList().size()==0){ return AjaxResult.error(1001,"费率不能为空"); @@ -189,30 +232,142 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi if(xhpcChargingStationDto.getXhpcRateTimeList() ==null && xhpcChargingStationDto.getXhpcRateTimeList().size()==0){ return AjaxResult.error(1001,"费率时段不能为空"); } - List xhpcRateTimeList = xhpcChargingStationDto.getXhpcRateTimeList(); + List xhpcRateTimeList = xhpcChargingStationDto.getXhpcRateTimeList(); - boolean s =false; for (int i = 0; i < xhpcRateTimeList.size(); i++) { - XhpcRateTime xhpcRateTime = xhpcRateTimeList.get(i); - - - + XhpcRateTimeDto xhpcRateTime = xhpcRateTimeList.get(i); + String start = xhpcRateTime.getStartTime(); + String end = xhpcRateTime.getEndTime(); + //检查格式,正则验证 【[0-2][0-9]:[0-6][0]:[0]{2}】 + String pattern ="^([0-2][0-9]:([0]|[3])[0]:[0][0])"; + Pattern compile = Pattern.compile(pattern); + Matcher m =compile.matcher(start); + boolean isMatch = m.matches(); + if(!isMatch){ + return AjaxResult.error("1003","时间格式不对"); + } + Matcher m1 =compile.matcher(end); + boolean isMatch1 = m1.matches(); + if(!isMatch1){ + return AjaxResult.error("1003","时间格式不对"); + } + //判断结束时间是否小于开始时间 + Date startTime = DateUtil.parse(start); + Date endTime = DateUtil.parse(end); + if(startTime.getTime()>endTime.getTime()){ + return AjaxResult.error("1002","开始时间不能大于结束时间"); + } + } + //判断是否有重叠 + for (int i = 0; i < xhpcRateTimeList.size(); i++) { + XhpcRateTimeDto xhpcRateTimeOne = xhpcRateTimeList.get(i); + Date startOne = DateUtil.parse(xhpcRateTimeOne.getStartTime()); + Date endOne = DateUtil.parse(xhpcRateTimeOne.getEndTime()); + for (int j = i+1; j < xhpcRateTimeList.size(); j++) { + XhpcRateTimeDto xhpcRateTimeTwo = xhpcRateTimeList.get(j); + Date startTwo = DateUtil.parse(xhpcRateTimeTwo.getStartTime()); + Date endTwo = DateUtil.parse(xhpcRateTimeTwo.getEndTime()); + if (DateUtil.compare(startOne, endTwo)<0&&DateUtil.compare(startTwo, endOne)<0){ + return AjaxResult.error("1003","时间段有重叠"); + } + } } - //判断开始时间是否有00:00 + //添加费率计费模型 + XhpcRateModel xhpcRateModel = new XhpcRateModel(); + BeanUtils.copyProperties(xhpcChargingStationDto,xhpcRateModel); + int i = xhpcChargingStationMapper.addXhpcRateModel(xhpcRateModel); + if(i==0){ + return AjaxResult.error("1004","费率计费模型添加失败"); + } + //费率模型id + Long rateModelId = xhpcRateModel.getRateModelId(); + //添加电站基本信息 + XhpcChargingStation xhpcChargingStation =new XhpcChargingStation(); + BeanUtils.copyProperties(xhpcChargingStationDto,xhpcChargingStation); + xhpcChargingStation.setRateModelId(rateModelId); + int j = xhpcChargingStationMapper.addXhpcChargingStation(xhpcChargingStation); + if(j==0){ + return AjaxResult.error("1003","电站基本信息添加失败"); + } + Long chargingStationId = xhpcChargingStation.getChargingStationId(); + //添加费率 + Map map =new HashMap<>(); + List xhpcRateList = xhpcChargingStationDto.getXhpcRateList(); + for (int k = 0; k < xhpcRateList.size(); k++) { + //存费率信息,并存储Map,费率时段使用,找到费率id + XhpcRateDto xhpcRateDto = xhpcRateList.get(k); + XhpcRate xhpcRate =new XhpcRate(); + xhpcRate.setChargingStationId(chargingStationId); + xhpcRate.setName(xhpcRateDto.getName()); + xhpcRate.setPowerFee(xhpcRateDto.getPowerFee()); + xhpcRate.setServiceFee(xhpcRateDto.getServiceFee()); + xhpcRate.setRateModelId(rateModelId); + xhpcChargingStationMapper.addXhpcRate(xhpcRate); + map.put(xhpcRateDto.getId(),xhpcRate.getRateId()); + } - - //判断结束时间是否小于开始时间 - //检查格式是否正确 - //冒泡排序(结束时间小于开始时间) + //添加费率时段 + //冒泡排序(结束时间小于开始时间排前面) + //存费率时段,从Map中获取费率id //每个时间段都要存 //返回计费模型 24:00 转成 00:00 + XhpcRateTimeDto [] xhpcRateTimeDtosArr =new XhpcRateTimeDto[xhpcRateTimeList.size()]; + xhpcRateTimeList.toArray(xhpcRateTimeDtosArr); + XhpcRateTimeDto [] xhpcRateTimeDtos = bubbleSort(xhpcRateTimeDtosArr); + //排序好的费率时段 + List list = Arrays.asList(xhpcRateTimeDtos); + //默认时段费率Id + Long defaultPeriodId=null; + if(xhpcChargingStationDto.getDefaultPeriodId() !=null){ + defaultPeriodId=map.get(xhpcChargingStationDto.getDefaultPeriodId()); + } + int sort =1; + for (int k = 0; k < list.size(); k++) { + XhpcRateTimeDto xhpcRateTimeDto = list.get(k); + String startTime = xhpcRateTimeDto.getStartTime(); + String endTime = xhpcRateTimeDto.getEndTime(); + Long defaultPeriodIdMap = map.get(xhpcRateTimeDto.getId()); + if(k==0){ + if(!"00:00:00".equals(xhpcRateTimeDto.getStartTime())){ + //添加一条默认费率时段 + sort = addXhpcRateTime(rateModelId,defaultPeriodId,"00:00:00",startTime,sort); + } + //并把本条数据也添加上 + sort = addXhpcRateTime(rateModelId,defaultPeriodIdMap,startTime,endTime,sort); + }else{ + //判断上条数据的结束时间是否等于现在这条数据的开始时间,不等于添加一条默认费率时段 + String endTimeK = list.get(k - 1).getEndTime(); + if(!endTimeK.equals(startTime)){ + //添加一条默认费率时段 + sort = addXhpcRateTime(rateModelId,defaultPeriodId,endTimeK,startTime,sort); + } + //并把本条数据也添加上 + sort = addXhpcRateTime(rateModelId,defaultPeriodIdMap,startTime,endTime,sort); + if(k==(list.size()-1) && !endTimeK.equals("24:00:00")){ + //添加一条默认费率时段 + sort = addXhpcRateTime(rateModelId,defaultPeriodId,startTime,"24:00:00",sort); + } + } + } + return AjaxResult.success(); + } - - return null; + private int addXhpcRateTime(Long rateModelId, Long defaultPeriodId,String startTime,String endTime, int sort) { + XhpcRateTime xhpcRateTime =new XhpcRateTime(); + xhpcRateTime.setRateId(defaultPeriodId); + Date start = DateUtil.parse(startTime); + xhpcRateTime.setStartTime(start); + Date emd = DateUtil.parse(endTime); + xhpcRateTime.setEndTime(emd); + xhpcRateTime.setRateTimeId(rateModelId); + xhpcRateTime.setSort(sort); + xhpcChargingStationMapper.addXhpcRateTime(xhpcRateTime); + sort++; + return sort; } @Override @@ -312,4 +467,26 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi return list; } + public static XhpcRateTimeDto [] bubbleSort(XhpcRateTimeDto [] args){ + //冒泡排序算法 + for(int i=0;iDateUtil.parse(end).getTime()){ + XhpcRateTimeDto temp=args[i]; + + args[i]=args[j]; + + args[j]=temp; + + } + } + } + return args; + } + + + } diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcRateModelServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcRateModelServiceImpl.java new file mode 100644 index 00000000..afa957f1 --- /dev/null +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcRateModelServiceImpl.java @@ -0,0 +1,13 @@ +package com.xhpc.charging.station.service; + +import org.springframework.stereotype.Service; +/** + * 费率模板Service业务层处理 + * + * @author yuyang + * @date 2021-07-24 + */ +@Service +public class XhpcRateModelServiceImpl implements IXhpcRateModelService{ + +} diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml index 79113b7b..eaa252b6 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml @@ -265,4 +265,372 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join xhpc_charging_pile as cp on cp.charging_pile_id = te.charging_pile_id where te.charging_station_id =#{chargingStationId} and te.status=0 and te.del_flag=0 + + + insert into xhpc_rate_model + + + status, + + + del_flag, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + remark + + + + + #{status}, + + + #{delFlag}, + + + #{createTime}, + + + #{createBy}, + + + #{updateTime}, + + + #{updateBy}, + + + #{remark} + + + + + + insert into xhpc_charging_station + + + name, + + + operator_id, + + + type, + + + construction_site, + + + service_facilities, + + + periphery_facilities, + + + area_code, + + + address, + + + detailed_address, + + + longitude, + + + latitude, + + + parking_instructions, + + + serial_number, + + + client_visible, + + + rate_model_id, + + + img_id, + + + business_instructions, + + + reminder_instructions, + + + status, + + + del_flag, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + remark + + + + + #{name}, + + + #{operatorId}, + + + #{type}, + + + #{constructionSite}, + + + #{serviceFacilities}, + + + #{peripheryFacilities}, + + + #{areaCode}, + + + #{address}, + + + #{detailedAddress}, + + + #{longitude}, + + + #{latitude}, + + + #{parkingInstructions}, + + + #{serialNumber}, + + + #{clientVisible}, + + + #{rateModelId}, + + + #{imgId}, + + + #{pbusinessInstructions}, + + + #{reminderInstructions}, + + + #{status}, + + + #{delFlag}, + + + #{createTime}, + + + #{createBy}, + + + #{updateTime}, + + + #{updateBy}, + + + #{remark} + + + + + + insert into xhpc_rate + + + charging_station_id, + + + power_fee, + + + service_fee, + + + name, + + + del_flag, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + remark + + + + + #{chargingStationId}, + + + #{powerFee}, + + + #{serviceFee}, + + + #{name}, + + + #{status}, + + + #{delFlag}, + + + #{createTime}, + + + #{createBy}, + + + #{updateTime}, + + + #{updateBy}, + + + #{remark} + + + + + + + insert into xhpc_rate_time + + + charging_station_id, + + + rate_id, + + + start_time, + + + end_time, + + + rate_model_id, + + + sort, + + + status, + + + del_flag, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + remark + + + + + #{chargingStationId}, + + + #{rateId}, + + + #{startTime}, + + + #{endTime}, + + + #{rateModelId}, + + + sort, + + + #{status}, + + + #{delFlag}, + + + #{createTime}, + + + #{createBy}, + + + #{updateTime}, + + + #{updateBy}, + + + #{remark} + + + + + \ No newline at end of file diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcRateModelMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcRateModelMapper.xml new file mode 100644 index 00000000..3aa478c1 --- /dev/null +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcRateModelMapper.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + \ No newline at end of file