mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-12 03:09:48 +08:00
新增计费模板描述字段
This commit is contained in:
@@ -41,6 +41,11 @@ public class PileBillingTemplate extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计费模板描述
|
||||||
|
*/
|
||||||
|
private String templateDesc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆类型(1-电动汽车;2-电动自行车)
|
* 车辆类型(1-电动汽车;2-电动自行车)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -209,7 +209,8 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 生成备注
|
// 生成备注
|
||||||
billingTemplate.setRemark(generateRemark(detailList));
|
// billingTemplate.setRemark(generateTemplateDesc(detailList));
|
||||||
|
billingTemplate.setTemplateDesc(generateTemplateDesc(detailList));
|
||||||
|
|
||||||
BillingTemplateTransactionDTO build = BillingTemplateTransactionDTO.builder()
|
BillingTemplateTransactionDTO build = BillingTemplateTransactionDTO.builder()
|
||||||
.billingTemplate(billingTemplate)
|
.billingTemplate(billingTemplate)
|
||||||
@@ -252,7 +253,8 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
|||||||
List<PileBillingDetail> pileBillingDetails = generateBillingDetailList(billingTemplate.getTemplateCode(), dto);
|
List<PileBillingDetail> pileBillingDetails = generateBillingDetailList(billingTemplate.getTemplateCode(), dto);
|
||||||
|
|
||||||
// 生成备注
|
// 生成备注
|
||||||
billingTemplate.setRemark(generateRemark(pileBillingDetails));
|
// billingTemplate.setRemark(generateTemplateDesc(pileBillingDetails));
|
||||||
|
billingTemplate.setTemplateDesc(generateTemplateDesc(pileBillingDetails));
|
||||||
|
|
||||||
BillingTemplateTransactionDTO build = BillingTemplateTransactionDTO.builder()
|
BillingTemplateTransactionDTO build = BillingTemplateTransactionDTO.builder()
|
||||||
.billingTemplate(billingTemplate)
|
.billingTemplate(billingTemplate)
|
||||||
@@ -464,7 +466,8 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
|||||||
List<PileBillingDetail> stationBillingDetailList = generateBillingDetailList(templateCode, dto);
|
List<PileBillingDetail> stationBillingDetailList = generateBillingDetailList(templateCode, dto);
|
||||||
|
|
||||||
// 生成备注
|
// 生成备注
|
||||||
stationBillingTemplate.setRemark(generateRemark(stationBillingDetailList));
|
// stationBillingTemplate.setRemark(generateTemplateDesc(stationBillingDetailList));
|
||||||
|
stationBillingTemplate.setTemplateDesc(generateTemplateDesc(stationBillingDetailList));
|
||||||
|
|
||||||
// 入库
|
// 入库
|
||||||
BillingTemplateTransactionDTO billingTemplateTransactionDTO = new BillingTemplateTransactionDTO();
|
BillingTemplateTransactionDTO billingTemplateTransactionDTO = new BillingTemplateTransactionDTO();
|
||||||
@@ -717,7 +720,8 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
|||||||
stationBillingDetailList.add(pileBillingDetail);
|
stationBillingDetailList.add(pileBillingDetail);
|
||||||
}
|
}
|
||||||
// 生成备注
|
// 生成备注
|
||||||
stationBillingTemplate.setRemark(generateRemark(stationBillingDetailList));
|
// stationBillingTemplate.setRemark(generateTemplateDesc(stationBillingDetailList));
|
||||||
|
stationBillingTemplate.setTemplateDesc(generateTemplateDesc(stationBillingDetailList));
|
||||||
// 入库
|
// 入库
|
||||||
BillingTemplateTransactionDTO billingTemplateTransactionDTO = new BillingTemplateTransactionDTO();
|
BillingTemplateTransactionDTO billingTemplateTransactionDTO = new BillingTemplateTransactionDTO();
|
||||||
billingTemplateTransactionDTO.setBillingTemplate(stationBillingTemplate);
|
billingTemplateTransactionDTO.setBillingTemplate(stationBillingTemplate);
|
||||||
@@ -727,16 +731,16 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 根据设置的价格自动生成计费模板
|
// 根据设置的价格自动生成计费模板
|
||||||
private String generateRemark(List<PileBillingDetail> list) {
|
private String generateTemplateDesc(List<PileBillingDetail> list) {
|
||||||
StringBuilder remark = new StringBuilder();
|
StringBuilder desc = new StringBuilder();
|
||||||
for (PileBillingDetail pileBillingDetail : list) {
|
for (PileBillingDetail pileBillingDetail : list) {
|
||||||
String timeType = pileBillingDetail.getTimeType();
|
String timeType = pileBillingDetail.getTimeType();
|
||||||
String label = BillingTimeTypeEnum.getLabelByValue(timeType);
|
String label = BillingTimeTypeEnum.getLabelByValue(timeType);
|
||||||
remark.append(label).append("-");
|
desc.append(label).append(":");
|
||||||
remark.append(pileBillingDetail.getElectricityPrice().add(pileBillingDetail.getServicePrice()));
|
desc.append(pileBillingDetail.getElectricityPrice().add(pileBillingDetail.getServicePrice()));
|
||||||
remark.append("元; ");
|
desc.append("元; ");
|
||||||
}
|
}
|
||||||
return remark.toString();
|
return desc.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -6,9 +6,18 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class MemberGroupStationVO {
|
public class MemberGroupStationVO {
|
||||||
|
// 站点id
|
||||||
private String stationId;
|
private String stationId;
|
||||||
|
|
||||||
|
// 站点名称
|
||||||
private String stationName;
|
private String stationName;
|
||||||
|
|
||||||
|
// 优惠计费模板编号
|
||||||
|
private String templateCode;
|
||||||
|
|
||||||
|
// 优惠计费模板备注
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
// 优惠计费模板描述
|
||||||
|
private String templateDesc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,9 +230,10 @@
|
|||||||
|
|
||||||
<select id="queryStationList" resultType="com.jsowell.pile.vo.base.MemberGroupStationVO">
|
<select id="queryStationList" resultType="com.jsowell.pile.vo.base.MemberGroupStationVO">
|
||||||
SELECT
|
SELECT
|
||||||
t1.id,
|
t1.id as stationId,
|
||||||
t1.station_name,
|
t1.station_name as stationName,
|
||||||
t2.remark
|
t2.template_code as templateCode,
|
||||||
|
t2.template_desc as templateDesc
|
||||||
FROM
|
FROM
|
||||||
pile_station_info t1
|
pile_station_info t1
|
||||||
JOIN pile_billing_template t2 ON t2.station_id = t1.id AND t2.del_flag = '0' AND t2.member_flag = '1'
|
JOIN pile_billing_template t2 ON t2.station_id = t1.id AND t2.del_flag = '0' AND t2.member_flag = '1'
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<result property="name" column="name"/>
|
<result property="name" column="name"/>
|
||||||
<result property="status" column="status"/>
|
<result property="status" column="status"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="templateDesc" column="template_desc"/>
|
||||||
<result property="type" column="type"/>
|
<result property="type" column="type"/>
|
||||||
<result property="stationId" column="station_id"/>
|
<result property="stationId" column="station_id"/>
|
||||||
<result property="freeTime" column="free_time"/>
|
<result property="freeTime" column="free_time"/>
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated PileBillingTemplate-->
|
<!--@mbg.generated PileBillingTemplate-->
|
||||||
id, template_code, name, status, remark, type, station_id, free_time, occupy_fee, max_occupy_fee, public_flag,
|
id, template_code, name, status, remark, template_desc, type, station_id, free_time, occupy_fee, max_occupy_fee, public_flag,
|
||||||
member_flag, create_time, update_by, update_time, del_flag
|
member_flag, create_time, update_by, update_time, del_flag
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -136,6 +137,9 @@
|
|||||||
<if test="remark != null">
|
<if test="remark != null">
|
||||||
remark,
|
remark,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="templateDesc != null">
|
||||||
|
template_desc,
|
||||||
|
</if>
|
||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
type,
|
type,
|
||||||
</if>
|
</if>
|
||||||
@@ -186,6 +190,9 @@
|
|||||||
<if test="remark != null">
|
<if test="remark != null">
|
||||||
#{remark},
|
#{remark},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="templateDesc != null">
|
||||||
|
#{templateDesc},
|
||||||
|
</if>
|
||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
#{type},
|
#{type},
|
||||||
</if>
|
</if>
|
||||||
@@ -237,6 +244,9 @@
|
|||||||
<if test="remark != null">
|
<if test="remark != null">
|
||||||
remark = #{remark},
|
remark = #{remark},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="templateDesc != null">
|
||||||
|
template_desc = #{templateDesc},
|
||||||
|
</if>
|
||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
type = #{type},
|
type = #{type},
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
placeholder="请输入模板名称"
|
placeholder="请输入模板名称"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述" prop="remark" label-width="150px">
|
<el-form-item label="备注" prop="remark" label-width="150px">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.remark"
|
v-model="form.remark"
|
||||||
style="width: 50%"
|
style="width: 50%"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
placeholder="请输入模板名称"
|
placeholder="请输入模板名称"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.remark"
|
v-model="form.remark"
|
||||||
style="width: 50%"
|
style="width: 50%"
|
||||||
|
|||||||
Reference in New Issue
Block a user