mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-10 04:50:11 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -3,6 +3,7 @@ package com.jsowell.pile.mapper;
|
|||||||
import com.jsowell.pile.domain.PileSimInfo;
|
import com.jsowell.pile.domain.PileSimInfo;
|
||||||
import com.jsowell.pile.dto.QuerySimInfoDTO;
|
import com.jsowell.pile.dto.QuerySimInfoDTO;
|
||||||
import com.jsowell.pile.vo.web.SimCardInfoVO;
|
import com.jsowell.pile.vo.web.SimCardInfoVO;
|
||||||
|
import com.jsowell.pile.vo.web.SimCardVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@@ -92,5 +93,5 @@ public interface PileSimInfoMapper {
|
|||||||
*/
|
*/
|
||||||
PileSimInfo getBasicInfoByIccId(@Param("iccId") String iccId);
|
PileSimInfo getBasicInfoByIccId(@Param("iccId") String iccId);
|
||||||
|
|
||||||
|
void updateSimCardInfoBatch(@Param("list") List<SimCardVO> list);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.jsowell.pile.service;
|
|||||||
import com.jsowell.pile.domain.PileSimInfo;
|
import com.jsowell.pile.domain.PileSimInfo;
|
||||||
import com.jsowell.pile.dto.QuerySimInfoDTO;
|
import com.jsowell.pile.dto.QuerySimInfoDTO;
|
||||||
import com.jsowell.pile.vo.web.SimCardInfoVO;
|
import com.jsowell.pile.vo.web.SimCardInfoVO;
|
||||||
|
import com.jsowell.pile.vo.web.SimCardVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -71,25 +71,25 @@ public class SimCardService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 不知道iccid属于哪家供应商,就用这个方法查
|
* 不知道iccid属于哪家供应商,就用这个方法查
|
||||||
* @param iccid
|
* @param iccids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public SimCardVO searchByLoop(String iccid) {
|
public List<SimCardVO> searchByLoop(List<String> iccids) {
|
||||||
SimCardVO vo = null;
|
List<SimCardVO> resultList = Lists.newArrayList();
|
||||||
// 查XunZhong
|
// 查XunZhong
|
||||||
List<SimCardVO> simCardVOS = XunZhongGetSimInfoByIccIds(Lists.newArrayList(iccid));
|
List<SimCardVO> xunZhongList = XunZhongGetSimInfoByIccIds(iccids);
|
||||||
if (CollectionUtils.isNotEmpty(simCardVOS)) {
|
if (CollectionUtils.isNotEmpty(xunZhongList)) {
|
||||||
vo = simCardVOS.get(0);
|
resultList.addAll(xunZhongList);
|
||||||
}
|
}
|
||||||
// 查WuLian平台
|
// 查WuLian平台
|
||||||
List<SimCardVO> wuLianSimData = WuLianGetSimInfoByIccIds(Lists.newArrayList(iccid));
|
List<SimCardVO> wuLianSimData = WuLianGetSimInfoByIccIds(iccids);
|
||||||
if (CollectionUtils.isNotEmpty(wuLianSimData)) {
|
if (CollectionUtils.isNotEmpty(wuLianSimData)) {
|
||||||
vo = wuLianSimData.get(0);
|
resultList.addAll(xunZhongList);
|
||||||
}
|
}
|
||||||
// 第三个供应商
|
// 第三个供应商
|
||||||
|
|
||||||
logger.info("查询iccid:{}, 详情信息:{}", iccid, JSON.toJSONString(vo));
|
logger.info("查询iccid:{}, 详情信息:{}", iccids, JSON.toJSONString(resultList));
|
||||||
return vo;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,7 +110,7 @@ public class SimCardService {
|
|||||||
ArrayList<SimRenewResultVO> list = new ArrayList<>();
|
ArrayList<SimRenewResultVO> list = new ArrayList<>();
|
||||||
for (String iccId : iccIds) {
|
for (String iccId : iccIds) {
|
||||||
// 查出此卡属于哪家公司(拿到code)
|
// 查出此卡属于哪家公司(拿到code)
|
||||||
SimCardVO simCardVO = searchByLoop(iccId);
|
SimCardVO simCardVO = searchByLoop(Lists.newArrayList(iccId)).get(0);
|
||||||
String simSupplierCode = simCardVO.getSimCardFactory();
|
String simSupplierCode = simCardVO.getSimCardFactory();
|
||||||
|
|
||||||
// 根据不同的公司执行不同的续费方法
|
// 根据不同的公司执行不同的续费方法
|
||||||
|
|||||||
@@ -533,7 +533,7 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
|||||||
// 通过iccid查pile_sim_info
|
// 通过iccid查pile_sim_info
|
||||||
PileSimInfo simInfo = pileSimInfoService.getBasicInfoByIccId(iccid);
|
PileSimInfo simInfo = pileSimInfoService.getBasicInfoByIccId(iccid);
|
||||||
if (simInfo == null) {
|
if (simInfo == null) {
|
||||||
SimCardVO simCardVO = simCardService.searchByLoop(iccid);
|
SimCardVO simCardVO = simCardService.searchByLoop(Lists.newArrayList(iccid)).get(0);
|
||||||
// pile_sim_info 新增数据
|
// pile_sim_info 新增数据
|
||||||
if (simCardVO != null) {
|
if (simCardVO != null) {
|
||||||
simInfo = PileSimInfo.builder()
|
simInfo = PileSimInfo.builder()
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ import com.jsowell.pile.domain.PileSimInfo;
|
|||||||
import com.jsowell.pile.dto.QuerySimInfoDTO;
|
import com.jsowell.pile.dto.QuerySimInfoDTO;
|
||||||
import com.jsowell.pile.mapper.PileSimInfoMapper;
|
import com.jsowell.pile.mapper.PileSimInfoMapper;
|
||||||
import com.jsowell.pile.service.IPileSimInfoService;
|
import com.jsowell.pile.service.IPileSimInfoService;
|
||||||
|
import com.jsowell.pile.service.SimCardService;
|
||||||
import com.jsowell.pile.vo.web.SimCardInfoVO;
|
import com.jsowell.pile.vo.web.SimCardInfoVO;
|
||||||
|
import com.jsowell.pile.vo.web.SimCardVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -16,6 +18,8 @@ import org.springframework.stereotype.Service;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充电桩SIM卡信息Service业务层处理
|
* 充电桩SIM卡信息Service业务层处理
|
||||||
@@ -29,6 +33,9 @@ public class PileSimInfoServiceImpl implements IPileSimInfoService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PileSimInfoMapper pileSimInfoMapper;
|
private PileSimInfoMapper pileSimInfoMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SimCardService simCardService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询充电桩SIM卡信息
|
* 查询充电桩SIM卡信息
|
||||||
*
|
*
|
||||||
@@ -67,6 +74,21 @@ public class PileSimInfoServiceImpl implements IPileSimInfoService {
|
|||||||
}
|
}
|
||||||
dto.setExpiredTime(expiredTime);
|
dto.setExpiredTime(expiredTime);
|
||||||
List<SimCardInfoVO> simInfoList = pileSimInfoMapper.getSimInfoList(dto);
|
List<SimCardInfoVO> simInfoList = pileSimInfoMapper.getSimInfoList(dto);
|
||||||
|
if (expiredTime == null) {
|
||||||
|
// 为空说明后管查询列表页没有选择筛选条件
|
||||||
|
List<String> iccids = simInfoList.stream()
|
||||||
|
.map(SimCardInfoVO::getIccId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
// 查出最新的卡信息
|
||||||
|
List<SimCardVO> simCardList = simCardService.searchByLoop(iccids);
|
||||||
|
if (CollectionUtils.isNotEmpty(simCardList)) {
|
||||||
|
// 批量修改存库
|
||||||
|
pileSimInfoMapper.updateSimCardInfoBatch(simCardList);
|
||||||
|
|
||||||
|
simInfoList = pileSimInfoMapper.getSimInfoList(dto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(simInfoList)) {
|
if (CollectionUtils.isEmpty(simInfoList)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,4 +188,19 @@
|
|||||||
</if>
|
</if>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateSimCardInfoBatch" parameterType="java.util.List">
|
||||||
|
<foreach collection="list" item="simCardVO" separator=";" >
|
||||||
|
update pile_sim_info
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="simCardVO.name != null">name = #{simCardVO.name},</if>
|
||||||
|
<if test="simCardVO.simCardStatus != null">status = #{simCardVO.simCardStatus},</if>
|
||||||
|
<if test="simCardVO.simCardFactory != null">sim_supplier = #{simCardVO.simCardFactory},</if>
|
||||||
|
<if test="simCardVO.packageCapacity != null">total_data = #{simCardVO.packageCapacity},</if>
|
||||||
|
<if test="simCardVO.residualFlowRate != null">surplus_data = #{simCardVO.residualFlowRate},</if>
|
||||||
|
<if test="simCardVO.expiredTime != null">expire_time = #{simCardVO.expiredTime},</if>
|
||||||
|
</trim>
|
||||||
|
where iccid = #{simCardVO.iccId}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
@@ -9,6 +9,7 @@
|
|||||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
|
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
|
||||||
/>
|
/>
|
||||||
<!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico" /> -->
|
<!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico" /> -->
|
||||||
|
<link rel="icon" href="#" />
|
||||||
<title><%= webpackConfig.name %></title>
|
<title><%= webpackConfig.name %></title>
|
||||||
<!-- <script src="https://webapi.amap.com/maps?v=1.4.15&key=61436c9c789d301a5b73853d176710cf"></script> -->
|
<!-- <script src="https://webapi.amap.com/maps?v=1.4.15&key=61436c9c789d301a5b73853d176710cf"></script> -->
|
||||||
<!--[if lt IE 11
|
<!--[if lt IE 11
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
|
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
|
||||||
<transition name="sidebarLogoFade">
|
<transition name="sidebarLogoFade">
|
||||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
<!-- <img v-if="logo" :src="logo" class="sidebar-logo" /> -->
|
||||||
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
<!-- <h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1> -->
|
||||||
|
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
<!-- <img v-if="logo" :src="logo" class="sidebar-logo" /> -->
|
||||||
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
||||||
</router-link>
|
</router-link>
|
||||||
</transition>
|
</transition>
|
||||||
|
|||||||
Reference in New Issue
Block a user