新增 个人桩充电记录添加充电停止原因码字段

This commit is contained in:
Lemon
2024-12-17 10:08:15 +08:00
parent 424d94d8a5
commit 6c85fe49f8
5 changed files with 72 additions and 9 deletions

View File

@@ -664,6 +664,7 @@ public class PileService {
} }
vo.setMemberId(personalChargingRecord.getMemberId()); vo.setMemberId(personalChargingRecord.getMemberId());
vo.setSumChargingDegree(personalChargingRecord.getTotalUsedElectricity().toString()); vo.setSumChargingDegree(personalChargingRecord.getTotalUsedElectricity().toString());
vo.setStopReasonCode(personalChargingRecord.getStopReasonCode());
vo.setStopReasonMsg(personalChargingRecord.getReason()); vo.setStopReasonMsg(personalChargingRecord.getReason());
list.add(vo); list.add(vo);
} }

View File

@@ -155,6 +155,11 @@ public class PersonalChargingRecord {
*/ */
private BigDecimal valleyUsedElectricity; private BigDecimal valleyUsedElectricity;
/**
* 停止原因码
*/
private String stopReasonCode;
/** /**
* 异常原因 * 异常原因
*/ */

View File

@@ -47,6 +47,11 @@ public class PersonPileConnectorSumInfoVO {
*/ */
private String sourceType; private String sourceType;
/**
* 停止原因码
*/
private String stopReasonCode;
/** /**
* 停止原因 * 停止原因
*/ */

View File

@@ -31,6 +31,7 @@
<result column="peak_used_electricity" jdbcType="DECIMAL" property="peakUsedElectricity" /> <result column="peak_used_electricity" jdbcType="DECIMAL" property="peakUsedElectricity" />
<result column="flat_used_electricity" jdbcType="DECIMAL" property="flatUsedElectricity" /> <result column="flat_used_electricity" jdbcType="DECIMAL" property="flatUsedElectricity" />
<result column="valley_used_electricity" jdbcType="DECIMAL" property="valleyUsedElectricity" /> <result column="valley_used_electricity" jdbcType="DECIMAL" property="valleyUsedElectricity" />
<result column="stop_reason_code" jdbcType="VARCHAR" property="stopReasonCode" />
<result column="reason" jdbcType="VARCHAR" property="reason" /> <result column="reason" jdbcType="VARCHAR" property="reason" />
<result column="trade_date" jdbcType="TIMESTAMP" property="tradeDate" /> <result column="trade_date" jdbcType="TIMESTAMP" property="tradeDate" />
<result column="source_type" jdbcType="VARCHAR" property="sourceType" /> <result column="source_type" jdbcType="VARCHAR" property="sourceType" />
@@ -46,7 +47,7 @@
pile_connector_code, logic_card, vin_code, start_mode, plate_number, charge_start_time, pile_connector_code, logic_card, vin_code, start_mode, plate_number, charge_start_time,
charge_end_time, start_type, reservation_start_time, reservation_end_time, start_soc, charge_end_time, start_type, reservation_start_time, reservation_end_time, start_soc,
end_soc, ammeter_total_start, ammeter_total_end, total_used_electricity, sharp_used_electricity, end_soc, ammeter_total_start, ammeter_total_end, total_used_electricity, sharp_used_electricity,
peak_used_electricity, flat_used_electricity, valley_used_electricity, reason, trade_date, peak_used_electricity, flat_used_electricity, valley_used_electricity, stop_reason_code, reason, trade_date,
source_type, create_by, create_time, update_by, update_time, del_flag source_type, create_by, create_time, update_by, update_time, del_flag
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@@ -72,7 +73,7 @@
start_soc, end_soc, ammeter_total_start, start_soc, end_soc, ammeter_total_start,
ammeter_total_end, total_used_electricity, ammeter_total_end, total_used_electricity,
sharp_used_electricity, peak_used_electricity, sharp_used_electricity, peak_used_electricity,
flat_used_electricity, valley_used_electricity, flat_used_electricity, valley_used_electricity, stop_reason_code,
reason, trade_date, source_type, reason, trade_date, source_type,
create_by, create_time, update_by, create_by, create_time, update_by,
update_time, del_flag) update_time, del_flag)
@@ -85,7 +86,7 @@
#{startSoc,jdbcType=VARCHAR}, #{endSoc,jdbcType=VARCHAR}, #{ammeterTotalStart,jdbcType=VARCHAR}, #{startSoc,jdbcType=VARCHAR}, #{endSoc,jdbcType=VARCHAR}, #{ammeterTotalStart,jdbcType=VARCHAR},
#{ammeterTotalEnd,jdbcType=VARCHAR}, #{totalUsedElectricity,jdbcType=DECIMAL}, #{ammeterTotalEnd,jdbcType=VARCHAR}, #{totalUsedElectricity,jdbcType=DECIMAL},
#{sharpUsedElectricity,jdbcType=DECIMAL}, #{peakUsedElectricity,jdbcType=DECIMAL}, #{sharpUsedElectricity,jdbcType=DECIMAL}, #{peakUsedElectricity,jdbcType=DECIMAL},
#{flatUsedElectricity,jdbcType=DECIMAL}, #{valleyUsedElectricity,jdbcType=DECIMAL}, #{flatUsedElectricity,jdbcType=DECIMAL}, #{valleyUsedElectricity,jdbcType=DECIMAL}, #{stopReasonCode,jdbcType=VARCHAR},
#{reason,jdbcType=VARCHAR}, #{tradeDate,jdbcType=TIMESTAMP}, #{sourceType,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR}, #{tradeDate,jdbcType=TIMESTAMP}, #{sourceType,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=CHAR}) #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=CHAR})
@@ -172,6 +173,9 @@
<if test="valleyUsedElectricity != null"> <if test="valleyUsedElectricity != null">
valley_used_electricity, valley_used_electricity,
</if> </if>
<if test="stopReasonCode != null">
stop_reason_code,
</if>
<if test="reason != null"> <if test="reason != null">
reason, reason,
</if> </if>
@@ -276,6 +280,9 @@
<if test="valleyUsedElectricity != null"> <if test="valleyUsedElectricity != null">
#{valleyUsedElectricity,jdbcType=DECIMAL}, #{valleyUsedElectricity,jdbcType=DECIMAL},
</if> </if>
<if test="stopReasonCode != null">
#{stopReasonCode,jdbcType=VARCHAR},
</if>
<if test="reason != null"> <if test="reason != null">
#{reason,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR},
</if> </if>
@@ -384,6 +391,9 @@
<if test="valleyUsedElectricity != null"> <if test="valleyUsedElectricity != null">
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL}, valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
</if> </if>
<if test="stopReasonCode != null">
stop_reason_code = #{stopReasonCode,jdbcType=VARCHAR},
</if>
<if test="reason != null"> <if test="reason != null">
reason = #{reason,jdbcType=VARCHAR}, reason = #{reason,jdbcType=VARCHAR},
</if> </if>
@@ -440,6 +450,7 @@
peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL}, peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL}, flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL}, valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
stop_reason_code = #{stopReasonCode,jdbcType=VARCHAR},
reason = #{reason,jdbcType=VARCHAR}, reason = #{reason,jdbcType=VARCHAR},
trade_date = #{tradeDate,jdbcType=TIMESTAMP}, trade_date = #{tradeDate,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=VARCHAR}, source_type = #{sourceType,jdbcType=VARCHAR},
@@ -584,6 +595,11 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.valleyUsedElectricity,jdbcType=DECIMAL} when id = #{item.id,jdbcType=INTEGER} then #{item.valleyUsedElectricity,jdbcType=DECIMAL}
</foreach> </foreach>
</trim> </trim>
<trim prefix="stop_reason_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.stopReasonCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="reason = case" suffix="end,"> <trim prefix="reason = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.reason,jdbcType=VARCHAR} when id = #{item.id,jdbcType=INTEGER} then #{item.reason,jdbcType=VARCHAR}
@@ -816,6 +832,13 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="stop_reason_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.stopReasonCode != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.stopReasonCode,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="reason = case" suffix="end,"> <trim prefix="reason = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
<if test="item.reason != null"> <if test="item.reason != null">
@@ -885,7 +908,7 @@
pile_connector_code, logic_card, vin_code, start_mode, plate_number, charge_start_time, pile_connector_code, logic_card, vin_code, start_mode, plate_number, charge_start_time,
charge_end_time, start_type, reservation_start_time, reservation_end_time, start_soc, charge_end_time, start_type, reservation_start_time, reservation_end_time, start_soc,
end_soc, ammeter_total_start, ammeter_total_end, total_used_electricity, sharp_used_electricity, end_soc, ammeter_total_start, ammeter_total_end, total_used_electricity, sharp_used_electricity,
peak_used_electricity, flat_used_electricity, valley_used_electricity, reason, peak_used_electricity, flat_used_electricity, valley_used_electricity, stop_reason_code, reason,
trade_date, source_type, create_by, create_time, update_by, update_time, del_flag trade_date, source_type, create_by, create_time, update_by, update_time, del_flag
) )
values values
@@ -900,7 +923,7 @@
#{item.endSoc,jdbcType=VARCHAR}, #{item.ammeterTotalStart,jdbcType=VARCHAR}, #{item.ammeterTotalEnd,jdbcType=VARCHAR}, #{item.endSoc,jdbcType=VARCHAR}, #{item.ammeterTotalStart,jdbcType=VARCHAR}, #{item.ammeterTotalEnd,jdbcType=VARCHAR},
#{item.totalUsedElectricity,jdbcType=DECIMAL}, #{item.sharpUsedElectricity,jdbcType=DECIMAL}, #{item.totalUsedElectricity,jdbcType=DECIMAL}, #{item.sharpUsedElectricity,jdbcType=DECIMAL},
#{item.peakUsedElectricity,jdbcType=DECIMAL}, #{item.flatUsedElectricity,jdbcType=DECIMAL}, #{item.peakUsedElectricity,jdbcType=DECIMAL}, #{item.flatUsedElectricity,jdbcType=DECIMAL},
#{item.valleyUsedElectricity,jdbcType=DECIMAL}, #{item.reason,jdbcType=VARCHAR}, #{item.valleyUsedElectricity,jdbcType=DECIMAL}, #{item.stopReasonCode,jdbcType=VARCHAR}, #{item.reason,jdbcType=VARCHAR},
#{item.tradeDate,jdbcType=TIMESTAMP}, #{item.sourceType,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR}, #{item.tradeDate,jdbcType=TIMESTAMP}, #{item.sourceType,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.delFlag,jdbcType=CHAR}) #{item.delFlag,jdbcType=CHAR})
@@ -939,6 +962,7 @@
peak_used_electricity, peak_used_electricity,
flat_used_electricity, flat_used_electricity,
valley_used_electricity, valley_used_electricity,
stop_reason_code,
reason, reason,
trade_date, trade_date,
source_type, source_type,
@@ -979,6 +1003,7 @@
#{peakUsedElectricity,jdbcType=DECIMAL}, #{peakUsedElectricity,jdbcType=DECIMAL},
#{flatUsedElectricity,jdbcType=DECIMAL}, #{flatUsedElectricity,jdbcType=DECIMAL},
#{valleyUsedElectricity,jdbcType=DECIMAL}, #{valleyUsedElectricity,jdbcType=DECIMAL},
#{stopReasonCode,jdbcType=VARCHAR},
#{reason,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR},
#{tradeDate,jdbcType=TIMESTAMP}, #{tradeDate,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=VARCHAR}, #{sourceType,jdbcType=VARCHAR},
@@ -1019,6 +1044,7 @@
peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL}, peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL}, flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL}, valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
stop_reason_code = #{stopReasonCode,jdbcType=VARCHAR},
reason = #{reason,jdbcType=VARCHAR}, reason = #{reason,jdbcType=VARCHAR},
trade_date = #{tradeDate,jdbcType=TIMESTAMP}, trade_date = #{tradeDate,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=VARCHAR}, source_type = #{sourceType,jdbcType=VARCHAR},
@@ -1114,6 +1140,9 @@
<if test="valleyUsedElectricity != null"> <if test="valleyUsedElectricity != null">
valley_used_electricity, valley_used_electricity,
</if> </if>
<if test="stopReasonCode != null">
stop_reason_code,
</if>
<if test="reason != null"> <if test="reason != null">
reason, reason,
</if> </if>
@@ -1222,6 +1251,9 @@
<if test="valleyUsedElectricity != null"> <if test="valleyUsedElectricity != null">
#{valleyUsedElectricity,jdbcType=DECIMAL}, #{valleyUsedElectricity,jdbcType=DECIMAL},
</if> </if>
<if test="stopReasonCode != null">
#{stopReasonCode,jdbcType=VARCHAR},
</if>
<if test="reason != null"> <if test="reason != null">
#{reason,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR},
</if> </if>
@@ -1330,6 +1362,9 @@
<if test="valleyUsedElectricity != null"> <if test="valleyUsedElectricity != null">
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL}, valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
</if> </if>
<if test="stopReasonCode != null">
stop_reason_code = #{stopReasonCode,jdbcType=VARCHAR},
</if>
<if test="reason != null"> <if test="reason != null">
reason = #{reason,jdbcType=VARCHAR}, reason = #{reason,jdbcType=VARCHAR},
</if> </if>

View File

@@ -43,6 +43,7 @@ import com.jsowell.thirdparty.platform.domain.*;
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory; import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService; import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
import com.jsowell.thirdparty.platform.util.Cryptos; import com.jsowell.thirdparty.platform.util.Cryptos;
import com.jsowell.thirdparty.platform.util.GBSignUtils;
import com.jsowell.thirdparty.platform.util.HttpRequestUtil; import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
import com.jsowell.thirdparty.platform.util.ThirdPartyPlatformUtils; import com.jsowell.thirdparty.platform.util.ThirdPartyPlatformUtils;
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService; import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
@@ -69,22 +70,31 @@ import java.util.stream.Collectors;
public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService { public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
private final String thirdPlatformType = ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode(); private final String thirdPlatformType = ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode();
Logger logger = LoggerFactory.getLogger(this.getClass()); Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired @Autowired
private PileStationInfoService pileStationInfoService; private PileStationInfoService pileStationInfoService;
@Autowired @Autowired
private ThirdPartyStationRelationService thirdPartyStationRelationService; private ThirdPartyStationRelationService thirdPartyStationRelationService;
@Autowired @Autowired
private ThirdpartySecretInfoService thirdpartySecretInfoService; private ThirdpartySecretInfoService thirdpartySecretInfoService;
@Autowired @Autowired
private PileBasicInfoService pileBasicInfoService; private PileBasicInfoService pileBasicInfoService;
@Autowired @Autowired
private PileMerchantInfoService pileMerchantInfoService; private PileMerchantInfoService pileMerchantInfoService;
@Autowired @Autowired
private PileConnectorInfoService pileConnectorInfoService; private PileConnectorInfoService pileConnectorInfoService;
@Autowired @Autowired
private OrderBasicInfoService orderBasicInfoService; private OrderBasicInfoService orderBasicInfoService;
@Autowired @Autowired
private PileBillingTemplateService pileBillingTemplateService; private PileBillingTemplateService pileBillingTemplateService;
@Autowired @Autowired
private RedisCache redisCache; private RedisCache redisCache;
@@ -149,10 +159,17 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
vo.setFailReason(failReason); vo.setFailReason(failReason);
vo.setSuccStat(succStat); vo.setSuccStat(succStat);
Map<String, String> resultMap = ThirdPartyPlatformUtils.useOurSigSecretGenerateResultMap(vo, thirdPartySecretInfoVO); Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO);
return resultMap; return resultMap;
} }
public static void main(String[] args) {
String msg = "880B24831B56238914534606391D2902";
String signSecret = "iz54GKP9oOeCCYSp";
String result = Cryptos.aesDecrypt(msg, signSecret);
}
/** /**
* 查询运营商信息 query_operator_info * 查询运营商信息 query_operator_info
* supervise_query_operator_info * supervise_query_operator_info
@@ -187,7 +204,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
map.put("ItemSize", pageInfo.getTotal()); map.put("ItemSize", pageInfo.getTotal());
map.put("OperatorInfos", operatorInfos); map.put("OperatorInfos", operatorInfos);
Map<String, String> resultMap = ThirdPartyPlatformUtils.useOurSigSecretGenerateResultMap(map, thirdPartySecretInfoVO); Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
return resultMap; return resultMap;
} }
@@ -280,7 +297,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
map.put("PageCount", pageInfo.getPages()); map.put("PageCount", pageInfo.getPages());
map.put("ItemSize", pageInfo.getTotal()); map.put("ItemSize", pageInfo.getTotal());
map.put("StationInfos", resultList); map.put("StationInfos", resultList);
Map<String, String> resultMap = ThirdPartyPlatformUtils.useOurSigSecretGenerateResultMap(map, thirdPartySecretInfoVO); Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
return resultMap; return resultMap;
} }
@@ -426,7 +443,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("StationStatusInfos", stationStatusInfos); map.put("StationStatusInfos", stationStatusInfos);
Map<String, String> resultMap = ThirdPartyPlatformUtils.useOurSigSecretGenerateResultMap(map, thirdPartySecretInfoVO); Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
return resultMap; return resultMap;
} }