机构增加折扣类型
This commit is contained in:
parent
0eedecc4ef
commit
1329355111
@ -1290,5 +1290,10 @@ DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
|
|||||||
ROW_FORMAT=Dynamic
|
ROW_FORMAT=Dynamic
|
||||||
;
|
;
|
||||||
|
|
||||||
|
ALTER TABLE `xhpc_community`
|
||||||
|
ADD COLUMN `commission_type` INT(4) NULL COMMENT ' 0总金额提成 1服务费提成 2电量抽成' AFTER `tenant_id`;
|
||||||
|
|
||||||
|
ALTER TABLE `xhpc_customers`
|
||||||
|
ADD COLUMN `commission_type` INT(4) NULL COMMENT '0总金额提成 1服务费提成 2电量抽成' AFTER `tenant_id`;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1285,33 +1285,4 @@ public class XhpcChargingStationServiceImpl extends BaseService implements IXhpc
|
|||||||
return xhpcChargingStation != null;
|
return xhpcChargingStation != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
//时间差
|
|
||||||
// String startTime="01:00:00";
|
|
||||||
// String split = startTime.split(":")[0];
|
|
||||||
// System.out.println("split:"+split);
|
|
||||||
// int num= Integer.valueOf(split);
|
|
||||||
//
|
|
||||||
// System.out.println(num);
|
|
||||||
|
|
||||||
|
|
||||||
int i =0;
|
|
||||||
i++;
|
|
||||||
System.out.println("111????????????????"+i);
|
|
||||||
i=i++;
|
|
||||||
System.out.println("222????????????????"+i);
|
|
||||||
int number =23;
|
|
||||||
|
|
||||||
int mins = number % 60;
|
|
||||||
int hours = number / 60;
|
|
||||||
if(hours>0){
|
|
||||||
System.out.println("111");
|
|
||||||
System.out.println(hours+"小时"+mins+"分钟");
|
|
||||||
}else{
|
|
||||||
System.out.println("222");
|
|
||||||
System.out.println(mins+"分钟");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -411,6 +411,7 @@ public class XhpcTimingChargingModelServiceImpl extends BaseService implements I
|
|||||||
public R getXhpcTimingChargingModelCron() {
|
public R getXhpcTimingChargingModelCron() {
|
||||||
//顺序排列
|
//顺序排列
|
||||||
List<XhpcTimingChargingCacheRateModel> list = xhpcTimingChargingModelMapper.getXhpcTimingChargingModelId();
|
List<XhpcTimingChargingCacheRateModel> list = xhpcTimingChargingModelMapper.getXhpcTimingChargingModelId();
|
||||||
|
Date date = new Date();
|
||||||
if(list !=null && list.size()>0){
|
if(list !=null && list.size()>0){
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
XhpcTimingChargingCacheRateModel timingCharging = list.get(i);
|
XhpcTimingChargingCacheRateModel timingCharging = list.get(i);
|
||||||
@ -466,6 +467,7 @@ public class XhpcTimingChargingModelServiceImpl extends BaseService implements I
|
|||||||
xhpcRate.setRateModelId(rateModelId);
|
xhpcRate.setRateModelId(rateModelId);
|
||||||
xhpcRate.setRateValue(xhpcTimingChargingRate.getRateValue());
|
xhpcRate.setRateValue(xhpcTimingChargingRate.getRateValue());
|
||||||
xhpcRate.setTenantId(xhpcTimingChargingRate.getTenantId());
|
xhpcRate.setTenantId(xhpcTimingChargingRate.getTenantId());
|
||||||
|
xhpcRate.setCreateTime(date);
|
||||||
int number = xhpcChargingStationService.insertXhpcRate(xhpcRate);
|
int number = xhpcChargingStationService.insertXhpcRate(xhpcRate);
|
||||||
if(number==0){
|
if(number==0){
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
|
|||||||
@ -110,6 +110,7 @@
|
|||||||
<if test="tenantId !=null and '' !=tenantId">
|
<if test="tenantId !=null and '' !=tenantId">
|
||||||
and tcm.tenant_id =#{tenantId}
|
and tcm.tenant_id =#{tenantId}
|
||||||
</if>
|
</if>
|
||||||
|
order by tcm.status
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertXhpcTimingChargingModel" parameterType="com.xhpc.common.domain.XhpcTimingChargingModel" useGeneratedKeys="true" keyProperty="timingChargingModelId">
|
<insert id="insertXhpcTimingChargingModel" parameterType="com.xhpc.common.domain.XhpcTimingChargingModel" useGeneratedKeys="true" keyProperty="timingChargingModelId">
|
||||||
|
|||||||
@ -25,6 +25,11 @@ public class XhpcCommunity extends BaseEntity {
|
|||||||
@Length(min = 2,max = 10,message = "社区组名称长度2~10之间")
|
@Length(min = 2,max = 10,message = "社区组名称长度2~10之间")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0总金额提成 1服务费提成 2电量抽成
|
||||||
|
*/
|
||||||
|
private Integer commissionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务费优惠比例
|
* 服务费优惠比例
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -25,6 +25,11 @@ public class XhpcCustomers extends BaseEntity {
|
|||||||
@Length(min = 2,max = 10,message = "大客户组名称长度2~10之间")
|
@Length(min = 2,max = 10,message = "大客户组名称长度2~10之间")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0总金额提成 1服务费提成 2电量抽成
|
||||||
|
*/
|
||||||
|
private Integer commissionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务费优惠比例
|
* 服务费优惠比例
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
<result column="update_by" property="updateBy"/>
|
<result column="update_by" property="updateBy"/>
|
||||||
<result column="update_time" property="updateTime"/>
|
<result column="update_time" property="updateTime"/>
|
||||||
<result column="remark" property="remark"/>
|
<result column="remark" property="remark"/>
|
||||||
|
<result column="commission_type" property="commissionType"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getLandUser" resultType="map">
|
<select id="getLandUser" resultType="map">
|
||||||
@ -98,6 +99,9 @@
|
|||||||
<if test="null != operatorId">
|
<if test="null != operatorId">
|
||||||
operatorId,
|
operatorId,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != commissionType">
|
||||||
|
commission_type,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="null != communityId">
|
<if test="null != communityId">
|
||||||
@ -151,6 +155,9 @@
|
|||||||
<if test="null != operatorId">
|
<if test="null != operatorId">
|
||||||
#{operatorId},
|
#{operatorId},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != commissionType">
|
||||||
|
#{commissionType},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -171,6 +178,7 @@
|
|||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="commissionType != null">commission_type = #{commissionType},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where community_id=#{communityId}
|
where community_id=#{communityId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
<result column="update_by" property="updateBy"/>
|
<result column="update_by" property="updateBy"/>
|
||||||
<result column="update_time" property="updateTime"/>
|
<result column="update_time" property="updateTime"/>
|
||||||
<result column="remark" property="remark"/>
|
<result column="remark" property="remark"/>
|
||||||
|
<result column="commission_type" property="commissionType"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getLandUser" resultType="map">
|
<select id="getLandUser" resultType="map">
|
||||||
@ -96,6 +97,9 @@
|
|||||||
<if test="null != operatorId">
|
<if test="null != operatorId">
|
||||||
operator_id,
|
operator_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != commissionType">
|
||||||
|
commission_type,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="null != customersId">
|
<if test="null != customersId">
|
||||||
@ -146,6 +150,9 @@
|
|||||||
<if test="null != operatorId">
|
<if test="null != operatorId">
|
||||||
#{operatorId},
|
#{operatorId},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != commissionType">
|
||||||
|
#{commissionType},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -165,6 +172,7 @@
|
|||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="commissionType != null">commission_type = #{commissionType},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where customers_id=#{customersId}
|
where customers_id=#{customersId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user