修改短信签名由小华充电改为翔桦充电
This commit is contained in:
parent
7fa9660450
commit
d5f77307fb
@ -116,8 +116,8 @@ public class CheckChargeOrderController {
|
||||
|
||||
System.out.println("==========sss==============="+s);
|
||||
|
||||
String date= "NR0oe4La+0SLizVoKCDfRkj37avo59qzZBUm7BFSmU+XA81uaP2614Vjbb7VvhRRumS4LwHu6CR981cKMxNM5xCGT+yjGgDwRG4B6xnEJ9upiW7iathKmMrN3lZBkvzstkKcx502kVSMy4x82RBkHUio1KCXoCPIyj9WxpgkJJKnHXaZKrk1Qd6G3xn3MGHvBimnbKssC/bJyD+F9sEp61r5oVPVym7UGSr1GoK9A5sR+j4hrOHeLtlPxgcdJgAuFSXBT75wP2WF1YRsfYppCHh/ERHhIApQ6ym1iAJOE/El/3wehkHLZQAzEMBfEIvtPnpbt9KUItOv16i/GkRR+lrcdcqgrnArOPfKbexWVuqb1zX6/qlQYlQ4yQANrzJ9Dm3KRKtH/sxZ+Uve8d9pJiTAavKpdI9zJwcdywZPOjedoj5X/5GS3bnP/xVofwVgX2l5Vt6Jf4CICDtTHkLREy5ZbwqN5vNPyf+PeF+wp+zCVCXOqBxi+P3hwPVMf/Odm0hEj8byL4ctNmbQZw5A7JcWTrINDOtoeR/C1OYDT+WDj7ZfznJ9y15JllcBAqTFG5GLScvA7kCh4Sk669r6QMbmQek1HYEftVzg8Uh+y+/ItWM1bPfvMUZ9QyyeGJlzWQr/YbxbXdoMqc6STuYkqiLarFUnP3y7lPvomitrdXHub2r9iciCvCDM+WH0WFTFM7rRWdg23D7LahcpBGgObVQpgxuXmnr0SQCVvHKr0Xj6l1o4N/45AAn7JSWPGjclBUNcVOiz1LqVDJaswb8Ymbfgcxqf99Ho0d7nAUvmon4C6IFN3/mmgFSDamGxvIXUTMUtJ9Arj+HP7YQMPGpHgO4ULszzBmh4dR2EQgL4PMSY2smXSzE4DBWYTQ8odMZChm2b5gU/8SBNC89UZFEXNj9/V/J1QqGYiCC18Sp+UNypjpr52MbAV7VDqRWUaovUXnsbnFa8jPHiHOXX9zfvuRuLI22mWLdre4gvmeYBgJ9zweHFdGMBLw7pfKl57/d9GkYP/8yC0QDbtBljd9e605INsY4Va0UJi0oDc1YMKwsXdIbh5zXnN7F0jhOd5uK6rOuBvY5Xo2cvjp2DIUNUsNavaLhkPT9bwmFPICINx1MQkLH4cDB+FYUut7yxFUltGPkd7Vw15nVmFs3ZtCI/OQ2FqX6KtY2aBjlqMc1FG5oQecjLYclgQcWdMLe3jqMqYvM7hGZF1orC65nbztiekl6XQO+pIMcrpkXfjZ9andFK0mBCHLOdUrgvbQeC0ifRdJY+VIfweB+H5IF2934tSF3nD4D+KvLkeg6aqyBFomtw4OWxROmvPF7T7zQWzWETRCDo0pVrBOWKgfByXpsA3BCc/mN7sjJhZTxVcT9OIIJKdBceufAROGtVTmpiVInlUqNRgseT85w6n6PYSNu62jqjLWXP1bFvCRdxHIXn49RfeQMXs8/lAts6DEmD18fU31vtxcWSxAO2W0UAH9YTJuK96Qt8zman1QLiO2U6PRA=";
|
||||
String s2 = decryptString(date, "8LpncubmWiPCzY3V", "av6A8QdnRaVRMXu6");
|
||||
String date= "3VW7G53nG+8tIdKvSR9f2cGAjCHtSITxHxd73DXf6hiepOujG1Jidj3pIef3uOXVshhdLhoWPfWtkGDndjLrQ4CNezfdrXXIi1V2NlPfBpE=";
|
||||
String s2 = decryptString(date, "ojs67l46z3f7rhok", "tet9swfkyojkhaos");
|
||||
System.out.println("===111=======sss==============="+s2);
|
||||
}catch (Exception e){
|
||||
|
||||
|
||||
@ -142,14 +142,14 @@ public class QueryStartChargeController extends CoreDispatcher {
|
||||
}
|
||||
}
|
||||
|
||||
if("0".equals(resp.getRet())){
|
||||
String finalOrderNo = orderNo;
|
||||
CompletableFuture.runAsync(()->{
|
||||
System.out.println(">>> 异步回复 <<<");
|
||||
processRequest(pushOrder,startChargeRequest.getStartChargeSeq(), finalOrderNo);
|
||||
},asyncExecutor);
|
||||
}
|
||||
System.out.println(">>> 回复启动结果 <<<");
|
||||
// if("0".equals(resp.getRet())){
|
||||
// String finalOrderNo = orderNo;
|
||||
// CompletableFuture.runAsync(()->{
|
||||
// System.out.println(">>> 异步回复 <<<");
|
||||
// processRequest(pushOrder,startChargeRequest.getStartChargeSeq(), finalOrderNo);
|
||||
// },asyncExecutor);
|
||||
// }
|
||||
// System.out.println(">>> 回复启动结果 <<<");
|
||||
return resp;
|
||||
}
|
||||
|
||||
|
||||
@ -142,13 +142,13 @@ public class QueryStopChargeController extends CoreDispatcher {
|
||||
commonResponse.setData(data);
|
||||
}
|
||||
|
||||
if("0".equals(commonResponse.getRet())){
|
||||
String finalOrderNo = orderNo;
|
||||
CompletableFuture.runAsync(()->{
|
||||
processRequest(finalOrderNo);
|
||||
},asyncExecutor);
|
||||
}
|
||||
System.out.println(">>> 回复停止结果 <<<");
|
||||
// if("0".equals(commonResponse.getRet())){
|
||||
// String finalOrderNo = orderNo;
|
||||
// CompletableFuture.runAsync(()->{
|
||||
// processRequest(finalOrderNo);
|
||||
// },asyncExecutor);
|
||||
// }
|
||||
// System.out.println(">>> 回复停止结果 <<<");
|
||||
|
||||
return commonResponse;
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ public class CDConnectorChargeStatusInfoTask extends CoreDispatcher {
|
||||
* 清除5天前数据
|
||||
* 实时数据没40秒
|
||||
*/
|
||||
//@Scheduled(fixedDelay = 1000 * 120)
|
||||
@Scheduled(fixedDelay = 1000 * 120)
|
||||
public void runYu() throws Exception{
|
||||
Collection<String> realtimeOrder = REDIS.keys("orderOutpu:*");
|
||||
for (String okey : realtimeOrder) {
|
||||
|
||||
@ -51,8 +51,6 @@ public class CDNotificationStationStatusTask extends CoreDispatcher {
|
||||
private XhpcTerminalRepository terminalRepository;
|
||||
//都开放
|
||||
@Scheduled(fixedRate = 1000 * 180)
|
||||
|
||||
|
||||
protected void run() throws IOException {
|
||||
|
||||
Collection<String> stationTerminalKeys = REDIS.keys("stationTerminalStatus:*");
|
||||
|
||||
@ -53,7 +53,6 @@ public class NotificationChargeOrderInfoTask extends CoreDispatcher {
|
||||
List<AuthSecretToken> authSecretTokenList = authSecretTokenRepository.findBySecretTokenType(SECRET_TOKEN_TYPE_OUT);
|
||||
List<XhpcHistoryOrder> xhpcHistoryOrderList =xhpcHistoryOrderRepository.findByConfirmResultAndSource(-1, 1);
|
||||
for (XhpcHistoryOrder horder : xhpcHistoryOrderList) {
|
||||
logger.info("==============推送开始=======111================"+horder.getSerialNumber()+"========11111==========="+horder.getInternetSerialNumber());
|
||||
if("765367656".equals(horder.getInternetSerialNumber().substring(0, 9))){
|
||||
continue;
|
||||
}
|
||||
@ -66,7 +65,6 @@ public class NotificationChargeOrderInfoTask extends CoreDispatcher {
|
||||
xhpcHistoryOrderRepository.save(horder); // mending
|
||||
}
|
||||
}
|
||||
logger.info("==============推送开始=====222=================="+horder.getSerialNumber()+"========2222==========="+horder.getInternetSerialNumber());
|
||||
if (authSecretToken.getOperatorId3irdpty().equals(operatorId3rdptyEvcs)) {
|
||||
ChargeOrderInfo chargeOrderInfo = new ChargeOrderInfo(horder);
|
||||
final ChargeOrderInfoResponse pushResp = notify(chargeOrderInfo, authSecretToken);
|
||||
|
||||
@ -36,7 +36,7 @@ public class NotificationStartChargeResultTask extends CoreDispatcher {
|
||||
*/
|
||||
//(evcs 放开 30 秒, 测试平台开放 15秒)
|
||||
//都开放
|
||||
@Scheduled(cron = "0/15 * * * * ? ")
|
||||
@Scheduled(cron = "0/30 * * * * ? ")
|
||||
public void run() throws IOException {
|
||||
|
||||
//Getting the charge orders which from 3rd.
|
||||
@ -49,7 +49,6 @@ public class NotificationStartChargeResultTask extends CoreDispatcher {
|
||||
}
|
||||
Integer startChargeNotificationStat = (Integer) pushOrder.get("startChargeNotificationStat");
|
||||
if (null != startChargeNotificationStat && 1 != startChargeNotificationStat && startChargeNotificationStat <= 20) {
|
||||
logger.info("===============启动推送开始============================"+pushOrderKey);
|
||||
if(pushOrder.get("internetSerialNumber")==null || "".equals((String) pushOrder.get("internetSerialNumber"))){
|
||||
continue;
|
||||
}
|
||||
@ -87,7 +86,6 @@ public class NotificationStartChargeResultTask extends CoreDispatcher {
|
||||
CommonRequest<NotificationStartChargeResultRequestData> commonRequest = new CommonRequest<>();
|
||||
commonRequest.setData(data);
|
||||
String responseBody = ok(commonRequest, "/notification_start_charge_result", authSecretTokenOut);
|
||||
logger.info("===============启动推送结果=====responseBody======================="+responseBody+"=================orderNo================="+orderNo);
|
||||
NotificationStartStopChargeResultResponse notificationStartStopChargeResultResponse =DTOJsonHelper.parseResponseData(responseBody,NotificationStartStopChargeResultResponse.class, authSecretTokenOut);
|
||||
|
||||
if (null != notificationStartStopChargeResultResponse) {
|
||||
@ -121,8 +119,6 @@ public class NotificationStartChargeResultTask extends CoreDispatcher {
|
||||
|
||||
String s = Aes128Cbc.decryptString(data, "4d593ae4f74f2798", "0802395fab41d38c");
|
||||
|
||||
|
||||
System.out.println("==========s========="+s);
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
|
||||
@ -49,7 +49,6 @@ public class NotificationStationStatusTask extends CoreDispatcher {
|
||||
@Resource
|
||||
private XhpcTerminalRepository terminalRepository;
|
||||
|
||||
//推送不开放(evcs 放开)
|
||||
//都开放 9009 40 9099 60
|
||||
@Scheduled(cron = "0 0/1 * * * ? ")
|
||||
protected void run() throws IOException {
|
||||
|
||||
@ -43,7 +43,7 @@ public class NotificationOvertimeOrderInfoTask extends CoreDispatcher {
|
||||
private final Logger logger = LoggerFactory.getLogger(NotificationOvertimeOrderInfoTask.class);
|
||||
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(fixedRate = 1000 * 30)
|
||||
//@Scheduled(fixedRate = 1000 * 30)
|
||||
public void run() throws IOException {
|
||||
|
||||
AuthSecretToken authSecretTokenOut =
|
||||
|
||||
@ -14,6 +14,7 @@ import com.xhpc.evcs.utils.JSONUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -38,8 +39,8 @@ public class NotificationStationInfoKuaiDianTask extends CoreDispatcher {
|
||||
private final Logger logger = LoggerFactory.getLogger(NotificationStationInfoKuaiDianTask.class);
|
||||
|
||||
|
||||
//9099开放定时任务 9009不开放
|
||||
//@Scheduled(cron = "0 50 0 1/1 * ? ")
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(cron = "0 50 0 1/1 * ? ")
|
||||
public void run() throws IOException {
|
||||
try{
|
||||
List<XhpcStationInternetBlacklist> xhpcStationInternetBlacklist = xhpcStationInternetBlacklistRepo.findByInternetUserId(1L);
|
||||
|
||||
@ -38,7 +38,7 @@ public class NotificationPlaceholderOrderInfoTask extends CoreDispatcher {
|
||||
private final Logger logger = LoggerFactory.getLogger(NotificationPlaceholderOrderInfoTask.class);
|
||||
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(fixedRate = 1000 * 30)
|
||||
//@Scheduled(fixedRate = 1000 * 30)
|
||||
public void run() throws IOException {
|
||||
|
||||
AuthSecretToken authSecretTokenOut =
|
||||
|
||||
@ -43,7 +43,7 @@ public class NotificationPlaceholderRulesTask extends CoreDispatcher {
|
||||
private final Logger logger = LoggerFactory.getLogger(NotificationPlaceholderRulesTask.class);
|
||||
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(cron = "0 0 3 1/1 * ? ")
|
||||
//@Scheduled(cron = "0 0 3 1/1 * ? ")
|
||||
public void run() throws IOException {
|
||||
AuthSecretToken authSecretTokenOut =
|
||||
authSecretTokenRepository.findByOperatorId3irdptyAndOperatorIdAndSecretTokenType("MA25CNM38", "MA6DFCTD5", SECRET_TOKEN_TYPE_OUT).orElse(null); //todo
|
||||
|
||||
@ -14,6 +14,7 @@ import com.xhpc.evcs.utils.JSONUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -38,8 +39,8 @@ public class NotificationStationInfoXinDianTuTask extends CoreDispatcher {
|
||||
private final Logger logger = LoggerFactory.getLogger(NotificationStationInfoXinDianTuTask.class);
|
||||
|
||||
|
||||
//9099开放定时任务 9009不开放
|
||||
//@Scheduled(cron = "0 40 0 1/1 * ? ")
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(cron = "0 40 0 1/1 * ? ")
|
||||
public void run() throws IOException {
|
||||
try{
|
||||
List<XhpcStationInternetBlacklist> xhpcStationInternetBlacklist = xhpcStationInternetBlacklistRepo.findByInternetUserId(3L);
|
||||
|
||||
@ -187,11 +187,11 @@ public class TokenController extends BaseController
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("code", random);
|
||||
paramMap.put("phone", phone);
|
||||
paramMap.put("content", "【小华充电】您的验证码是:" + random + ",有效期为5分钟。如非本人操作,可不用理会。");
|
||||
paramMap.put("content", "【翔桦充电】您的验证码是:" + random + ",有效期为5分钟。如非本人操作,可不用理会。");
|
||||
|
||||
com.aliyun.dysmsapi20170525.Client client = createClient();
|
||||
com.aliyun.dysmsapi20170525.models.SendSmsRequest sendSmsRequest = new com.aliyun.dysmsapi20170525.models.SendSmsRequest()
|
||||
.setSignName("小华充电")
|
||||
.setSignName("翔桦充电")
|
||||
.setTemplateCode("SMS_226786362")
|
||||
.setTemplateParam("{\"code\":\""+random+"\"}")
|
||||
.setPhoneNumbers(phone);
|
||||
|
||||
@ -57,7 +57,7 @@ public class XhpcTenantTask {
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("phone", domain.getContactNumber());
|
||||
paramMap.put("tenantName", domain.getTenantName());
|
||||
paramMap.put("content", "【小华充电】尊敬的租户,您申请的租户(租户名称: " + domain.getTenantName() + ")还有15天到期,请联系业务人员进行续费。");
|
||||
paramMap.put("content", "【翔桦充电】尊敬的租户,您申请的租户(租户名称: " + domain.getTenantName() + ")还有15天到期,请联系业务人员进行续费。");
|
||||
smsService.sendNotice(paramMap);
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ public class StationLogServiceImpl extends BaseService implements StationLogServ
|
||||
|
||||
@Resource
|
||||
XhpcChargingStationMapper stationMapper;
|
||||
@Autowired
|
||||
@Resource
|
||||
private TokenService tokenService;
|
||||
|
||||
@Override
|
||||
@ -56,7 +56,7 @@ public class StationLogServiceImpl extends BaseService implements StationLogServ
|
||||
}else{
|
||||
startPage();
|
||||
params.put("type",2);
|
||||
params.put("operatorIdYu",sysUserId);
|
||||
params.put("operatorId",sysUserId);
|
||||
list = stationMapper.selectXhpcChargingStationList(params);
|
||||
}
|
||||
}else{
|
||||
|
||||
@ -344,7 +344,7 @@ public class WorkOrderServiceImpl implements WorkOrderService {
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("orderNo", orderId);
|
||||
paramMap.put("phone", phoneList);
|
||||
paramMap.put("content", "【小华充电】您好,您有新的工单(工单号:" + orderId + ")待处理,请及时登陆后台查看并处理,谢谢。");
|
||||
paramMap.put("content", "【翔桦充电】您好,您有新的工单(工单号:" + orderId + ")待处理,请及时登陆后台查看并处理,谢谢。");
|
||||
R r = smsService.sendNotice(paramMap);
|
||||
|
||||
XhpcWorkOrderPushMessageDomain messageDomain = new XhpcWorkOrderPushMessageDomain();
|
||||
|
||||
@ -129,7 +129,7 @@ public class XhpcClearingBankServiceImpl implements XhpcClearingBankService {
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("phone", phone);
|
||||
paramMap.put("code", random);
|
||||
paramMap.put("content", "【小华充电】您的动态码为:" + random + ",您正在进行提现到银行账户操作,如非本人操作,请忽略本短信!");
|
||||
paramMap.put("content", "【翔桦充电】您的动态码为:" + random + ",您正在进行提现到银行账户操作,如非本人操作,请忽略本短信!");
|
||||
smsService.sendNotice(paramMap);
|
||||
|
||||
String key = "opcash:" + phone;
|
||||
|
||||
@ -94,42 +94,96 @@
|
||||
</update>
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
原查询方案
|
||||
<select id="getOrderPage" resultType="map">
|
||||
select
|
||||
co.serial_number as 'serialNumber',
|
||||
co.source as 'source',
|
||||
case co.source when 0 then 'C端用户'
|
||||
when 1 then '流量方用户'
|
||||
when 2 then '社区用户'
|
||||
when 3 then 'B端用户' end as 'sourceName',
|
||||
replace(co.start_time, 'T', ' ') as 'startTime',
|
||||
replace(co.end_time, 'T', ' ') as 'endTime'
|
||||
from xhpc_charge_order as co
|
||||
left join xhpc_charging_station as st on st.charging_station_id =co.charging_station_id
|
||||
where co.del_flag =0
|
||||
select
|
||||
co.serial_number as 'serialNumber',
|
||||
co.source as 'source',
|
||||
case co.source when 0 then 'C端用户'
|
||||
when 1 then '流量方用户'
|
||||
when 2 then '社区用户'
|
||||
when 3 then 'B端用户' end as 'sourceName',
|
||||
replace(co.start_time, 'T', ' ') as 'startTime',
|
||||
replace(co.end_time, 'T', ' ') as 'endTime'
|
||||
from xhpc_charge_order as co
|
||||
left join xhpc_charging_station as st on st.charging_station_id =co.charging_station_id
|
||||
where co.del_flag =0
|
||||
<if test="params.orderId!=null and params.orderId!=''">
|
||||
and co.serial_number like concat('%', #{params.orderId},'%')
|
||||
</if>
|
||||
<if test="params.number !=0 and params.number ==1">
|
||||
and co.charging_station_id in(select charging_station_id from xhpc_charging_station where operator_id=#{params.operatorId})
|
||||
</if>
|
||||
<if test="params.number !=0 and params.number ==2">
|
||||
and co.charging_station_id in(select charging_station_id from xhpc_user_privilege where user_id=#{params.operatorId})
|
||||
</if>
|
||||
<if test="params.tenantId != null and params.tenantId != ''">
|
||||
and co.tenant_id = #{params.tenantId}
|
||||
</if>
|
||||
<if test="params.startTime!=null and params.startTime!=''">
|
||||
and co.start_time <![CDATA[ >= ]]> #{params.startTime}
|
||||
</if>
|
||||
<if test="params.endTime !=null and params.endTime!=''">
|
||||
and co.create_time <![CDATA[ <= ]]> #{params.endTime}
|
||||
</if>
|
||||
|
||||
order by co.create_time desc
|
||||
</select>-->
|
||||
|
||||
<select id="getOrderPage" resultType="map">
|
||||
SELECT
|
||||
co.serial_number AS 'serialNumber',
|
||||
co.source AS 'source',
|
||||
CASE co.source
|
||||
WHEN 0 THEN 'C端用户'
|
||||
WHEN 1 THEN '流量方用户'
|
||||
WHEN 2 THEN '社区用户'
|
||||
WHEN 3 THEN 'B端用户'
|
||||
END AS 'sourceName',
|
||||
co.start_time AS 'startTimeRaw', -- 原始数据
|
||||
co.end_time AS 'endTimeRaw' -- 原始数据
|
||||
FROM xhpc_charge_order co
|
||||
LEFT JOIN xhpc_charging_station st
|
||||
ON st.charging_station_id = co.charging_station_id
|
||||
WHERE co.del_flag = 0
|
||||
<if test="params.orderId!=null and params.orderId!=''">
|
||||
and co.serial_number like concat('%', #{params.orderId},'%')
|
||||
AND co.serial_number LIKE CONCAT('%',#{params.orderId}, '%')
|
||||
</if>
|
||||
<if test="params.number !=0 and params.number ==1">
|
||||
and co.charging_station_id in(select charging_station_id from xhpc_charging_station where operator_id=#{params.operatorId})
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM xhpc_charging_station st_sub
|
||||
WHERE st_sub.charging_station_id = co.charging_station_id
|
||||
AND st_sub.operator_id = #{params.operatorId}
|
||||
)
|
||||
</if>
|
||||
<if test="params.number !=0 and params.number ==2">
|
||||
and co.charging_station_id in(select charging_station_id from xhpc_user_privilege where user_id=#{params.operatorId})
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM xhpc_user_privilege up
|
||||
WHERE up.charging_station_id = co.charging_station_id
|
||||
AND up.user_id = #{params.operatorId}
|
||||
)
|
||||
</if>
|
||||
<if test="params.tenantId != null and params.tenantId != ''">
|
||||
and co.tenant_id = #{params.tenantId}
|
||||
AND co.tenant_id = #{params.tenantId}
|
||||
</if>
|
||||
<if test="params.startTime!=null and params.startTime!=''">
|
||||
and co.start_time <![CDATA[ >= ]]> #{params.startTime}
|
||||
AND co.start_time >= #{params.startTime}
|
||||
</if>
|
||||
<if test="params.endTime !=null and params.endTime!=''">
|
||||
and co.create_time <![CDATA[ <= ]]> #{params.endTime}
|
||||
AND co.create_time <= #{params.endTime}
|
||||
</if>
|
||||
|
||||
order by co.create_time desc
|
||||
ORDER BY co.create_time DESC
|
||||
LIMIT 100; -- 必须添加分页限制
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="findOneBySerialNumber" resultType="com.xhpc.activity.domain.XhpcHistoryOrderDomain">
|
||||
select
|
||||
<include refid="Base_Column_List" />,
|
||||
|
||||
@ -564,7 +564,7 @@ public class XhpcTimingChargingModelServiceImpl extends BaseService implements I
|
||||
//短信通知
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("phone", timingCharging.getPhone());
|
||||
paramMap.put("content", "【小华充电】计费--尊敬的用户,计费模型"+timingChargingModelId+"更新失败,请快速处理");
|
||||
paramMap.put("content", "【翔桦充电】计费--尊敬的用户,计费模型"+timingChargingModelId+"更新失败,请快速处理");
|
||||
smsService.sendNotice(paramMap);
|
||||
|
||||
executorService.execute(new Runnable() {
|
||||
|
||||
@ -29,5 +29,5 @@ public class XhpcPlaceholderTime extends BaseEntity {
|
||||
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
private String time;
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ public class AliyunTemplate {
|
||||
/**
|
||||
* 阿里云短信签名
|
||||
*/
|
||||
public static final String SIGNATURE_NAME = "小华充电";
|
||||
public static final String SIGNATURE_NAME = "翔桦充电";
|
||||
|
||||
/**
|
||||
* 阿里云短信签名
|
||||
|
||||
@ -43,7 +43,7 @@ public class XhpcServiceDataUpdateController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 桩停止充电提示语
|
||||
* 异常充电订单处理配置
|
||||
* @param prompt
|
||||
* @return
|
||||
*/
|
||||
@ -52,4 +52,14 @@ public class XhpcServiceDataUpdateController {
|
||||
return xhpcServiceDataUpdateService.pilePromptUpdate(prompt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 异常占位费订单处理配置
|
||||
* @param prompt
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/placeholderUpdate")
|
||||
public AjaxResult placeholderUpdate(String prompt){
|
||||
return xhpcServiceDataUpdateService.placeholderUpdate(prompt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ public class XhpcSmsController extends BaseController {
|
||||
String signatureName = null;
|
||||
String templateId = null;
|
||||
|
||||
signatureName = "小华充电";
|
||||
signatureName = "翔桦充电";
|
||||
templateId = "SMS_226786362";
|
||||
if(phone !=null || "".equals(phone)){
|
||||
if(!UserTypeUtil.COMMUNIT.equals(phone.substring(0,2)) && !UserTypeUtil.CUSTOMERS.equals(phone.substring(0,2))){
|
||||
@ -109,10 +109,11 @@ public class XhpcSmsController extends BaseController {
|
||||
} else if (content.contains(AliyunTemplateKeyWord.OPERATOR_CASHED)) {
|
||||
signatureName = AliyunTemplate.SIGNATURE_NAME;
|
||||
templateId = AliyunTemplate.OPERATOR_CASHED;
|
||||
}else if (content.contains(AliyunTemplateKeyWord.OPERATOR_ORDER_REFUND)) {
|
||||
signatureName = AliyunTemplate.SIGNATURE_OREDER_NAME;
|
||||
templateId = AliyunTemplate.OPERATOR_ORDER_REFUND;
|
||||
}
|
||||
// else if (content.contains(AliyunTemplateKeyWord.OPERATOR_ORDER_REFUND)) {
|
||||
// signatureName = AliyunTemplate.SIGNATURE_OREDER_NAME;
|
||||
// templateId = AliyunTemplate.OPERATOR_ORDER_REFUND;
|
||||
// }
|
||||
|
||||
xhpcSmsService.sendNotice(phone, signatureName, templateId, paramMap);
|
||||
}
|
||||
|
||||
@ -33,4 +33,6 @@ public interface IXhpcServiceDataUpdateService {
|
||||
|
||||
|
||||
AjaxResult pilePromptUpdate(String prompt);
|
||||
|
||||
AjaxResult placeholderUpdate(String prompt);
|
||||
}
|
||||
|
||||
@ -89,4 +89,26 @@ public class XhpcServiceDataUpdateServiceImpl implements IXhpcServiceDataUpdateS
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult placeholderUpdate(String prompt) {
|
||||
LoginUser loginUser = tokenService.getLoginUser();
|
||||
String tenantId = loginUser.getTenantId();
|
||||
if("".equals(prompt) || prompt ==null){
|
||||
try {
|
||||
Integer pilePrompts = redisService.getCacheObject("placeholder:"+tenantId);
|
||||
if(pilePrompts==null){
|
||||
return AjaxResult.success(1);
|
||||
}
|
||||
return AjaxResult.success(pilePrompts);
|
||||
}catch (Exception e){
|
||||
return AjaxResult.success(1);
|
||||
}
|
||||
}else{
|
||||
|
||||
redisService.setCacheObject("pilePrompt:"+tenantId, Integer.parseInt(prompt));
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,23 +244,23 @@ public class XhpcSmsServiceImpl implements IXhpcSmsService {
|
||||
if (AliyunTemplate.DIRECT_STREAM_PILE_STOP_CHARGE.equals(templateId)) {
|
||||
String elec = paramMap.get("elec");
|
||||
String sumMoney = paramMap.get("sumMoney");
|
||||
return "尊敬的用户,你的爱车已停止充电,请尽快挪车。电量为:" + elec + ",总费用为:" + sumMoney + "元,充电费用明细,请查询小华充电小程序,谢谢。";
|
||||
return "尊敬的用户,你的爱车已停止充电,请尽快挪车。电量为:" + elec + ",总费用为:" + sumMoney + "元,充电费用明细,请查询翔桦充电小程序,谢谢。";
|
||||
}
|
||||
if (AliyunTemplate.INTERFLOW_STREAM_PILE_STOP_CHARGE.equals(templateId)) {
|
||||
String sumMoney = paramMap.get("sumMoney");
|
||||
return "尊敬的用户,你的爱车已停止充电,请尽快挪车。总费用为:" + sumMoney + "元,充电费用明细,请查询小华充电小程序,谢谢。";
|
||||
return "尊敬的用户,你的爱车已停止充电,请尽快挪车。总费用为:" + sumMoney + "元,充电费用明细,请查询翔桦充电小程序,谢谢。";
|
||||
}
|
||||
if (AliyunTemplate.VALIDATE_CODE.equals(templateId)) {
|
||||
String code = paramMap.get("code");
|
||||
return "您的验证码是:" + code + ",有效期为5分钟。如非本人操作,可不用理会。";
|
||||
}
|
||||
if (AliyunTemplate.REFUND_FAIL.equals(templateId)) {
|
||||
return "【小华充电】退款-尊敬的用户,当前退款人数较多,申请退款失败,请您重新提交申请!";
|
||||
}
|
||||
if (AliyunTemplate.OPERATOR_ORDER_REFUND.equals(templateId)) {
|
||||
String number=paramMap.get("number");
|
||||
return "【小华充电订单异常】尊敬的管理员,用户退款订单:"+number+",有问题请速速查看。";
|
||||
return "【翔桦充电】退款-尊敬的用户,当前退款人数较多,申请退款失败,请您重新提交申请!";
|
||||
}
|
||||
// if (AliyunTemplate.OPERATOR_ORDER_REFUND.equals(templateId)) {
|
||||
// String number=paramMap.get("number");
|
||||
// return "【小华充电订单异常】尊敬的管理员,用户退款订单:"+number+",有问题请速速查看。";
|
||||
// }
|
||||
throw new Exception("没有对应的模板id");
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -90,6 +91,18 @@ public class XhpcPlaceholderOrderController extends BaseController {
|
||||
xhpcPlaceholderOrderService.getTimingPriceTime(gunNumber);
|
||||
}
|
||||
|
||||
//超过720分钟的都变成异常订单
|
||||
@Scheduled(cron = "0 0/5 * * * ? ")
|
||||
public void getAbnormal() {
|
||||
xhpcPlaceholderOrderService.getAbnormal();
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getExamine")
|
||||
public AjaxResult getExamine(@RequestParam Long placeholderOrderId, @RequestParam BigDecimal totalMoney, @RequestParam String startTime , @RequestParam String endTime){
|
||||
return xhpcPlaceholderOrderService.getExamine(placeholderOrderId,totalMoney,startTime,endTime);
|
||||
}
|
||||
|
||||
//==============================占位费查询================================
|
||||
|
||||
@GetMapping("/getPlaceholderIDs")
|
||||
|
||||
@ -7,6 +7,7 @@ import com.xhpc.order.domain.XhpcPlaceholderOrder;
|
||||
import com.xhpc.order.dto.XhpcPlaceholderTimeOrderDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -34,6 +35,7 @@ public interface XhpcPlaceholderOrderMapper {
|
||||
|
||||
List<Map<String,Object>> getXhpcPlaceholderTimeOrder(@Param("placeholderOrderId")Long placeholderOrderId);
|
||||
|
||||
List<XhpcPlaceholderTime> getXhpcPlaceholderId(@Param("placeholderId")Long placeholderId);
|
||||
|
||||
List<XhpcPlaceholderTime> getxhpcPlaceholderOrderTasks();
|
||||
|
||||
@ -41,5 +43,6 @@ public interface XhpcPlaceholderOrderMapper {
|
||||
|
||||
List<PriceInfo> getPriceInfo(@Param("placeholderId")Long placeholderId);
|
||||
|
||||
void getAbnormal();
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
package com.xhpc.order.service;
|
||||
|
||||
import com.xhpc.common.core.domain.R;
|
||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||
import com.xhpc.order.domain.XhpcPlaceholderOrder;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -26,6 +29,10 @@ public interface IXhpcPlaceholderOrderService {
|
||||
|
||||
void getxhpcPlaceholderOrderTasks();
|
||||
|
||||
void getAbnormal();
|
||||
|
||||
R getPlaceholderIDs(String [] stationIDs);
|
||||
|
||||
}
|
||||
AjaxResult getExamine(Long placeholderOrderId, BigDecimal totalMoney, String startTime , String endTime);
|
||||
|
||||
}
|
||||
|
||||
@ -1344,8 +1344,8 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
}else if(qiang==4){
|
||||
spear = "D";
|
||||
}
|
||||
operatorMessage.get("chargingStationName").toString().replace("小华充电","");
|
||||
String str = operatorMessage.get("chargingStationName").toString().replace("小华充电", "");
|
||||
operatorMessage.get("chargingStationName").toString().replace("翔桦充电","");
|
||||
String str = operatorMessage.get("chargingStationName").toString().replace("翔桦充电", "");
|
||||
if(str.length()>13){
|
||||
str =str.substring(0,13);
|
||||
}
|
||||
@ -1354,7 +1354,7 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("battery", soc);
|
||||
paramMap.put("phone", userMessage.get("phone").toString());
|
||||
paramMap.put("content", "【小华充电】尊敬的用户,你的车辆已充电达至设定的SOC(" + soc + "%)。");
|
||||
paramMap.put("content", "【翔桦充电】尊敬的用户,你的车辆已充电达至设定的SOC(" + soc + "%)。");
|
||||
smsService.sendNotice(paramMap);
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,12 +167,10 @@ public class XhpcPlaceholderOrderServiceImpl extends BaseService implements IXhp
|
||||
|
||||
if (freeTime - i1 > 0) {
|
||||
freeTime = freeTime - i1;
|
||||
;
|
||||
i1 = 0;
|
||||
} else {
|
||||
i1 = i1 - freeTime;
|
||||
freeTime = 0;
|
||||
|
||||
}
|
||||
|
||||
BigDecimal multiply = new BigDecimal(i1).multiply(price);
|
||||
@ -215,7 +213,6 @@ public class XhpcPlaceholderOrderServiceImpl extends BaseService implements IXhp
|
||||
}
|
||||
long betweOne = (endOne - startOne) / 60000;
|
||||
int i1 = (int) (betweOne);
|
||||
|
||||
if (freeTime - i1 > 0) {
|
||||
freeTime = freeTime - i1;
|
||||
i1 = 0;
|
||||
@ -458,10 +455,234 @@ public class XhpcPlaceholderOrderServiceImpl extends BaseService implements IXhp
|
||||
try {
|
||||
Map<String, Object> byId = xhpcPlaceholderOrderMapper.getById(placeholderOrderId);
|
||||
if (byId != null) {
|
||||
List<Map<String, Object>> xhpcPlaceholderTimeOrder = xhpcPlaceholderOrderMapper.getXhpcPlaceholderTimeOrder(placeholderOrderId);
|
||||
Long placeholderId = Long.valueOf(byId.get("placeholderId").toString());
|
||||
List<XhpcPlaceholderTime> list = xhpcPlaceholderOrderMapper.getXhpcPlaceholderId(placeholderId);
|
||||
byId.put("xhpcPlaceholderTime",list);
|
||||
|
||||
byId.put("xhpcPlaceholderTimeOrder",xhpcPlaceholderTimeOrder);
|
||||
List<Map<String, Object>> xhpcPlaceholderTimeOrder = xhpcPlaceholderOrderMapper.getXhpcPlaceholderTimeOrder(placeholderOrderId);
|
||||
List<Map<String, Object>> mapList =new ArrayList<>();
|
||||
if(xhpcPlaceholderTimeOrder!=null&& xhpcPlaceholderTimeOrder.size()>0){
|
||||
byId.put("xhpcPlaceholderTimeOrder",xhpcPlaceholderTimeOrder);
|
||||
}else{
|
||||
|
||||
DateTime startTime = DateUtil.parse(byId.get("startTime").toString(),"yyyy-MM-dd HH:mm:ss");
|
||||
DateTime endTime = DateUtil.parse(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"),"yyyy-MM-dd HH:mm:ss");
|
||||
String start = DateUtil.formatTime(startTime);
|
||||
String end = DateUtil.formatTime(endTime);
|
||||
DateTime parse = DateUtil.parse(DateUtil.format(startTime, "yyyy-MM-dd"), "yyyy-MM-dd");
|
||||
DateTime parse1 = DateUtil.parse(DateUtil.format(endTime, "yyyy-MM-dd"), "yyyy-MM-dd");
|
||||
long betweenDay = DateUtil.between(parse,parse1, DateUnit.DAY);
|
||||
long between = DateUtil.between(endTime, startTime, DateUnit.MINUTE);
|
||||
|
||||
BigDecimal totalMoney = new BigDecimal("0.0");
|
||||
int freeTime = Integer.parseInt(byId.get("freeTime").toString());
|
||||
if (freeTime - between > 0) {
|
||||
between = 0L;
|
||||
} else {
|
||||
between = between - freeTime;
|
||||
if (betweenDay > 0) {
|
||||
for (int m = 0; m <= betweenDay; m++) {
|
||||
if(m==0){
|
||||
List<XhpcPlaceholderTime> xhpcPlaceholderTimeOne = xhpcPlaceholderOrderMapper.getXhpcPlaceholderTime(start, "23:59:59", placeholderId);
|
||||
for (int i = 0; i < xhpcPlaceholderTimeOne.size(); i++) {
|
||||
XhpcPlaceholderTime xhpcPlaceholderTime = xhpcPlaceholderTimeOne.get(i);
|
||||
BigDecimal price = xhpcPlaceholderTime.getPrice();
|
||||
String pattern = "HH:mm:ss";
|
||||
Long startOne = DateUtil.parse(start, pattern).getTime();
|
||||
Long endOne = DateUtil.parse("23:59:59", pattern).getTime();
|
||||
|
||||
String format1 = DateUtil.format(xhpcPlaceholderTime.getStartTime(), pattern);
|
||||
String format2 = DateUtil.format(xhpcPlaceholderTime.getEndTime(), pattern);
|
||||
|
||||
Long time1 = DateUtil.parse(format1, pattern).getTime();
|
||||
Long time2 = DateUtil.parse(format2, pattern).getTime();
|
||||
|
||||
String startTimeYu="";
|
||||
String endTimeYu="";
|
||||
if (startOne < time1) {
|
||||
startOne = time1;
|
||||
startTimeYu = DateUtil.format(xhpcPlaceholderTime.getStartTime(), pattern);
|
||||
}else{
|
||||
startTimeYu = start;
|
||||
}
|
||||
if (endOne > time2) {
|
||||
endOne = time2;
|
||||
endTimeYu=DateUtil.format(xhpcPlaceholderTime.getEndTime(), pattern);
|
||||
}else{
|
||||
endTimeYu = "23:59:59";
|
||||
}
|
||||
long betweOne = (endOne - startOne) / 60000;
|
||||
int i1 = (int) (betweOne);
|
||||
if (freeTime - i1 > 0) {
|
||||
freeTime = freeTime - i1;
|
||||
i1 = 0;
|
||||
} else {
|
||||
i1 = i1 - freeTime;
|
||||
freeTime = 0;
|
||||
}
|
||||
BigDecimal multiply = new BigDecimal(i1).multiply(price);
|
||||
Map<String, Object> map =new HashMap<>();
|
||||
map.put("time",startTimeYu+"-"+endTimeYu);
|
||||
map.put("price",price);
|
||||
map.put("totalMoney",multiply);
|
||||
map.put("totalTimeSpan",betweOne);
|
||||
mapList.add(map);
|
||||
}
|
||||
}else if(m>0 && m<betweenDay){
|
||||
List<XhpcPlaceholderTime> xhpcPlaceholderTimeOne = xhpcPlaceholderOrderMapper.getXhpcPlaceholderTime("00:00:00", "23:59:59", placeholderId);
|
||||
for (int i = 0; i < xhpcPlaceholderTimeOne.size(); i++) {
|
||||
XhpcPlaceholderTime xhpcPlaceholderTime = xhpcPlaceholderTimeOne.get(i);
|
||||
BigDecimal price = xhpcPlaceholderTime.getPrice();
|
||||
String pattern = "HH:mm:ss";
|
||||
Long startOne = DateUtil.parse("00:00:00", pattern).getTime();
|
||||
Long endOne = DateUtil.parse("23:59:59", pattern).getTime();
|
||||
|
||||
String format1 = DateUtil.format(xhpcPlaceholderTime.getStartTime(), pattern);
|
||||
String format2 = DateUtil.format(xhpcPlaceholderTime.getEndTime(), pattern);
|
||||
|
||||
Long time1 = DateUtil.parse(format1, pattern).getTime();
|
||||
Long time2 = DateUtil.parse(format2, pattern).getTime();
|
||||
|
||||
String startTimeYu="";
|
||||
String endTimeYu="";
|
||||
|
||||
if (startOne < time1) {
|
||||
startOne = time1;
|
||||
startTimeYu = DateUtil.format(xhpcPlaceholderTime.getStartTime(), pattern);
|
||||
}else{
|
||||
startTimeYu="00:00:00";
|
||||
}
|
||||
if (endOne > time2) {
|
||||
endOne = time2;
|
||||
endTimeYu = DateUtil.format(xhpcPlaceholderTime.getEndTime(), pattern);
|
||||
}else{
|
||||
endTimeYu="23:59:59";
|
||||
}
|
||||
long betweOne = (endOne - startOne) / 60000;
|
||||
int i1 = (int) (betweOne);
|
||||
|
||||
if (freeTime - i1 > 0) {
|
||||
freeTime = freeTime - i1;
|
||||
i1 = 0;
|
||||
} else {
|
||||
i1 = i1 - freeTime;
|
||||
freeTime = 0;
|
||||
}
|
||||
|
||||
BigDecimal multiply = new BigDecimal(i1).multiply(price);
|
||||
totalMoney = totalMoney.add(multiply);
|
||||
Map<String, Object> map =new HashMap<>();
|
||||
map.put("time",startTimeYu+"-"+endTimeYu);
|
||||
map.put("price",price);
|
||||
map.put("totalMoney",multiply);
|
||||
map.put("totalTimeSpan",betweOne);
|
||||
mapList.add(map);
|
||||
}
|
||||
}else{
|
||||
List<XhpcPlaceholderTime> xhpcPlaceholderTimeTwo = xhpcPlaceholderOrderMapper.getXhpcPlaceholderTime("00:00:00", end, placeholderId);
|
||||
for (int i = 0; i < xhpcPlaceholderTimeTwo.size(); i++) {
|
||||
XhpcPlaceholderTime xhpcPlaceholderTime = xhpcPlaceholderTimeTwo.get(i);
|
||||
BigDecimal price = xhpcPlaceholderTime.getPrice();
|
||||
String pattern = "HH:mm:ss";
|
||||
Long startOne = DateUtil.parse("00:00:00", pattern).getTime();
|
||||
Long endOne = DateUtil.parse(end, pattern).getTime();
|
||||
|
||||
String format1 = DateUtil.format(xhpcPlaceholderTime.getStartTime(), pattern);
|
||||
String format2 = DateUtil.format(xhpcPlaceholderTime.getEndTime(), pattern);
|
||||
|
||||
Long time1 = DateUtil.parse(format1, pattern).getTime();
|
||||
Long time2 = DateUtil.parse(format2, pattern).getTime();
|
||||
|
||||
String startTimeYu="";
|
||||
String endTimeYu="";
|
||||
|
||||
if (startOne < time1) {
|
||||
startOne = time1;
|
||||
startTimeYu=DateUtil.format(xhpcPlaceholderTime.getStartTime(), pattern);
|
||||
}else{
|
||||
startTimeYu="00:00:00";
|
||||
}
|
||||
if (endOne > time2) {
|
||||
endOne = time2;
|
||||
endTimeYu=DateUtil.format(xhpcPlaceholderTime.getEndTime(), pattern);
|
||||
}else{
|
||||
endTimeYu=end;
|
||||
}
|
||||
long betweOne = (endOne - startOne) / 60000;
|
||||
int i1 = (int) (betweOne);
|
||||
|
||||
if (freeTime - i1 > 0) {
|
||||
freeTime = freeTime - i1;
|
||||
i1 = 0;
|
||||
} else {
|
||||
i1 = i1 - freeTime;
|
||||
freeTime = 0;
|
||||
}
|
||||
BigDecimal multiply = new BigDecimal(i1).multiply(price);
|
||||
totalMoney = totalMoney.add(multiply);
|
||||
Map<String, Object> map =new HashMap<>();
|
||||
map.put("time",startTimeYu+"-"+endTimeYu);
|
||||
map.put("price",price);
|
||||
map.put("totalMoney",multiply);
|
||||
map.put("totalTimeSpan",betweOne);
|
||||
mapList.add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
List<XhpcPlaceholderTime> xhpcPlaceholderTimeOne = xhpcPlaceholderOrderMapper.getXhpcPlaceholderTime(start, end, placeholderId);
|
||||
for (int i = 0; i < xhpcPlaceholderTimeOne.size(); i++) {
|
||||
XhpcPlaceholderTime xhpcPlaceholderTime = xhpcPlaceholderTimeOne.get(i);
|
||||
BigDecimal price = xhpcPlaceholderTime.getPrice();
|
||||
String pattern = "HH:mm:ss";
|
||||
Long startOne = DateUtil.parse(start, pattern).getTime();
|
||||
Long endOne = DateUtil.parse(end, pattern).getTime();
|
||||
|
||||
String format1 = DateUtil.format(xhpcPlaceholderTime.getStartTime(), pattern);
|
||||
String format2 = DateUtil.format(xhpcPlaceholderTime.getEndTime(), pattern);
|
||||
|
||||
Long time1 = DateUtil.parse(format1, pattern).getTime();
|
||||
Long time2 = DateUtil.parse(format2, pattern).getTime();
|
||||
|
||||
String startTimeYu="";
|
||||
String endTimeYu="";
|
||||
if (startOne < time1) {
|
||||
startOne = time1;
|
||||
startTimeYu=DateUtil.format(xhpcPlaceholderTime.getStartTime(), pattern);
|
||||
}else{
|
||||
startTimeYu=start;
|
||||
}
|
||||
if (endOne > time2) {
|
||||
endOne = time2;
|
||||
endTimeYu=DateUtil.format(xhpcPlaceholderTime.getEndTime(), pattern);
|
||||
}else{
|
||||
endTimeYu=end;
|
||||
}
|
||||
long betweOne = (endOne - startOne) / 60000;
|
||||
int i1 = (int) (betweOne);
|
||||
|
||||
if (freeTime - i1 > 0) {
|
||||
freeTime = freeTime - i1;
|
||||
i1 = 0;
|
||||
} else {
|
||||
i1 = i1 - freeTime;
|
||||
freeTime = 0;
|
||||
}
|
||||
BigDecimal multiply = new BigDecimal(i1).multiply(price);
|
||||
totalMoney = totalMoney.add(multiply);
|
||||
Map<String, Object> map =new HashMap<>();
|
||||
map.put("time",startTimeYu+"-"+endTimeYu);
|
||||
map.put("price",price);
|
||||
map.put("totalMoney",multiply);
|
||||
map.put("totalTimeSpan",betweOne);
|
||||
mapList.add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
byId.put("xhpcPlaceholderTimeOrder",mapList);
|
||||
}
|
||||
}
|
||||
|
||||
return R.ok(byId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -476,6 +697,11 @@ public class XhpcPlaceholderOrderServiceImpl extends BaseService implements IXhp
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAbnormal() {
|
||||
xhpcPlaceholderOrderMapper.getAbnormal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R getPlaceholderIDs(String[] stationIDs) {
|
||||
|
||||
@ -494,6 +720,19 @@ public class XhpcPlaceholderOrderServiceImpl extends BaseService implements IXhp
|
||||
return R.ok(placeholderIDs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getExamine(Long placeholderOrderId, BigDecimal totalMoney, String startTime, String endTime) {
|
||||
|
||||
XhpcPlaceholderOrder placeholderOrder=new XhpcPlaceholderOrder();
|
||||
placeholderOrder.setPlaceholderOrderId(placeholderOrderId);
|
||||
placeholderOrder.setTotalMoney(totalMoney);
|
||||
placeholderOrder.setStartTime(DateUtil.parse(startTime,"yyyy-MM-dd HH:mm:ss"));
|
||||
placeholderOrder.setEndTime(DateUtil.parse(endTime,"yyyy-MM-dd HH:mm:ss"));
|
||||
placeholderOrder.setType(1);
|
||||
xhpcPlaceholderOrderMapper.updateXhpcPlaceholderOrder(placeholderOrder);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("MA005DBW1250704215222124198".substring(0,9));
|
||||
}
|
||||
|
||||
@ -1269,6 +1269,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
xhpcHistoryOrder.setActPowerPrice(powerPrice);
|
||||
xhpcHistoryOrder.setActServicePrice(activityServicePrice.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setActPrice(powerPrice.add(activityServicePrice).setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setPromotionDiscount(money.subtract(xhpcHistoryOrder.getActivityTotalPrice()).setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
}else{
|
||||
xhpcHistoryOrder.setActivityTotalPrice(activityTotalPriceTotal.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setActivityPowerPriceTotal(activityPowerPriceTotal.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
@ -1276,13 +1277,15 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
xhpcHistoryOrder.setActPrice(activityPowerPrice.add(activityServicePrice).setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setActPowerPrice(activityPowerPrice.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setActServicePrice(activityServicePrice.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setPromotionDiscount(promotionDiscount.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
}
|
||||
}else{
|
||||
xhpcHistoryOrder.setActPrice(actPrice.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setActPowerPrice(surplusPowerPrice.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setActServicePrice(surplusServicePrice.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setPromotionDiscount(promotionDiscount.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
}
|
||||
xhpcHistoryOrder.setPromotionDiscount(promotionDiscount.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
|
||||
xhpcHistoryOrder.setInternetCommission(internetCommission.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setInternetSvcCommission(internetSvcCommission.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
xhpcHistoryOrder.setInternetDegreeCommission(internetDegreeCommission.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
@ -1415,7 +1418,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
}else if(qiang==4){
|
||||
spear = "D";
|
||||
}
|
||||
String str = operatorMessage.get("chargingStationName").toString().replace("小华充电", "");
|
||||
String str = operatorMessage.get("chargingStationName").toString().replace("翔桦充电", "");
|
||||
if(str.length()>13){
|
||||
str =str.substring(0,13);
|
||||
}
|
||||
@ -1428,7 +1431,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
paramMap.put("elec", xhpcChargeOrder.getEndSoc());
|
||||
paramMap.put("sumMoney", balance.toString());
|
||||
paramMap.put("phone", phone);
|
||||
paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,电量为:" + xhpcChargeOrder.getEndSoc() + "%,总费用为:" + balance + "元,充电费用明细,请查询小华充电小程序,谢谢。");
|
||||
paramMap.put("content", "【翔桦充电】尊敬的用户,你的爱车已停止充电,电量为:" + xhpcChargeOrder.getEndSoc() + "%,总费用为:" + balance + "元,充电费用明细,请查询翔桦充电小程序,谢谢。");
|
||||
smsService.sendNotice(paramMap);
|
||||
redisService.setCacheObject(phone+":"+balance.toString(), balance.toString(), 300L, TimeUnit.SECONDS);
|
||||
}
|
||||
@ -1441,7 +1444,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
paramMap.put("elec", xhpcChargeOrder.getEndSoc());
|
||||
paramMap.put("sumMoney", balance.toString());
|
||||
paramMap.put("phone", phone);
|
||||
paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,电量为:" + xhpcChargeOrder.getEndSoc() + "%,总费用为:" + balance + "元,充电费用明细,请查询小华充电小程序,谢谢。");
|
||||
paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,电量为:" + xhpcChargeOrder.getEndSoc() + "%,总费用为:" + balance + "元,充电费用明细,请查询翔桦充电小程序,谢谢。");
|
||||
smsService.sendNotice(paramMap);
|
||||
redisService.setCacheObject(phone+":"+balance.toString(), balance.toString(), 300L, TimeUnit.SECONDS);
|
||||
}
|
||||
@ -1450,7 +1453,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("sumMoney", balance.toString());
|
||||
paramMap.put("phone", userMessage.get("phone").toString());
|
||||
paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,总费用为:" + balance.toString() + "元,充电费用明细,请查询小华充电小程序,谢谢。");
|
||||
paramMap.put("content", "【翔桦充电】尊敬的用户,你的爱车已停止充电,总费用为:" + balance.toString() + "元,充电费用明细,请查询翔桦充电小程序,谢谢。");
|
||||
smsService.sendNotice(paramMap);
|
||||
}
|
||||
}
|
||||
|
||||
@ -335,6 +335,7 @@
|
||||
ho.max_fee as maxFee,
|
||||
ho.total_time_span as totalTimeSpan,
|
||||
ho.placeholder_order_number as placeholderOrderNumber,
|
||||
TIMESTAMPDIFF(MINUTE, IFNULL(ho.start_time, NOW()), NOW()) minutes,
|
||||
case when ho.status=1 then "占位中"
|
||||
when ho.status=2 then "等待"
|
||||
when ho.status=3 then "已完成"
|
||||
@ -481,8 +482,8 @@
|
||||
cp.power as power,
|
||||
cp.type as type,
|
||||
ho.internet_serial_number as internetSerialNumber,
|
||||
ho.start_time as startTime,
|
||||
ho.end_time as endTime,
|
||||
date_format(ho.start_time, '%Y-%m-%d %H:%i:%s')as startTime,
|
||||
date_format(ho.end_time, '%Y-%m-%d %H:%i:%s')as endTime,
|
||||
ho.source as source,
|
||||
ho.plate_num as plateNum,
|
||||
case when ho.source=0 then "C端用户"
|
||||
@ -557,6 +558,16 @@
|
||||
order by create_time
|
||||
</select>
|
||||
|
||||
<select id="getXhpcPlaceholderId" resultType="com.xhpc.common.domain.XhpcPlaceholderTime">
|
||||
select
|
||||
start_time as startTime,
|
||||
end_time as endTime,
|
||||
concat(start_time,"-",replace(end_time, '00:00:00', '23:59:59')) as time,
|
||||
price as price
|
||||
from xhpc_placeholder_time
|
||||
where placeholder_id =#{placeholderId} and del_flag=0
|
||||
</select>
|
||||
|
||||
<insert id="insertXhpcPlaceholderTimeOrder" parameterType="com.xhpc.order.dto.XhpcPlaceholderTimeOrderDto"
|
||||
useGeneratedKeys="true" keyProperty="placeholderTimeOrderId">
|
||||
insert into xhpc_placeholder_time_order
|
||||
@ -679,4 +690,9 @@
|
||||
from xhpc_placeholder_time
|
||||
where placeholder_id=#{placeholderId} and del_flag=0
|
||||
</select>
|
||||
|
||||
<update id="getAbnormal">
|
||||
update xhpc_placeholder_order set type=2 where TIMESTAMPDIFF(MINUTE, IFNULL(start_time, NOW()), NOW()) > 720 and (status=1 or status=2) and type =0
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -161,7 +161,7 @@ public class AlipayPaymentController {
|
||||
"\"product_code\":\"JSAPI_PAY\"," +
|
||||
"\"op_app_id\":\"2021002156615717\"," +
|
||||
"\"total_amount\":"+amount+"," +
|
||||
"\"subject\":\"小华充电\"," +
|
||||
"\"subject\":\"翔桦充电\"," +
|
||||
"\"timeout_express\":\"30m\"," +
|
||||
"\"passback_params\":\""+encode+"\"," +
|
||||
"\"buyer_id\":\""+openid+"\"" +
|
||||
|
||||
@ -771,7 +771,7 @@ public class XhpcRefundAuditController extends BaseController {
|
||||
//发送短信
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("phone", phone);
|
||||
paramMap.put("content", "【小华充电】退款-尊敬的用户,当前退款人数较多,申请退款失败,请您重新提交申请!");
|
||||
paramMap.put("content", "【翔桦充电】退款-尊敬的用户,当前退款人数较多,申请退款失败,请您重新提交申请!");
|
||||
smsService.sendNotice(paramMap);
|
||||
}catch (Exception e){
|
||||
|
||||
|
||||
@ -1184,8 +1184,8 @@ public class XhpcRefundOriginalOrderServiceImpl implements IXhpcRefundOriginalOr
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("number",refundOrder.getRefundOrderId()+"");
|
||||
paramMap.put("phone", "18123374652");
|
||||
paramMap.put("content", "【小华充电订单异常】尊敬的管理员,用户退款订单:"+refundOrder.getRefundOrderId()+",有问题请速速查看。");
|
||||
smsService.sendNotice(paramMap);
|
||||
paramMap.put("content", "【翔桦充电】尊敬的管理员,用户退款订单:"+refundOrder.getRefundOrderId()+",有问题请速速查看。");
|
||||
//smsService.sendNotice(paramMap);
|
||||
}
|
||||
iXhpcRefundOrderService.update(refundOrder);
|
||||
}
|
||||
@ -1516,8 +1516,8 @@ public class XhpcRefundOriginalOrderServiceImpl implements IXhpcRefundOriginalOr
|
||||
public void getTestSms(String number){
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("phone", "18123374652");
|
||||
paramMap.put("content", "【小华充电订单异常】尊敬的管理员,用户退款订单:"+number+",有问题请速速查看。");
|
||||
smsService.sendNotice(paramMap);
|
||||
paramMap.put("content", "【翔桦充电】尊敬的管理员,用户退款订单:"+number+",有问题请速速查看。");
|
||||
// smsService.sendNotice(paramMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -216,7 +216,7 @@ public class RealtimeDataLogic implements ServiceLogic {
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("money", "5");
|
||||
paramMap.put("phone", tel);
|
||||
paramMap.put("content", "【小华充电】尊敬的用户,你的账户余额小于5元,为不影响您的正常充电,请您尽快充值交费,谢谢。");
|
||||
paramMap.put("content", "【翔桦充电】尊敬的用户,你的账户余额小于5元,为不影响您的正常充电,请您尽快充值交费,谢谢。");
|
||||
smsService.sendNotice(paramMap);
|
||||
cacheOrder.put("lt5alerted", "true");
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
||||
throw new RuntimeException("在阿里云上无法找到该文件,请检查上传的图片路径是否完整或有误");
|
||||
}
|
||||
try {
|
||||
MailUtil.send(receiveEmail, "【小华充电】电子发票", "邮件来自小华充电", false, electricInvoiceFile);
|
||||
MailUtil.send(receiveEmail, "【翔桦充电】电子发票", "邮件来自翔桦充电", false, electricInvoiceFile);
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
return Boolean.FALSE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user