修改定时计费模型
This commit is contained in:
parent
0952849a93
commit
fafee173a6
@ -141,7 +141,6 @@ public class XhpcTimingChargingModelServiceImpl extends BaseService implements I
|
||||
XhpcTimingChargingModel xhpcTimingChargingModel =new XhpcTimingChargingModel();
|
||||
xhpcTimingChargingModel.setReason(xhpcTimingChargingModelDto.getReason());
|
||||
xhpcTimingChargingModel.setTimingTime(xhpcTimingChargingModelDto.getTimingTime());
|
||||
xhpcTimingChargingModel.setTenantId(loginUser.getTenantId());
|
||||
xhpcTimingChargingModel.setCreateTime(new Date());
|
||||
xhpcTimingChargingModel.setChargingStationId(chargingStationId);
|
||||
if(xhpcTimingChargingModelDto.getTimingChargingModelId() !=null){
|
||||
@ -346,6 +345,8 @@ public class XhpcTimingChargingModelServiceImpl extends BaseService implements I
|
||||
}
|
||||
}
|
||||
xhpcTimingChargingCacheRateModel.setTfPricesSeq(st.toString());
|
||||
xhpcTimingChargingCacheRateModel.setChargingStationId(chargingStationId);
|
||||
xhpcTimingChargingCacheRateModel.setPhone(xhpcTimingChargingModelDto.getPhone());
|
||||
xhpcTimingChargingModelMapper.insertXhpcTimingChargingCacheRateModel(xhpcTimingChargingCacheRateModel);
|
||||
return R.ok();
|
||||
}
|
||||
@ -517,7 +518,7 @@ public class XhpcTimingChargingModelServiceImpl extends BaseService implements I
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.fail("添加费率入缓存失败,请稍后在试");
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
public static XhpcRateTimeDto[] bubbleSort(XhpcRateTimeDto[] args) {
|
||||
|
||||
@ -40,21 +40,46 @@
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="chargingStationId" column="charging_station_id"/>
|
||||
<result property="phone" column="phone"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="TimingChargingRateMap" type="com.xhpc.common.domain.XhpcTimingChargingRate">
|
||||
<result property="timingChargingRateId" column="timing_charging_cache_rate_model_id"/>
|
||||
<result property="chargingStationId" column="timing_charging_model_id"/>
|
||||
<result property="powerFee" column="one_price"/>
|
||||
<result property="serviceFee" column="one_svc_price"/>
|
||||
<result property="name" column="two_price"/>
|
||||
<result property="status" column="two_svc_price"/>
|
||||
<result property="delFlag" column="three_price"/>
|
||||
<result property="timingChargingModelId" column="three_svc_price"/>
|
||||
<result property="rateValue" column="four_price"/>
|
||||
<result property="tenantId" column="four_svc_price"/>
|
||||
<result property="powerFee" column="power_fee"/>
|
||||
<result property="serviceFee" column="service_fee"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="rateValue" column="rate_value"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="TimingChargingTimeMap" type="com.xhpc.common.domain.XhpcTimingChargingTime">
|
||||
<result property="timingChargingTimeId" column="timing_charging_time_id"/>
|
||||
<result property="chargingStationId" column="timing_charging_model_id"/>
|
||||
<result property="chargingStationId" column="charging_station_id"/>
|
||||
<result property="timingChargingRateId" column="timing_charging_rate_id"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="rateValue" column="rate_value"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="rateValue" column="rate_value"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="list" resultType="map">
|
||||
select
|
||||
@ -409,7 +434,13 @@
|
||||
update_by,
|
||||
</if>
|
||||
<if test="null != remark and '' != remark">
|
||||
remark
|
||||
remark,
|
||||
</if>
|
||||
<if test="null != chargingStationId and '' != chargingStationId">
|
||||
charging_station_id,
|
||||
</if>
|
||||
<if test="null != phone and '' != phone">
|
||||
phone,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@ -471,7 +502,13 @@
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="null != remark and '' != remark">
|
||||
#{remark}
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="null != chargingStationId and '' != chargingStationId">
|
||||
#{chargingStationId},
|
||||
</if>
|
||||
<if test="null != phone and '' != phone">
|
||||
#{phone},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
@ -558,9 +595,7 @@
|
||||
|
||||
<select id="getXhpcTimingChargingModelId" resultMap="CacheRatetMap">
|
||||
select
|
||||
crm.*,
|
||||
tcm.charging_station_id chargingStationId,
|
||||
tcm.phone phone
|
||||
crm.*
|
||||
from xhpc_timing_charging_cache_rate_model crm
|
||||
join xhpc_timing_charging_model tcm on crm.timing_charging_model_id = tcm.timing_charging_model_id and tcm.status =0 and tcm.del_flag =0 and now() > tcm.timing_time
|
||||
where crm.del_flag=0
|
||||
@ -621,6 +656,8 @@
|
||||
select * from xhpc_timing_charging_rate where del_flag =0 and timing_charging_model_id =#{timingChargingModelId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getTimeTimingChargingModelId" resultMap="TimingChargingTimeMap">
|
||||
select * from xhpc_timing_charging_time where del_flag =0 and timing_charging_model_id =#{timingChargingModelId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user